@owox/connectors 0.16.0-next-20251215173006 → 0.16.0-next-20251216083817
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/dist/index.cjs +1986 -0
- package/dist/index.js +1986 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6581,6 +6581,1989 @@ const TikTokAds = (function() {
|
|
|
6581
6581
|
manifest
|
|
6582
6582
|
};
|
|
6583
6583
|
})();
|
|
6584
|
+
const ShopifyAds = (function() {
|
|
6585
|
+
const { AbstractException: AbstractException2, HttpRequestException: HttpRequestException2, OauthFlowException: OauthFlowException2, AbstractStorage: AbstractStorage2, AbstractSource: AbstractSource3, AbstractRunConfig: AbstractRunConfig3, AbstractConnector: AbstractConnector3, AbstractConfig: AbstractConfig2, HttpUtils: HttpUtils3, FileUtils: FileUtils3, DateUtils: DateUtils3, CryptoUtils: CryptoUtils3, AsyncUtils: AsyncUtils3, RunConfigDto: RunConfigDto2, OauthCredentialsDto: OauthCredentialsDto2, OauthCredentialsDtoBuilder: OauthCredentialsDtoBuilder2, SourceConfigDto: SourceConfigDto2, StorageConfigDto: StorageConfigDto2, ConfigDto: ConfigDto2, HTTP_STATUS: HTTP_STATUS2, EXECUTION_STATUS: EXECUTION_STATUS2, RUN_CONFIG_TYPE: RUN_CONFIG_TYPE2, CONFIG_ATTRIBUTES: CONFIG_ATTRIBUTES2, OAUTH_CONSTANTS: OAUTH_CONSTANTS2, OAUTH_SOURCE_CREDENTIALS_KEY: OAUTH_SOURCE_CREDENTIALS_KEY2 } = Core;
|
|
6586
|
+
var tenderTransactionsFields = {
|
|
6587
|
+
"id": {
|
|
6588
|
+
"description": "A globally-unique ID.",
|
|
6589
|
+
"type": "string",
|
|
6590
|
+
"graphqlPath": "id"
|
|
6591
|
+
},
|
|
6592
|
+
"amount": {
|
|
6593
|
+
"description": "The amount of the tender transaction.",
|
|
6594
|
+
"type": "float",
|
|
6595
|
+
"graphqlPath": "amount { amount }"
|
|
6596
|
+
},
|
|
6597
|
+
"currencyCode": {
|
|
6598
|
+
"description": "The currency code.",
|
|
6599
|
+
"type": "string",
|
|
6600
|
+
"graphqlPath": "amount { currencyCode }"
|
|
6601
|
+
},
|
|
6602
|
+
"remoteReference": {
|
|
6603
|
+
"description": "The remote gateway reference.",
|
|
6604
|
+
"type": "string",
|
|
6605
|
+
"graphqlPath": "remoteReference"
|
|
6606
|
+
},
|
|
6607
|
+
"test": {
|
|
6608
|
+
"description": "Whether the transaction is a test transaction.",
|
|
6609
|
+
"type": "bool",
|
|
6610
|
+
"graphqlPath": "test"
|
|
6611
|
+
},
|
|
6612
|
+
"orderId": {
|
|
6613
|
+
"description": "The ID of the order.",
|
|
6614
|
+
"type": "string",
|
|
6615
|
+
"graphqlPath": "order { id }"
|
|
6616
|
+
},
|
|
6617
|
+
"processedAt": {
|
|
6618
|
+
"description": "The date and time when the transaction was processed.",
|
|
6619
|
+
"type": "timestamp",
|
|
6620
|
+
"graphqlPath": "processedAt"
|
|
6621
|
+
}
|
|
6622
|
+
};
|
|
6623
|
+
var shopFields = {
|
|
6624
|
+
"id": {
|
|
6625
|
+
"description": "A globally-unique ID.",
|
|
6626
|
+
"type": "string",
|
|
6627
|
+
"graphqlPath": "id"
|
|
6628
|
+
},
|
|
6629
|
+
"name": {
|
|
6630
|
+
"description": "The name of the shop.",
|
|
6631
|
+
"type": "string",
|
|
6632
|
+
"graphqlPath": "name"
|
|
6633
|
+
},
|
|
6634
|
+
"email": {
|
|
6635
|
+
"description": "The email address of the shop.",
|
|
6636
|
+
"type": "string",
|
|
6637
|
+
"graphqlPath": "email"
|
|
6638
|
+
},
|
|
6639
|
+
"myshopifyDomain": {
|
|
6640
|
+
"description": "The myshopify.com domain of the shop.",
|
|
6641
|
+
"type": "string",
|
|
6642
|
+
"graphqlPath": "myshopifyDomain"
|
|
6643
|
+
},
|
|
6644
|
+
"primaryDomain": {
|
|
6645
|
+
"description": "The primary domain of the shop.",
|
|
6646
|
+
"type": "string",
|
|
6647
|
+
"graphqlPath": "primaryDomain { host }"
|
|
6648
|
+
},
|
|
6649
|
+
"currencyCode": {
|
|
6650
|
+
"description": "The currency code of the shop.",
|
|
6651
|
+
"type": "string",
|
|
6652
|
+
"graphqlPath": "currencyCode"
|
|
6653
|
+
},
|
|
6654
|
+
"timezoneAbbreviation": {
|
|
6655
|
+
"description": "The timezone abbreviation.",
|
|
6656
|
+
"type": "string",
|
|
6657
|
+
"graphqlPath": "timezoneAbbreviation"
|
|
6658
|
+
},
|
|
6659
|
+
"ianaTimezone": {
|
|
6660
|
+
"description": "The IANA timezone.",
|
|
6661
|
+
"type": "string",
|
|
6662
|
+
"graphqlPath": "ianaTimezone"
|
|
6663
|
+
},
|
|
6664
|
+
"weightUnit": {
|
|
6665
|
+
"description": "The default weight unit.",
|
|
6666
|
+
"type": "string",
|
|
6667
|
+
"graphqlPath": "weightUnit"
|
|
6668
|
+
},
|
|
6669
|
+
"billingAddressCity": {
|
|
6670
|
+
"description": "City from the billing address.",
|
|
6671
|
+
"type": "string",
|
|
6672
|
+
"graphqlPath": "billingAddress { city }"
|
|
6673
|
+
},
|
|
6674
|
+
"billingAddressCountry": {
|
|
6675
|
+
"description": "Country from the billing address.",
|
|
6676
|
+
"type": "string",
|
|
6677
|
+
"graphqlPath": "billingAddress { country }"
|
|
6678
|
+
},
|
|
6679
|
+
"billingAddressProvince": {
|
|
6680
|
+
"description": "Province from the billing address.",
|
|
6681
|
+
"type": "string",
|
|
6682
|
+
"graphqlPath": "billingAddress { province }"
|
|
6683
|
+
},
|
|
6684
|
+
"billingAddressZip": {
|
|
6685
|
+
"description": "Postal/ZIP code from the billing address.",
|
|
6686
|
+
"type": "string",
|
|
6687
|
+
"graphqlPath": "billingAddress { zip }"
|
|
6688
|
+
},
|
|
6689
|
+
"plan": {
|
|
6690
|
+
"description": "The shop plan name.",
|
|
6691
|
+
"type": "string",
|
|
6692
|
+
"graphqlPath": "plan { displayName }"
|
|
6693
|
+
},
|
|
6694
|
+
"contactEmail": {
|
|
6695
|
+
"description": "The contact email of the shop.",
|
|
6696
|
+
"type": "string",
|
|
6697
|
+
"graphqlPath": "contactEmail"
|
|
6698
|
+
},
|
|
6699
|
+
"customerAccountsV2": {
|
|
6700
|
+
"description": "The customer accounts version.",
|
|
6701
|
+
"type": "string",
|
|
6702
|
+
"graphqlPath": "customerAccountsV2 { loginRequiredAtCheckout }"
|
|
6703
|
+
},
|
|
6704
|
+
"taxesIncluded": {
|
|
6705
|
+
"description": "Whether taxes are included in prices.",
|
|
6706
|
+
"type": "bool",
|
|
6707
|
+
"graphqlPath": "taxesIncluded"
|
|
6708
|
+
},
|
|
6709
|
+
"taxShipping": {
|
|
6710
|
+
"description": "Whether shipping is taxed.",
|
|
6711
|
+
"type": "bool",
|
|
6712
|
+
"graphqlPath": "taxShipping"
|
|
6713
|
+
},
|
|
6714
|
+
"createdAt": {
|
|
6715
|
+
"description": "The date and time when the shop was created.",
|
|
6716
|
+
"type": "timestamp",
|
|
6717
|
+
"graphqlPath": "createdAt"
|
|
6718
|
+
},
|
|
6719
|
+
"updatedAt": {
|
|
6720
|
+
"description": "The date and time when the shop was last updated.",
|
|
6721
|
+
"type": "timestamp",
|
|
6722
|
+
"graphqlPath": "updatedAt"
|
|
6723
|
+
}
|
|
6724
|
+
};
|
|
6725
|
+
var productsFields = {
|
|
6726
|
+
"id": {
|
|
6727
|
+
"description": "A globally-unique ID.",
|
|
6728
|
+
"type": "string",
|
|
6729
|
+
"graphqlPath": "id"
|
|
6730
|
+
},
|
|
6731
|
+
"title": {
|
|
6732
|
+
"description": "The title of the product.",
|
|
6733
|
+
"type": "string",
|
|
6734
|
+
"graphqlPath": "title"
|
|
6735
|
+
},
|
|
6736
|
+
"handle": {
|
|
6737
|
+
"description": "A unique, human-friendly string for the product URL.",
|
|
6738
|
+
"type": "string",
|
|
6739
|
+
"graphqlPath": "handle"
|
|
6740
|
+
},
|
|
6741
|
+
"description": {
|
|
6742
|
+
"description": "The description of the product.",
|
|
6743
|
+
"type": "string",
|
|
6744
|
+
"graphqlPath": "description"
|
|
6745
|
+
},
|
|
6746
|
+
"descriptionHtml": {
|
|
6747
|
+
"description": "The description of the product in HTML format.",
|
|
6748
|
+
"type": "string",
|
|
6749
|
+
"graphqlPath": "descriptionHtml"
|
|
6750
|
+
},
|
|
6751
|
+
"vendor": {
|
|
6752
|
+
"description": "The name of the product vendor.",
|
|
6753
|
+
"type": "string",
|
|
6754
|
+
"graphqlPath": "vendor"
|
|
6755
|
+
},
|
|
6756
|
+
"productType": {
|
|
6757
|
+
"description": "The product type.",
|
|
6758
|
+
"type": "string",
|
|
6759
|
+
"graphqlPath": "productType"
|
|
6760
|
+
},
|
|
6761
|
+
"status": {
|
|
6762
|
+
"description": "The status of the product.",
|
|
6763
|
+
"type": "string",
|
|
6764
|
+
"graphqlPath": "status"
|
|
6765
|
+
},
|
|
6766
|
+
"tags": {
|
|
6767
|
+
"description": "A comma-separated list of tags.",
|
|
6768
|
+
"type": "string",
|
|
6769
|
+
"graphqlPath": "tags"
|
|
6770
|
+
},
|
|
6771
|
+
"templateSuffix": {
|
|
6772
|
+
"description": "The name of the template the product is using.",
|
|
6773
|
+
"type": "string",
|
|
6774
|
+
"graphqlPath": "templateSuffix"
|
|
6775
|
+
},
|
|
6776
|
+
"totalInventory": {
|
|
6777
|
+
"description": "The total inventory across all variants.",
|
|
6778
|
+
"type": "int32",
|
|
6779
|
+
"graphqlPath": "totalInventory"
|
|
6780
|
+
},
|
|
6781
|
+
"variantsCount": {
|
|
6782
|
+
"description": "The number of variants.",
|
|
6783
|
+
"type": "int32",
|
|
6784
|
+
"graphqlPath": "variantsCount { count }"
|
|
6785
|
+
},
|
|
6786
|
+
"featuredImageUrl": {
|
|
6787
|
+
"description": "The URL of the featured image.",
|
|
6788
|
+
"type": "string",
|
|
6789
|
+
"graphqlPath": "featuredImage { url }"
|
|
6790
|
+
},
|
|
6791
|
+
"priceRangeMinAmount": {
|
|
6792
|
+
"description": "The minimum price of the product.",
|
|
6793
|
+
"type": "float",
|
|
6794
|
+
"graphqlPath": "priceRangeV2 { minVariantPrice { amount } }"
|
|
6795
|
+
},
|
|
6796
|
+
"priceRangeMaxAmount": {
|
|
6797
|
+
"description": "The maximum price of the product.",
|
|
6798
|
+
"type": "float",
|
|
6799
|
+
"graphqlPath": "priceRangeV2 { maxVariantPrice { amount } }"
|
|
6800
|
+
},
|
|
6801
|
+
"seoTitle": {
|
|
6802
|
+
"description": "The SEO title.",
|
|
6803
|
+
"type": "string",
|
|
6804
|
+
"graphqlPath": "seo { title }"
|
|
6805
|
+
},
|
|
6806
|
+
"seoDescription": {
|
|
6807
|
+
"description": "The SEO description.",
|
|
6808
|
+
"type": "string",
|
|
6809
|
+
"graphqlPath": "seo { description }"
|
|
6810
|
+
},
|
|
6811
|
+
"onlineStoreUrl": {
|
|
6812
|
+
"description": "The URL of the product on the online store.",
|
|
6813
|
+
"type": "string",
|
|
6814
|
+
"graphqlPath": "onlineStoreUrl"
|
|
6815
|
+
},
|
|
6816
|
+
"publishedAt": {
|
|
6817
|
+
"description": "The date and time when the product was published.",
|
|
6818
|
+
"type": "timestamp",
|
|
6819
|
+
"graphqlPath": "publishedAt"
|
|
6820
|
+
},
|
|
6821
|
+
"createdAt": {
|
|
6822
|
+
"description": "The date and time when the product was created.",
|
|
6823
|
+
"type": "timestamp",
|
|
6824
|
+
"graphqlPath": "createdAt"
|
|
6825
|
+
},
|
|
6826
|
+
"updatedAt": {
|
|
6827
|
+
"description": "The date and time when the product was last updated.",
|
|
6828
|
+
"type": "timestamp",
|
|
6829
|
+
"graphqlPath": "updatedAt"
|
|
6830
|
+
}
|
|
6831
|
+
};
|
|
6832
|
+
var productVariantsFields = {
|
|
6833
|
+
"id": {
|
|
6834
|
+
"description": "A globally-unique ID.",
|
|
6835
|
+
"type": "string",
|
|
6836
|
+
"graphqlPath": "id"
|
|
6837
|
+
},
|
|
6838
|
+
"title": {
|
|
6839
|
+
"description": "The title of the variant.",
|
|
6840
|
+
"type": "string",
|
|
6841
|
+
"graphqlPath": "title"
|
|
6842
|
+
},
|
|
6843
|
+
"displayName": {
|
|
6844
|
+
"description": "The display name of the variant.",
|
|
6845
|
+
"type": "string",
|
|
6846
|
+
"graphqlPath": "displayName"
|
|
6847
|
+
},
|
|
6848
|
+
"sku": {
|
|
6849
|
+
"description": "The SKU of the variant.",
|
|
6850
|
+
"type": "string",
|
|
6851
|
+
"graphqlPath": "sku"
|
|
6852
|
+
},
|
|
6853
|
+
"barcode": {
|
|
6854
|
+
"description": "The barcode of the variant.",
|
|
6855
|
+
"type": "string",
|
|
6856
|
+
"graphqlPath": "barcode"
|
|
6857
|
+
},
|
|
6858
|
+
"price": {
|
|
6859
|
+
"description": "The price of the variant.",
|
|
6860
|
+
"type": "float",
|
|
6861
|
+
"graphqlPath": "price"
|
|
6862
|
+
},
|
|
6863
|
+
"compareAtPrice": {
|
|
6864
|
+
"description": "The compare at price of the variant.",
|
|
6865
|
+
"type": "float",
|
|
6866
|
+
"graphqlPath": "compareAtPrice"
|
|
6867
|
+
},
|
|
6868
|
+
"position": {
|
|
6869
|
+
"description": "The position of the variant in the list.",
|
|
6870
|
+
"type": "int32",
|
|
6871
|
+
"graphqlPath": "position"
|
|
6872
|
+
},
|
|
6873
|
+
"inventoryQuantity": {
|
|
6874
|
+
"description": "The total inventory quantity.",
|
|
6875
|
+
"type": "int32",
|
|
6876
|
+
"graphqlPath": "inventoryQuantity"
|
|
6877
|
+
},
|
|
6878
|
+
"inventoryPolicy": {
|
|
6879
|
+
"description": "The inventory policy.",
|
|
6880
|
+
"type": "string",
|
|
6881
|
+
"graphqlPath": "inventoryPolicy"
|
|
6882
|
+
},
|
|
6883
|
+
"inventoryItemId": {
|
|
6884
|
+
"description": "The ID of the inventory item.",
|
|
6885
|
+
"type": "string",
|
|
6886
|
+
"graphqlPath": "inventoryItem { id }"
|
|
6887
|
+
},
|
|
6888
|
+
"productId": {
|
|
6889
|
+
"description": "The ID of the product.",
|
|
6890
|
+
"type": "string",
|
|
6891
|
+
"graphqlPath": "product { id }"
|
|
6892
|
+
},
|
|
6893
|
+
"productTitle": {
|
|
6894
|
+
"description": "The title of the product.",
|
|
6895
|
+
"type": "string",
|
|
6896
|
+
"graphqlPath": "product { title }"
|
|
6897
|
+
},
|
|
6898
|
+
"taxable": {
|
|
6899
|
+
"description": "Whether the variant is taxable.",
|
|
6900
|
+
"type": "bool",
|
|
6901
|
+
"graphqlPath": "taxable"
|
|
6902
|
+
},
|
|
6903
|
+
"taxCode": {
|
|
6904
|
+
"description": "The tax code.",
|
|
6905
|
+
"type": "string",
|
|
6906
|
+
"graphqlPath": "taxCode"
|
|
6907
|
+
},
|
|
6908
|
+
"availableForSale": {
|
|
6909
|
+
"description": "Whether the variant is available for sale.",
|
|
6910
|
+
"type": "bool",
|
|
6911
|
+
"graphqlPath": "availableForSale"
|
|
6912
|
+
},
|
|
6913
|
+
"createdAt": {
|
|
6914
|
+
"description": "The date and time when the variant was created.",
|
|
6915
|
+
"type": "timestamp",
|
|
6916
|
+
"graphqlPath": "createdAt"
|
|
6917
|
+
},
|
|
6918
|
+
"updatedAt": {
|
|
6919
|
+
"description": "The date and time when the variant was last updated.",
|
|
6920
|
+
"type": "timestamp",
|
|
6921
|
+
"graphqlPath": "updatedAt"
|
|
6922
|
+
}
|
|
6923
|
+
};
|
|
6924
|
+
var pagesFields = {
|
|
6925
|
+
"id": {
|
|
6926
|
+
"description": "A globally-unique ID.",
|
|
6927
|
+
"type": "string",
|
|
6928
|
+
"graphqlPath": "id"
|
|
6929
|
+
},
|
|
6930
|
+
"title": {
|
|
6931
|
+
"description": "The title of the page.",
|
|
6932
|
+
"type": "string",
|
|
6933
|
+
"graphqlPath": "title"
|
|
6934
|
+
},
|
|
6935
|
+
"handle": {
|
|
6936
|
+
"description": "A unique, human-friendly string for the page URL.",
|
|
6937
|
+
"type": "string",
|
|
6938
|
+
"graphqlPath": "handle"
|
|
6939
|
+
},
|
|
6940
|
+
"body": {
|
|
6941
|
+
"description": "The body content of the page.",
|
|
6942
|
+
"type": "string",
|
|
6943
|
+
"graphqlPath": "body"
|
|
6944
|
+
},
|
|
6945
|
+
"bodySummary": {
|
|
6946
|
+
"description": "A summary of the body content.",
|
|
6947
|
+
"type": "string",
|
|
6948
|
+
"graphqlPath": "bodySummary"
|
|
6949
|
+
},
|
|
6950
|
+
"isPublished": {
|
|
6951
|
+
"description": "Whether the page is published.",
|
|
6952
|
+
"type": "bool",
|
|
6953
|
+
"graphqlPath": "isPublished"
|
|
6954
|
+
},
|
|
6955
|
+
"templateSuffix": {
|
|
6956
|
+
"description": "The name of the template the page is using.",
|
|
6957
|
+
"type": "string",
|
|
6958
|
+
"graphqlPath": "templateSuffix"
|
|
6959
|
+
},
|
|
6960
|
+
"publishedAt": {
|
|
6961
|
+
"description": "The date and time when the page was published.",
|
|
6962
|
+
"type": "timestamp",
|
|
6963
|
+
"graphqlPath": "publishedAt"
|
|
6964
|
+
},
|
|
6965
|
+
"createdAt": {
|
|
6966
|
+
"description": "The date and time when the page was created.",
|
|
6967
|
+
"type": "timestamp",
|
|
6968
|
+
"graphqlPath": "createdAt"
|
|
6969
|
+
},
|
|
6970
|
+
"updatedAt": {
|
|
6971
|
+
"description": "The date and time when the page was last updated.",
|
|
6972
|
+
"type": "timestamp",
|
|
6973
|
+
"graphqlPath": "updatedAt"
|
|
6974
|
+
}
|
|
6975
|
+
};
|
|
6976
|
+
var ordersFields = {
|
|
6977
|
+
"id": {
|
|
6978
|
+
"description": "A globally-unique ID.",
|
|
6979
|
+
"type": "string",
|
|
6980
|
+
"graphqlPath": "id"
|
|
6981
|
+
},
|
|
6982
|
+
"name": {
|
|
6983
|
+
"description": "The order name, generated by combining the order_number with the shop order prefix.",
|
|
6984
|
+
"type": "string",
|
|
6985
|
+
"graphqlPath": "name"
|
|
6986
|
+
},
|
|
6987
|
+
"email": {
|
|
6988
|
+
"description": "The email address of the customer.",
|
|
6989
|
+
"type": "string",
|
|
6990
|
+
"graphqlPath": "email"
|
|
6991
|
+
},
|
|
6992
|
+
"phone": {
|
|
6993
|
+
"description": "The phone number of the customer.",
|
|
6994
|
+
"type": "string",
|
|
6995
|
+
"graphqlPath": "phone"
|
|
6996
|
+
},
|
|
6997
|
+
"displayFinancialStatus": {
|
|
6998
|
+
"description": "The financial status of the order.",
|
|
6999
|
+
"type": "string",
|
|
7000
|
+
"graphqlPath": "displayFinancialStatus"
|
|
7001
|
+
},
|
|
7002
|
+
"displayFulfillmentStatus": {
|
|
7003
|
+
"description": "The fulfillment status of the order.",
|
|
7004
|
+
"type": "string",
|
|
7005
|
+
"graphqlPath": "displayFulfillmentStatus"
|
|
7006
|
+
},
|
|
7007
|
+
"confirmed": {
|
|
7008
|
+
"description": "Whether the order is confirmed.",
|
|
7009
|
+
"type": "bool",
|
|
7010
|
+
"graphqlPath": "confirmed"
|
|
7011
|
+
},
|
|
7012
|
+
"closed": {
|
|
7013
|
+
"description": "Whether the order is closed.",
|
|
7014
|
+
"type": "bool",
|
|
7015
|
+
"graphqlPath": "closed"
|
|
7016
|
+
},
|
|
7017
|
+
"cancelledAt": {
|
|
7018
|
+
"description": "The date and time when the order was cancelled.",
|
|
7019
|
+
"type": "timestamp",
|
|
7020
|
+
"graphqlPath": "cancelledAt"
|
|
7021
|
+
},
|
|
7022
|
+
"cancelReason": {
|
|
7023
|
+
"description": "The reason for cancellation.",
|
|
7024
|
+
"type": "string",
|
|
7025
|
+
"graphqlPath": "cancelReason"
|
|
7026
|
+
},
|
|
7027
|
+
"currencyCode": {
|
|
7028
|
+
"description": "The currency of the order.",
|
|
7029
|
+
"type": "string",
|
|
7030
|
+
"graphqlPath": "currencyCode"
|
|
7031
|
+
},
|
|
7032
|
+
"subtotalPrice": {
|
|
7033
|
+
"description": "The subtotal price of the order.",
|
|
7034
|
+
"type": "float",
|
|
7035
|
+
"graphqlPath": "subtotalPriceSet { shopMoney { amount } }"
|
|
7036
|
+
},
|
|
7037
|
+
"totalPrice": {
|
|
7038
|
+
"description": "The total price of the order.",
|
|
7039
|
+
"type": "float",
|
|
7040
|
+
"graphqlPath": "totalPriceSet { shopMoney { amount } }"
|
|
7041
|
+
},
|
|
7042
|
+
"totalTax": {
|
|
7043
|
+
"description": "The total tax of the order.",
|
|
7044
|
+
"type": "float",
|
|
7045
|
+
"graphqlPath": "totalTaxSet { shopMoney { amount } }"
|
|
7046
|
+
},
|
|
7047
|
+
"totalShippingPrice": {
|
|
7048
|
+
"description": "The total shipping price.",
|
|
7049
|
+
"type": "float",
|
|
7050
|
+
"graphqlPath": "totalShippingPriceSet { shopMoney { amount } }"
|
|
7051
|
+
},
|
|
7052
|
+
"totalDiscounts": {
|
|
7053
|
+
"description": "The total discounts applied.",
|
|
7054
|
+
"type": "float",
|
|
7055
|
+
"graphqlPath": "totalDiscountsSet { shopMoney { amount } }"
|
|
7056
|
+
},
|
|
7057
|
+
"totalRefunded": {
|
|
7058
|
+
"description": "The total amount refunded.",
|
|
7059
|
+
"type": "float",
|
|
7060
|
+
"graphqlPath": "totalRefundedSet { shopMoney { amount } }"
|
|
7061
|
+
},
|
|
7062
|
+
"totalWeight": {
|
|
7063
|
+
"description": "The total weight of the order.",
|
|
7064
|
+
"type": "float",
|
|
7065
|
+
"graphqlPath": "totalWeight"
|
|
7066
|
+
},
|
|
7067
|
+
"fullyPaid": {
|
|
7068
|
+
"description": "Whether the order is fully paid.",
|
|
7069
|
+
"type": "bool",
|
|
7070
|
+
"graphqlPath": "fullyPaid"
|
|
7071
|
+
},
|
|
7072
|
+
"taxesIncluded": {
|
|
7073
|
+
"description": "Whether taxes are included in the order subtotal.",
|
|
7074
|
+
"type": "bool",
|
|
7075
|
+
"graphqlPath": "taxesIncluded"
|
|
7076
|
+
},
|
|
7077
|
+
"taxExempt": {
|
|
7078
|
+
"description": "Whether the order is tax exempt.",
|
|
7079
|
+
"type": "bool",
|
|
7080
|
+
"graphqlPath": "taxExempt"
|
|
7081
|
+
},
|
|
7082
|
+
"customerId": {
|
|
7083
|
+
"description": "The ID of the customer.",
|
|
7084
|
+
"type": "string",
|
|
7085
|
+
"graphqlPath": "customer { id }"
|
|
7086
|
+
},
|
|
7087
|
+
"customerEmail": {
|
|
7088
|
+
"description": "The email of the customer.",
|
|
7089
|
+
"type": "string",
|
|
7090
|
+
"graphqlPath": "customer { email }"
|
|
7091
|
+
},
|
|
7092
|
+
"shippingAddressCity": {
|
|
7093
|
+
"description": "City from the shipping address.",
|
|
7094
|
+
"type": "string",
|
|
7095
|
+
"graphqlPath": "shippingAddress { city }"
|
|
7096
|
+
},
|
|
7097
|
+
"shippingAddressCountry": {
|
|
7098
|
+
"description": "Country from the shipping address.",
|
|
7099
|
+
"type": "string",
|
|
7100
|
+
"graphqlPath": "shippingAddress { country }"
|
|
7101
|
+
},
|
|
7102
|
+
"shippingAddressProvince": {
|
|
7103
|
+
"description": "Province from the shipping address.",
|
|
7104
|
+
"type": "string",
|
|
7105
|
+
"graphqlPath": "shippingAddress { province }"
|
|
7106
|
+
},
|
|
7107
|
+
"shippingAddressZip": {
|
|
7108
|
+
"description": "Postal/ZIP code from the shipping address.",
|
|
7109
|
+
"type": "string",
|
|
7110
|
+
"graphqlPath": "shippingAddress { zip }"
|
|
7111
|
+
},
|
|
7112
|
+
"billingAddressCity": {
|
|
7113
|
+
"description": "City from the billing address.",
|
|
7114
|
+
"type": "string",
|
|
7115
|
+
"graphqlPath": "billingAddress { city }"
|
|
7116
|
+
},
|
|
7117
|
+
"billingAddressCountry": {
|
|
7118
|
+
"description": "Country from the billing address.",
|
|
7119
|
+
"type": "string",
|
|
7120
|
+
"graphqlPath": "billingAddress { country }"
|
|
7121
|
+
},
|
|
7122
|
+
"billingAddressProvince": {
|
|
7123
|
+
"description": "Province from the billing address.",
|
|
7124
|
+
"type": "string",
|
|
7125
|
+
"graphqlPath": "billingAddress { province }"
|
|
7126
|
+
},
|
|
7127
|
+
"billingAddressZip": {
|
|
7128
|
+
"description": "Postal/ZIP code from the billing address.",
|
|
7129
|
+
"type": "string",
|
|
7130
|
+
"graphqlPath": "billingAddress { zip }"
|
|
7131
|
+
},
|
|
7132
|
+
"tags": {
|
|
7133
|
+
"description": "A comma-separated list of tags.",
|
|
7134
|
+
"type": "string",
|
|
7135
|
+
"graphqlPath": "tags"
|
|
7136
|
+
},
|
|
7137
|
+
"note": {
|
|
7138
|
+
"description": "The note attached to the order.",
|
|
7139
|
+
"type": "string",
|
|
7140
|
+
"graphqlPath": "note"
|
|
7141
|
+
},
|
|
7142
|
+
"sourceName": {
|
|
7143
|
+
"description": "The source of the order.",
|
|
7144
|
+
"type": "string",
|
|
7145
|
+
"graphqlPath": "sourceName"
|
|
7146
|
+
},
|
|
7147
|
+
"processedAt": {
|
|
7148
|
+
"description": "The date and time when the order was processed.",
|
|
7149
|
+
"type": "timestamp",
|
|
7150
|
+
"graphqlPath": "processedAt"
|
|
7151
|
+
},
|
|
7152
|
+
"closedAt": {
|
|
7153
|
+
"description": "The date and time when the order was closed.",
|
|
7154
|
+
"type": "timestamp",
|
|
7155
|
+
"graphqlPath": "closedAt"
|
|
7156
|
+
},
|
|
7157
|
+
"createdAt": {
|
|
7158
|
+
"description": "The date and time when the order was created.",
|
|
7159
|
+
"type": "timestamp",
|
|
7160
|
+
"graphqlPath": "createdAt"
|
|
7161
|
+
},
|
|
7162
|
+
"updatedAt": {
|
|
7163
|
+
"description": "The date and time when the order was last updated.",
|
|
7164
|
+
"type": "timestamp",
|
|
7165
|
+
"graphqlPath": "updatedAt"
|
|
7166
|
+
}
|
|
7167
|
+
};
|
|
7168
|
+
var metafieldsFields = {
|
|
7169
|
+
"id": {
|
|
7170
|
+
"description": "A globally-unique ID.",
|
|
7171
|
+
"type": "string",
|
|
7172
|
+
"graphqlPath": "id"
|
|
7173
|
+
},
|
|
7174
|
+
"namespace": {
|
|
7175
|
+
"description": "The namespace of the metafield.",
|
|
7176
|
+
"type": "string",
|
|
7177
|
+
"graphqlPath": "namespace"
|
|
7178
|
+
},
|
|
7179
|
+
"key": {
|
|
7180
|
+
"description": "The key of the metafield.",
|
|
7181
|
+
"type": "string",
|
|
7182
|
+
"graphqlPath": "key"
|
|
7183
|
+
},
|
|
7184
|
+
"value": {
|
|
7185
|
+
"description": "The value of the metafield.",
|
|
7186
|
+
"type": "string",
|
|
7187
|
+
"graphqlPath": "value"
|
|
7188
|
+
},
|
|
7189
|
+
"type": {
|
|
7190
|
+
"description": "The type of the metafield.",
|
|
7191
|
+
"type": "string",
|
|
7192
|
+
"graphqlPath": "type"
|
|
7193
|
+
},
|
|
7194
|
+
"ownerId": {
|
|
7195
|
+
"description": "The ID of the owner resource.",
|
|
7196
|
+
"type": "string"
|
|
7197
|
+
},
|
|
7198
|
+
"ownerType": {
|
|
7199
|
+
"description": "The type of the owner resource.",
|
|
7200
|
+
"type": "string",
|
|
7201
|
+
"graphqlPath": "ownerType"
|
|
7202
|
+
},
|
|
7203
|
+
"createdAt": {
|
|
7204
|
+
"description": "The date and time when the metafield was created.",
|
|
7205
|
+
"type": "timestamp",
|
|
7206
|
+
"graphqlPath": "createdAt"
|
|
7207
|
+
},
|
|
7208
|
+
"updatedAt": {
|
|
7209
|
+
"description": "The date and time when the metafield was last updated.",
|
|
7210
|
+
"type": "timestamp",
|
|
7211
|
+
"graphqlPath": "updatedAt"
|
|
7212
|
+
}
|
|
7213
|
+
};
|
|
7214
|
+
var locationsFields = {
|
|
7215
|
+
"id": {
|
|
7216
|
+
"description": "A globally-unique ID.",
|
|
7217
|
+
"type": "string",
|
|
7218
|
+
"graphqlPath": "id"
|
|
7219
|
+
},
|
|
7220
|
+
"name": {
|
|
7221
|
+
"description": "The name of the location.",
|
|
7222
|
+
"type": "string",
|
|
7223
|
+
"graphqlPath": "name"
|
|
7224
|
+
},
|
|
7225
|
+
"isActive": {
|
|
7226
|
+
"description": "Whether the location is active.",
|
|
7227
|
+
"type": "bool",
|
|
7228
|
+
"graphqlPath": "isActive"
|
|
7229
|
+
},
|
|
7230
|
+
"isPrimary": {
|
|
7231
|
+
"description": "Whether the location is the primary location.",
|
|
7232
|
+
"type": "bool",
|
|
7233
|
+
"graphqlPath": "isPrimary"
|
|
7234
|
+
},
|
|
7235
|
+
"isFulfillmentService": {
|
|
7236
|
+
"description": "Whether the location is a fulfillment service location.",
|
|
7237
|
+
"type": "bool",
|
|
7238
|
+
"graphqlPath": "isFulfillmentService"
|
|
7239
|
+
},
|
|
7240
|
+
"fulfillsOnlineOrders": {
|
|
7241
|
+
"description": "Whether the location can fulfill online orders.",
|
|
7242
|
+
"type": "bool",
|
|
7243
|
+
"graphqlPath": "fulfillsOnlineOrders"
|
|
7244
|
+
},
|
|
7245
|
+
"hasActiveInventory": {
|
|
7246
|
+
"description": "Whether the location has active inventory.",
|
|
7247
|
+
"type": "bool",
|
|
7248
|
+
"graphqlPath": "hasActiveInventory"
|
|
7249
|
+
},
|
|
7250
|
+
"shipsInventory": {
|
|
7251
|
+
"description": "Whether the location ships inventory.",
|
|
7252
|
+
"type": "bool",
|
|
7253
|
+
"graphqlPath": "shipsInventory"
|
|
7254
|
+
},
|
|
7255
|
+
"addressLine1": {
|
|
7256
|
+
"description": "The first line of the address.",
|
|
7257
|
+
"type": "string",
|
|
7258
|
+
"graphqlPath": "address { address1 }"
|
|
7259
|
+
},
|
|
7260
|
+
"addressLine2": {
|
|
7261
|
+
"description": "The second line of the address.",
|
|
7262
|
+
"type": "string",
|
|
7263
|
+
"graphqlPath": "address { address2 }"
|
|
7264
|
+
},
|
|
7265
|
+
"city": {
|
|
7266
|
+
"description": "The city of the location.",
|
|
7267
|
+
"type": "string",
|
|
7268
|
+
"graphqlPath": "address { city }"
|
|
7269
|
+
},
|
|
7270
|
+
"province": {
|
|
7271
|
+
"description": "The province or state of the location.",
|
|
7272
|
+
"type": "string",
|
|
7273
|
+
"graphqlPath": "address { province }"
|
|
7274
|
+
},
|
|
7275
|
+
"provinceCode": {
|
|
7276
|
+
"description": "The province or state code.",
|
|
7277
|
+
"type": "string",
|
|
7278
|
+
"graphqlPath": "address { provinceCode }"
|
|
7279
|
+
},
|
|
7280
|
+
"country": {
|
|
7281
|
+
"description": "The country of the location.",
|
|
7282
|
+
"type": "string",
|
|
7283
|
+
"graphqlPath": "address { country }"
|
|
7284
|
+
},
|
|
7285
|
+
"countryCode": {
|
|
7286
|
+
"description": "The country code of the location.",
|
|
7287
|
+
"type": "string",
|
|
7288
|
+
"graphqlPath": "address { countryCode }"
|
|
7289
|
+
},
|
|
7290
|
+
"zip": {
|
|
7291
|
+
"description": "The postal or ZIP code.",
|
|
7292
|
+
"type": "string",
|
|
7293
|
+
"graphqlPath": "address { zip }"
|
|
7294
|
+
},
|
|
7295
|
+
"phone": {
|
|
7296
|
+
"description": "The phone number of the location.",
|
|
7297
|
+
"type": "string",
|
|
7298
|
+
"graphqlPath": "address { phone }"
|
|
7299
|
+
},
|
|
7300
|
+
"createdAt": {
|
|
7301
|
+
"description": "The date and time when the location was created.",
|
|
7302
|
+
"type": "timestamp",
|
|
7303
|
+
"graphqlPath": "createdAt"
|
|
7304
|
+
},
|
|
7305
|
+
"updatedAt": {
|
|
7306
|
+
"description": "The date and time when the location was last updated.",
|
|
7307
|
+
"type": "timestamp",
|
|
7308
|
+
"graphqlPath": "updatedAt"
|
|
7309
|
+
}
|
|
7310
|
+
};
|
|
7311
|
+
var inventoryItemsFields = {
|
|
7312
|
+
"id": {
|
|
7313
|
+
"description": "A globally-unique ID.",
|
|
7314
|
+
"type": "string",
|
|
7315
|
+
"graphqlPath": "id"
|
|
7316
|
+
},
|
|
7317
|
+
"sku": {
|
|
7318
|
+
"description": "The unique SKU (stock keeping unit) of the inventory item.",
|
|
7319
|
+
"type": "string",
|
|
7320
|
+
"graphqlPath": "sku"
|
|
7321
|
+
},
|
|
7322
|
+
"tracked": {
|
|
7323
|
+
"description": "Whether inventory levels are tracked for the item.",
|
|
7324
|
+
"type": "bool",
|
|
7325
|
+
"graphqlPath": "tracked"
|
|
7326
|
+
},
|
|
7327
|
+
"requiresShipping": {
|
|
7328
|
+
"description": "Whether the item requires shipping.",
|
|
7329
|
+
"type": "bool",
|
|
7330
|
+
"graphqlPath": "requiresShipping"
|
|
7331
|
+
},
|
|
7332
|
+
"harmonizedSystemCode": {
|
|
7333
|
+
"description": "The harmonized system code of the item.",
|
|
7334
|
+
"type": "string",
|
|
7335
|
+
"graphqlPath": "harmonizedSystemCode"
|
|
7336
|
+
},
|
|
7337
|
+
"countryCodeOfOrigin": {
|
|
7338
|
+
"description": "The ISO 3166-1 alpha-2 country code of where the item originated from.",
|
|
7339
|
+
"type": "string",
|
|
7340
|
+
"graphqlPath": "countryCodeOfOrigin"
|
|
7341
|
+
},
|
|
7342
|
+
"variantId": {
|
|
7343
|
+
"description": "The ID of the variant associated with this inventory item.",
|
|
7344
|
+
"type": "string",
|
|
7345
|
+
"graphqlPath": "variant { id }"
|
|
7346
|
+
},
|
|
7347
|
+
"createdAt": {
|
|
7348
|
+
"description": "The date and time when the inventory item was created.",
|
|
7349
|
+
"type": "timestamp",
|
|
7350
|
+
"graphqlPath": "createdAt"
|
|
7351
|
+
},
|
|
7352
|
+
"updatedAt": {
|
|
7353
|
+
"description": "The date and time when the inventory item was last updated.",
|
|
7354
|
+
"type": "timestamp",
|
|
7355
|
+
"graphqlPath": "updatedAt"
|
|
7356
|
+
}
|
|
7357
|
+
};
|
|
7358
|
+
var fulfillmentOrdersFields = {
|
|
7359
|
+
"id": {
|
|
7360
|
+
"description": "A globally-unique ID.",
|
|
7361
|
+
"type": "string",
|
|
7362
|
+
"graphqlPath": "id"
|
|
7363
|
+
},
|
|
7364
|
+
"status": {
|
|
7365
|
+
"description": "The status of the fulfillment order.",
|
|
7366
|
+
"type": "string",
|
|
7367
|
+
"graphqlPath": "status"
|
|
7368
|
+
},
|
|
7369
|
+
"requestStatus": {
|
|
7370
|
+
"description": "The request status of the fulfillment order.",
|
|
7371
|
+
"type": "string",
|
|
7372
|
+
"graphqlPath": "requestStatus"
|
|
7373
|
+
},
|
|
7374
|
+
"orderId": {
|
|
7375
|
+
"description": "The ID of the order associated with this fulfillment order.",
|
|
7376
|
+
"type": "string",
|
|
7377
|
+
"graphqlPath": "order { id }"
|
|
7378
|
+
},
|
|
7379
|
+
"orderName": {
|
|
7380
|
+
"description": "The name of the order.",
|
|
7381
|
+
"type": "string",
|
|
7382
|
+
"graphqlPath": "order { name }"
|
|
7383
|
+
},
|
|
7384
|
+
"assignedLocationId": {
|
|
7385
|
+
"description": "The ID of the location assigned to fulfill this order.",
|
|
7386
|
+
"type": "string",
|
|
7387
|
+
"graphqlPath": "assignedLocation { location { id } }"
|
|
7388
|
+
},
|
|
7389
|
+
"assignedLocationName": {
|
|
7390
|
+
"description": "The name of the assigned location.",
|
|
7391
|
+
"type": "string",
|
|
7392
|
+
"graphqlPath": "assignedLocation { location { name } }"
|
|
7393
|
+
},
|
|
7394
|
+
"fulfillAt": {
|
|
7395
|
+
"description": "The date and time at which the fulfillment order will be ready to be fulfilled.",
|
|
7396
|
+
"type": "timestamp",
|
|
7397
|
+
"graphqlPath": "fulfillAt"
|
|
7398
|
+
},
|
|
7399
|
+
"deliveryMethod": {
|
|
7400
|
+
"description": "The delivery method of the fulfillment order.",
|
|
7401
|
+
"type": "string",
|
|
7402
|
+
"graphqlPath": "deliveryMethod { methodType }"
|
|
7403
|
+
},
|
|
7404
|
+
"createdAt": {
|
|
7405
|
+
"description": "The date and time when the fulfillment order was created.",
|
|
7406
|
+
"type": "timestamp",
|
|
7407
|
+
"graphqlPath": "createdAt"
|
|
7408
|
+
},
|
|
7409
|
+
"updatedAt": {
|
|
7410
|
+
"description": "The date and time when the fulfillment order was last updated.",
|
|
7411
|
+
"type": "timestamp",
|
|
7412
|
+
"graphqlPath": "updatedAt"
|
|
7413
|
+
}
|
|
7414
|
+
};
|
|
7415
|
+
var discountCodesFields = {
|
|
7416
|
+
"id": {
|
|
7417
|
+
"description": "A globally-unique ID.",
|
|
7418
|
+
"type": "string",
|
|
7419
|
+
"graphqlPath": "id"
|
|
7420
|
+
},
|
|
7421
|
+
"code": {
|
|
7422
|
+
"description": "The discount code string.",
|
|
7423
|
+
"type": "string",
|
|
7424
|
+
"graphqlPath": "codes(first: 1) { nodes { code } }",
|
|
7425
|
+
"isUnionField": true
|
|
7426
|
+
},
|
|
7427
|
+
"discountType": {
|
|
7428
|
+
"description": "The type of discount (DiscountCodeBasic, DiscountCodeBxgy, DiscountCodeFreeShipping).",
|
|
7429
|
+
"type": "string",
|
|
7430
|
+
"graphqlPath": "__typename",
|
|
7431
|
+
"isUnionField": true
|
|
7432
|
+
},
|
|
7433
|
+
"title": {
|
|
7434
|
+
"description": "The title of the discount.",
|
|
7435
|
+
"type": "string",
|
|
7436
|
+
"graphqlPath": "title",
|
|
7437
|
+
"isUnionField": true
|
|
7438
|
+
},
|
|
7439
|
+
"status": {
|
|
7440
|
+
"description": "The status of the discount.",
|
|
7441
|
+
"type": "string",
|
|
7442
|
+
"graphqlPath": "status",
|
|
7443
|
+
"isUnionField": true
|
|
7444
|
+
},
|
|
7445
|
+
"startsAt": {
|
|
7446
|
+
"description": "The date and time when the discount becomes active.",
|
|
7447
|
+
"type": "timestamp",
|
|
7448
|
+
"graphqlPath": "startsAt",
|
|
7449
|
+
"isUnionField": true
|
|
7450
|
+
},
|
|
7451
|
+
"endsAt": {
|
|
7452
|
+
"description": "The date and time when the discount expires.",
|
|
7453
|
+
"type": "timestamp",
|
|
7454
|
+
"graphqlPath": "endsAt",
|
|
7455
|
+
"isUnionField": true
|
|
7456
|
+
},
|
|
7457
|
+
"usageLimit": {
|
|
7458
|
+
"description": "The maximum number of times the discount can be used.",
|
|
7459
|
+
"type": "int32",
|
|
7460
|
+
"graphqlPath": "usageLimit",
|
|
7461
|
+
"isUnionField": true
|
|
7462
|
+
},
|
|
7463
|
+
"appliesOncePerCustomer": {
|
|
7464
|
+
"description": "Whether the discount can only be used once per customer.",
|
|
7465
|
+
"type": "bool",
|
|
7466
|
+
"graphqlPath": "appliesOncePerCustomer",
|
|
7467
|
+
"isUnionField": true
|
|
7468
|
+
},
|
|
7469
|
+
"asyncUsageCount": {
|
|
7470
|
+
"description": "The number of times the discount has been used.",
|
|
7471
|
+
"type": "int32",
|
|
7472
|
+
"graphqlPath": "asyncUsageCount",
|
|
7473
|
+
"isUnionField": true
|
|
7474
|
+
},
|
|
7475
|
+
"createdAt": {
|
|
7476
|
+
"description": "The date and time when the discount was created.",
|
|
7477
|
+
"type": "timestamp",
|
|
7478
|
+
"graphqlPath": "createdAt",
|
|
7479
|
+
"isUnionField": true
|
|
7480
|
+
},
|
|
7481
|
+
"updatedAt": {
|
|
7482
|
+
"description": "The date and time when the discount was last updated.",
|
|
7483
|
+
"type": "timestamp",
|
|
7484
|
+
"graphqlPath": "updatedAt",
|
|
7485
|
+
"isUnionField": true
|
|
7486
|
+
}
|
|
7487
|
+
};
|
|
7488
|
+
var customersFields = {
|
|
7489
|
+
"id": {
|
|
7490
|
+
"description": "A globally-unique ID.",
|
|
7491
|
+
"type": "string",
|
|
7492
|
+
"graphqlPath": "id"
|
|
7493
|
+
},
|
|
7494
|
+
"firstName": {
|
|
7495
|
+
"description": "The customer first name.",
|
|
7496
|
+
"type": "string",
|
|
7497
|
+
"graphqlPath": "firstName"
|
|
7498
|
+
},
|
|
7499
|
+
"lastName": {
|
|
7500
|
+
"description": "The customer last name.",
|
|
7501
|
+
"type": "string",
|
|
7502
|
+
"graphqlPath": "lastName"
|
|
7503
|
+
},
|
|
7504
|
+
"displayName": {
|
|
7505
|
+
"description": "The full name of the customer.",
|
|
7506
|
+
"type": "string",
|
|
7507
|
+
"graphqlPath": "displayName"
|
|
7508
|
+
},
|
|
7509
|
+
"email": {
|
|
7510
|
+
"description": "The customer email address.",
|
|
7511
|
+
"type": "string",
|
|
7512
|
+
"graphqlPath": "email"
|
|
7513
|
+
},
|
|
7514
|
+
"phone": {
|
|
7515
|
+
"description": "The customer phone number.",
|
|
7516
|
+
"type": "string",
|
|
7517
|
+
"graphqlPath": "phone"
|
|
7518
|
+
},
|
|
7519
|
+
"state": {
|
|
7520
|
+
"description": "The state of the customer account.",
|
|
7521
|
+
"type": "string",
|
|
7522
|
+
"graphqlPath": "state"
|
|
7523
|
+
},
|
|
7524
|
+
"locale": {
|
|
7525
|
+
"description": "The customer locale.",
|
|
7526
|
+
"type": "string",
|
|
7527
|
+
"graphqlPath": "locale"
|
|
7528
|
+
},
|
|
7529
|
+
"taxExempt": {
|
|
7530
|
+
"description": "Whether the customer is exempt from being charged taxes.",
|
|
7531
|
+
"type": "bool",
|
|
7532
|
+
"graphqlPath": "taxExempt"
|
|
7533
|
+
},
|
|
7534
|
+
"verifiedEmail": {
|
|
7535
|
+
"description": "Whether the customer has verified their email.",
|
|
7536
|
+
"type": "bool",
|
|
7537
|
+
"graphqlPath": "verifiedEmail"
|
|
7538
|
+
},
|
|
7539
|
+
"emailMarketingConsentState": {
|
|
7540
|
+
"description": "The current email marketing state for the customer.",
|
|
7541
|
+
"type": "string",
|
|
7542
|
+
"graphqlPath": "emailMarketingConsent { marketingState }"
|
|
7543
|
+
},
|
|
7544
|
+
"smsMarketingConsentState": {
|
|
7545
|
+
"description": "The current SMS marketing state for the customer.",
|
|
7546
|
+
"type": "string",
|
|
7547
|
+
"graphqlPath": "smsMarketingConsent { marketingState }"
|
|
7548
|
+
},
|
|
7549
|
+
"numberOfOrders": {
|
|
7550
|
+
"description": "The number of orders associated with this customer.",
|
|
7551
|
+
"type": "int32",
|
|
7552
|
+
"graphqlPath": "numberOfOrders"
|
|
7553
|
+
},
|
|
7554
|
+
"amountSpent": {
|
|
7555
|
+
"description": "The total amount spent by the customer (JSON string with amount and currencyCode).",
|
|
7556
|
+
"type": "string",
|
|
7557
|
+
"graphqlPath": "amountSpent { amount currencyCode }"
|
|
7558
|
+
},
|
|
7559
|
+
"tags": {
|
|
7560
|
+
"description": "A comma-separated list of tags associated with the customer.",
|
|
7561
|
+
"type": "string",
|
|
7562
|
+
"graphqlPath": "tags"
|
|
7563
|
+
},
|
|
7564
|
+
"note": {
|
|
7565
|
+
"description": "A note about the customer.",
|
|
7566
|
+
"type": "string",
|
|
7567
|
+
"graphqlPath": "note"
|
|
7568
|
+
},
|
|
7569
|
+
"defaultAddressCity": {
|
|
7570
|
+
"description": "City from the default address.",
|
|
7571
|
+
"type": "string",
|
|
7572
|
+
"graphqlPath": "defaultAddress { city }"
|
|
7573
|
+
},
|
|
7574
|
+
"defaultAddressCountry": {
|
|
7575
|
+
"description": "Country from the default address.",
|
|
7576
|
+
"type": "string",
|
|
7577
|
+
"graphqlPath": "defaultAddress { country }"
|
|
7578
|
+
},
|
|
7579
|
+
"defaultAddressProvince": {
|
|
7580
|
+
"description": "Province from the default address.",
|
|
7581
|
+
"type": "string",
|
|
7582
|
+
"graphqlPath": "defaultAddress { province }"
|
|
7583
|
+
},
|
|
7584
|
+
"defaultAddressZip": {
|
|
7585
|
+
"description": "Postal/ZIP code from the default address.",
|
|
7586
|
+
"type": "string",
|
|
7587
|
+
"graphqlPath": "defaultAddress { zip }"
|
|
7588
|
+
},
|
|
7589
|
+
"createdAt": {
|
|
7590
|
+
"description": "The date and time when the customer was created.",
|
|
7591
|
+
"type": "timestamp",
|
|
7592
|
+
"graphqlPath": "createdAt"
|
|
7593
|
+
},
|
|
7594
|
+
"updatedAt": {
|
|
7595
|
+
"description": "The date and time when the customer was last updated.",
|
|
7596
|
+
"type": "timestamp",
|
|
7597
|
+
"graphqlPath": "updatedAt"
|
|
7598
|
+
}
|
|
7599
|
+
};
|
|
7600
|
+
var collectionsFields = {
|
|
7601
|
+
"id": {
|
|
7602
|
+
"description": "A globally-unique ID.",
|
|
7603
|
+
"type": "string",
|
|
7604
|
+
"graphqlPath": "id"
|
|
7605
|
+
},
|
|
7606
|
+
"title": {
|
|
7607
|
+
"description": "The title of the collection.",
|
|
7608
|
+
"type": "string",
|
|
7609
|
+
"graphqlPath": "title"
|
|
7610
|
+
},
|
|
7611
|
+
"handle": {
|
|
7612
|
+
"description": "A unique, human-friendly string for the collection URL.",
|
|
7613
|
+
"type": "string",
|
|
7614
|
+
"graphqlPath": "handle"
|
|
7615
|
+
},
|
|
7616
|
+
"description": {
|
|
7617
|
+
"description": "The description of the collection, including any HTML tags and formatting.",
|
|
7618
|
+
"type": "string",
|
|
7619
|
+
"graphqlPath": "description"
|
|
7620
|
+
},
|
|
7621
|
+
"descriptionHtml": {
|
|
7622
|
+
"description": "The description of the collection in HTML format.",
|
|
7623
|
+
"type": "string",
|
|
7624
|
+
"graphqlPath": "descriptionHtml"
|
|
7625
|
+
},
|
|
7626
|
+
"sortOrder": {
|
|
7627
|
+
"description": "The order in which the products in the collection are displayed.",
|
|
7628
|
+
"type": "string",
|
|
7629
|
+
"graphqlPath": "sortOrder"
|
|
7630
|
+
},
|
|
7631
|
+
"templateSuffix": {
|
|
7632
|
+
"description": "The name of the template the collection is using.",
|
|
7633
|
+
"type": "string",
|
|
7634
|
+
"graphqlPath": "templateSuffix"
|
|
7635
|
+
},
|
|
7636
|
+
"productsCount": {
|
|
7637
|
+
"description": "The number of products in the collection.",
|
|
7638
|
+
"type": "int32",
|
|
7639
|
+
"graphqlPath": "productsCount { count }"
|
|
7640
|
+
},
|
|
7641
|
+
"imageUrl": {
|
|
7642
|
+
"description": "The URL of the image associated with the collection.",
|
|
7643
|
+
"type": "string",
|
|
7644
|
+
"graphqlPath": "image { url }"
|
|
7645
|
+
},
|
|
7646
|
+
"updatedAt": {
|
|
7647
|
+
"description": "The date and time when the collection was last updated.",
|
|
7648
|
+
"type": "timestamp",
|
|
7649
|
+
"graphqlPath": "updatedAt"
|
|
7650
|
+
}
|
|
7651
|
+
};
|
|
7652
|
+
var blogsFields = {
|
|
7653
|
+
"id": {
|
|
7654
|
+
"description": "A globally-unique ID.",
|
|
7655
|
+
"type": "string",
|
|
7656
|
+
"graphqlPath": "id"
|
|
7657
|
+
},
|
|
7658
|
+
"title": {
|
|
7659
|
+
"description": "The title of the blog.",
|
|
7660
|
+
"type": "string",
|
|
7661
|
+
"graphqlPath": "title"
|
|
7662
|
+
},
|
|
7663
|
+
"handle": {
|
|
7664
|
+
"description": "A unique, human-friendly string for the blog URL.",
|
|
7665
|
+
"type": "string",
|
|
7666
|
+
"graphqlPath": "handle"
|
|
7667
|
+
},
|
|
7668
|
+
"templateSuffix": {
|
|
7669
|
+
"description": "The name of the template the blog is using.",
|
|
7670
|
+
"type": "string",
|
|
7671
|
+
"graphqlPath": "templateSuffix"
|
|
7672
|
+
},
|
|
7673
|
+
"createdAt": {
|
|
7674
|
+
"description": "The date and time when the blog was created.",
|
|
7675
|
+
"type": "timestamp",
|
|
7676
|
+
"graphqlPath": "createdAt"
|
|
7677
|
+
},
|
|
7678
|
+
"updatedAt": {
|
|
7679
|
+
"description": "The date and time when the blog was last updated.",
|
|
7680
|
+
"type": "timestamp",
|
|
7681
|
+
"graphqlPath": "updatedAt"
|
|
7682
|
+
}
|
|
7683
|
+
};
|
|
7684
|
+
var articlesFields = {
|
|
7685
|
+
"id": {
|
|
7686
|
+
"description": "A globally-unique ID.",
|
|
7687
|
+
"type": "string",
|
|
7688
|
+
"graphqlPath": "id"
|
|
7689
|
+
},
|
|
7690
|
+
"title": {
|
|
7691
|
+
"description": "The title of the article.",
|
|
7692
|
+
"type": "string",
|
|
7693
|
+
"graphqlPath": "title"
|
|
7694
|
+
},
|
|
7695
|
+
"handle": {
|
|
7696
|
+
"description": "A unique, human-friendly string for the article URL.",
|
|
7697
|
+
"type": "string",
|
|
7698
|
+
"graphqlPath": "handle"
|
|
7699
|
+
},
|
|
7700
|
+
"body": {
|
|
7701
|
+
"description": "The text of the article body, complete with HTML markup.",
|
|
7702
|
+
"type": "string",
|
|
7703
|
+
"graphqlPath": "body"
|
|
7704
|
+
},
|
|
7705
|
+
"summary": {
|
|
7706
|
+
"description": "A summary of the article, which can include HTML markup.",
|
|
7707
|
+
"type": "string",
|
|
7708
|
+
"graphqlPath": "summary"
|
|
7709
|
+
},
|
|
7710
|
+
"authorName": {
|
|
7711
|
+
"description": "The name of the author of the article.",
|
|
7712
|
+
"type": "string",
|
|
7713
|
+
"graphqlPath": "author { name }"
|
|
7714
|
+
},
|
|
7715
|
+
"blogId": {
|
|
7716
|
+
"description": "The ID of the blog containing the article.",
|
|
7717
|
+
"type": "string",
|
|
7718
|
+
"graphqlPath": "blog { id }"
|
|
7719
|
+
},
|
|
7720
|
+
"blogTitle": {
|
|
7721
|
+
"description": "The title of the blog containing the article.",
|
|
7722
|
+
"type": "string",
|
|
7723
|
+
"graphqlPath": "blog { title }"
|
|
7724
|
+
},
|
|
7725
|
+
"isPublished": {
|
|
7726
|
+
"description": "Whether or not the article is visible.",
|
|
7727
|
+
"type": "bool",
|
|
7728
|
+
"graphqlPath": "isPublished"
|
|
7729
|
+
},
|
|
7730
|
+
"publishedAt": {
|
|
7731
|
+
"description": "The date and time when the article became or will become visible.",
|
|
7732
|
+
"type": "timestamp",
|
|
7733
|
+
"graphqlPath": "publishedAt"
|
|
7734
|
+
},
|
|
7735
|
+
"tags": {
|
|
7736
|
+
"description": "A comma-separated list of tags.",
|
|
7737
|
+
"type": "string",
|
|
7738
|
+
"graphqlPath": "tags"
|
|
7739
|
+
},
|
|
7740
|
+
"templateSuffix": {
|
|
7741
|
+
"description": "The name of the template the article is using.",
|
|
7742
|
+
"type": "string",
|
|
7743
|
+
"graphqlPath": "templateSuffix"
|
|
7744
|
+
},
|
|
7745
|
+
"imageUrl": {
|
|
7746
|
+
"description": "The URL of the image associated with the article.",
|
|
7747
|
+
"type": "string",
|
|
7748
|
+
"graphqlPath": "image { url }"
|
|
7749
|
+
},
|
|
7750
|
+
"createdAt": {
|
|
7751
|
+
"description": "The date and time when the article was created.",
|
|
7752
|
+
"type": "timestamp",
|
|
7753
|
+
"graphqlPath": "createdAt"
|
|
7754
|
+
},
|
|
7755
|
+
"updatedAt": {
|
|
7756
|
+
"description": "The date and time when the article was last updated.",
|
|
7757
|
+
"type": "timestamp",
|
|
7758
|
+
"graphqlPath": "updatedAt"
|
|
7759
|
+
}
|
|
7760
|
+
};
|
|
7761
|
+
var abandonedCheckoutsFields = {
|
|
7762
|
+
"id": {
|
|
7763
|
+
"description": "A globally-unique ID for the abandoned checkout.",
|
|
7764
|
+
"type": "string",
|
|
7765
|
+
"graphqlPath": "id"
|
|
7766
|
+
},
|
|
7767
|
+
"abandonedCheckoutUrl": {
|
|
7768
|
+
"description": "The URL for the buyer to recover their checkout.",
|
|
7769
|
+
"type": "string",
|
|
7770
|
+
"graphqlPath": "abandonedCheckoutUrl"
|
|
7771
|
+
},
|
|
7772
|
+
"completedAt": {
|
|
7773
|
+
"description": "The date and time when the checkout was completed.",
|
|
7774
|
+
"type": "timestamp",
|
|
7775
|
+
"graphqlPath": "completedAt"
|
|
7776
|
+
},
|
|
7777
|
+
"createdAt": {
|
|
7778
|
+
"description": "The date and time when the checkout was created.",
|
|
7779
|
+
"type": "timestamp",
|
|
7780
|
+
"graphqlPath": "createdAt"
|
|
7781
|
+
},
|
|
7782
|
+
"updatedAt": {
|
|
7783
|
+
"description": "The date and time when the checkout was last updated.",
|
|
7784
|
+
"type": "timestamp",
|
|
7785
|
+
"graphqlPath": "updatedAt"
|
|
7786
|
+
},
|
|
7787
|
+
"defaultCursor": {
|
|
7788
|
+
"description": "A default cursor that returns the single next record, sorted ascending by ID.",
|
|
7789
|
+
"type": "string",
|
|
7790
|
+
"graphqlPath": "defaultCursor"
|
|
7791
|
+
},
|
|
7792
|
+
"lineItemsQuantity": {
|
|
7793
|
+
"description": "The total number of line items in the checkout.",
|
|
7794
|
+
"type": "int32",
|
|
7795
|
+
"graphqlPath": "lineItemsQuantity"
|
|
7796
|
+
},
|
|
7797
|
+
"totalPriceSet": {
|
|
7798
|
+
"description": "The total price of the checkout including taxes, discounts, and shipping (MoneyBag as JSON string).",
|
|
7799
|
+
"type": "string",
|
|
7800
|
+
"graphqlPath": "totalPriceSet { shopMoney { amount currencyCode } }"
|
|
7801
|
+
},
|
|
7802
|
+
"billingAddressCity": {
|
|
7803
|
+
"description": "City from the billing address.",
|
|
7804
|
+
"type": "string",
|
|
7805
|
+
"graphqlPath": "billingAddress { city }"
|
|
7806
|
+
},
|
|
7807
|
+
"billingAddressCountry": {
|
|
7808
|
+
"description": "Country from the billing address.",
|
|
7809
|
+
"type": "string",
|
|
7810
|
+
"graphqlPath": "billingAddress { country }"
|
|
7811
|
+
},
|
|
7812
|
+
"billingAddressProvince": {
|
|
7813
|
+
"description": "Province or state from the billing address.",
|
|
7814
|
+
"type": "string",
|
|
7815
|
+
"graphqlPath": "billingAddress { province }"
|
|
7816
|
+
},
|
|
7817
|
+
"billingAddressZip": {
|
|
7818
|
+
"description": "Postal/ZIP code from the billing address.",
|
|
7819
|
+
"type": "string",
|
|
7820
|
+
"graphqlPath": "billingAddress { zip }"
|
|
7821
|
+
},
|
|
7822
|
+
"shippingAddressCity": {
|
|
7823
|
+
"description": "City from the shipping address.",
|
|
7824
|
+
"type": "string",
|
|
7825
|
+
"graphqlPath": "shippingAddress { city }"
|
|
7826
|
+
},
|
|
7827
|
+
"shippingAddressCountry": {
|
|
7828
|
+
"description": "Country from the shipping address.",
|
|
7829
|
+
"type": "string",
|
|
7830
|
+
"graphqlPath": "shippingAddress { country }"
|
|
7831
|
+
},
|
|
7832
|
+
"shippingAddressProvince": {
|
|
7833
|
+
"description": "Province or state from the shipping address.",
|
|
7834
|
+
"type": "string",
|
|
7835
|
+
"graphqlPath": "shippingAddress { province }"
|
|
7836
|
+
},
|
|
7837
|
+
"shippingAddressZip": {
|
|
7838
|
+
"description": "Postal/ZIP code from the shipping address.",
|
|
7839
|
+
"type": "string",
|
|
7840
|
+
"graphqlPath": "shippingAddress { zip }"
|
|
7841
|
+
},
|
|
7842
|
+
"customerId": {
|
|
7843
|
+
"description": "Customer globally-unique ID.",
|
|
7844
|
+
"type": "string",
|
|
7845
|
+
"graphqlPath": "customer { id }"
|
|
7846
|
+
},
|
|
7847
|
+
"customerFirstName": {
|
|
7848
|
+
"description": "Customer first name.",
|
|
7849
|
+
"type": "string",
|
|
7850
|
+
"graphqlPath": "customer { firstName }"
|
|
7851
|
+
},
|
|
7852
|
+
"customerLastName": {
|
|
7853
|
+
"description": "Customer last name.",
|
|
7854
|
+
"type": "string",
|
|
7855
|
+
"graphqlPath": "customer { lastName }"
|
|
7856
|
+
},
|
|
7857
|
+
"customerEmail": {
|
|
7858
|
+
"description": "Customer email address.",
|
|
7859
|
+
"type": "string",
|
|
7860
|
+
"graphqlPath": "customer { email }"
|
|
7861
|
+
}
|
|
7862
|
+
};
|
|
7863
|
+
var ShopifyAdsFieldsSchema = {
|
|
7864
|
+
"abandoned-checkouts": {
|
|
7865
|
+
"overview": "Abandoned Checkouts",
|
|
7866
|
+
"description": "Lists checkout sessions that did not convert so you can recover them.",
|
|
7867
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/queries/abandonedcheckouts",
|
|
7868
|
+
"fields": abandonedCheckoutsFields,
|
|
7869
|
+
"uniqueKeys": ["id"],
|
|
7870
|
+
"destinationName": "shopify_abandoned_checkouts",
|
|
7871
|
+
"queryName": "abandonedCheckouts",
|
|
7872
|
+
"connectionPath": "abandonedCheckouts",
|
|
7873
|
+
"isTimeSeries": true,
|
|
7874
|
+
"queryFilterTemplate": `query: "updated_at:>='{{startDate}}' AND updated_at:<='{{endDate}}'"`
|
|
7875
|
+
},
|
|
7876
|
+
"articles": {
|
|
7877
|
+
"overview": "Articles",
|
|
7878
|
+
"description": "Articles from the blogging system.",
|
|
7879
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Article",
|
|
7880
|
+
"fields": articlesFields,
|
|
7881
|
+
"uniqueKeys": ["id"],
|
|
7882
|
+
"destinationName": "shopify_articles",
|
|
7883
|
+
"queryName": "articles",
|
|
7884
|
+
"connectionPath": "articles",
|
|
7885
|
+
"isTimeSeries": false
|
|
7886
|
+
},
|
|
7887
|
+
"blogs": {
|
|
7888
|
+
"overview": "Blogs",
|
|
7889
|
+
"description": "Blogs in the store.",
|
|
7890
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Blog",
|
|
7891
|
+
"fields": blogsFields,
|
|
7892
|
+
"uniqueKeys": ["id"],
|
|
7893
|
+
"destinationName": "shopify_blogs",
|
|
7894
|
+
"queryName": "blogs",
|
|
7895
|
+
"connectionPath": "blogs",
|
|
7896
|
+
"isTimeSeries": false
|
|
7897
|
+
},
|
|
7898
|
+
"collections": {
|
|
7899
|
+
"overview": "Collections",
|
|
7900
|
+
"description": "Product collections in the store.",
|
|
7901
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Collection",
|
|
7902
|
+
"fields": collectionsFields,
|
|
7903
|
+
"uniqueKeys": ["id"],
|
|
7904
|
+
"destinationName": "shopify_collections",
|
|
7905
|
+
"queryName": "collections",
|
|
7906
|
+
"connectionPath": "collections",
|
|
7907
|
+
"isTimeSeries": false
|
|
7908
|
+
},
|
|
7909
|
+
"customers": {
|
|
7910
|
+
"overview": "Customers",
|
|
7911
|
+
"description": "Customer accounts in the store.",
|
|
7912
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Customer",
|
|
7913
|
+
"fields": customersFields,
|
|
7914
|
+
"uniqueKeys": ["id"],
|
|
7915
|
+
"destinationName": "shopify_customers",
|
|
7916
|
+
"queryName": "customers",
|
|
7917
|
+
"connectionPath": "customers",
|
|
7918
|
+
"isTimeSeries": true,
|
|
7919
|
+
"queryFilterTemplate": `query: "updated_at:>='{{startDate}}' AND updated_at:<='{{endDate}}'"`
|
|
7920
|
+
},
|
|
7921
|
+
"discount-codes": {
|
|
7922
|
+
"overview": "Discount Codes",
|
|
7923
|
+
"description": "Discount codes and their usage.",
|
|
7924
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/DiscountCodeNode",
|
|
7925
|
+
"fields": discountCodesFields,
|
|
7926
|
+
"uniqueKeys": ["id"],
|
|
7927
|
+
"destinationName": "shopify_discount_codes",
|
|
7928
|
+
"queryName": "codeDiscountNodes",
|
|
7929
|
+
"connectionPath": "codeDiscountNodes",
|
|
7930
|
+
"isTimeSeries": false,
|
|
7931
|
+
"unionField": "codeDiscount",
|
|
7932
|
+
"unionTypes": ["DiscountCodeBasic", "DiscountCodeBxgy", "DiscountCodeFreeShipping"]
|
|
7933
|
+
},
|
|
7934
|
+
"fulfillment-orders": {
|
|
7935
|
+
"overview": "Fulfillment Orders",
|
|
7936
|
+
"description": "Fulfillment orders representing items to be fulfilled from a location.",
|
|
7937
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/FulfillmentOrder",
|
|
7938
|
+
"fields": fulfillmentOrdersFields,
|
|
7939
|
+
"uniqueKeys": ["id"],
|
|
7940
|
+
"destinationName": "shopify_fulfillment_orders",
|
|
7941
|
+
"queryName": "fulfillmentOrders",
|
|
7942
|
+
"connectionPath": "fulfillmentOrders",
|
|
7943
|
+
"isTimeSeries": false
|
|
7944
|
+
},
|
|
7945
|
+
"inventory-items": {
|
|
7946
|
+
"overview": "Inventory Items",
|
|
7947
|
+
"description": "Inventory items representing SKUs.",
|
|
7948
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/InventoryItem",
|
|
7949
|
+
"fields": inventoryItemsFields,
|
|
7950
|
+
"uniqueKeys": ["id"],
|
|
7951
|
+
"destinationName": "shopify_inventory_items",
|
|
7952
|
+
"queryName": "inventoryItems",
|
|
7953
|
+
"connectionPath": "inventoryItems",
|
|
7954
|
+
"isTimeSeries": false
|
|
7955
|
+
},
|
|
7956
|
+
"locations": {
|
|
7957
|
+
"overview": "Locations",
|
|
7958
|
+
"description": "Physical or virtual locations for inventory and fulfillment.",
|
|
7959
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Location",
|
|
7960
|
+
"fields": locationsFields,
|
|
7961
|
+
"uniqueKeys": ["id"],
|
|
7962
|
+
"destinationName": "shopify_locations",
|
|
7963
|
+
"queryName": "locations",
|
|
7964
|
+
"connectionPath": "locations",
|
|
7965
|
+
"isTimeSeries": false
|
|
7966
|
+
},
|
|
7967
|
+
"orders": {
|
|
7968
|
+
"overview": "Orders",
|
|
7969
|
+
"description": "Orders placed in the store.",
|
|
7970
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Order",
|
|
7971
|
+
"fields": ordersFields,
|
|
7972
|
+
"uniqueKeys": ["id"],
|
|
7973
|
+
"destinationName": "shopify_orders",
|
|
7974
|
+
"queryName": "orders",
|
|
7975
|
+
"connectionPath": "orders",
|
|
7976
|
+
"isTimeSeries": true,
|
|
7977
|
+
"queryFilterTemplate": `query: "updated_at:>='{{startDate}}' AND updated_at:<='{{endDate}}'"`
|
|
7978
|
+
},
|
|
7979
|
+
"products": {
|
|
7980
|
+
"overview": "Products",
|
|
7981
|
+
"description": "Products in the store catalog.",
|
|
7982
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Product",
|
|
7983
|
+
"fields": productsFields,
|
|
7984
|
+
"uniqueKeys": ["id"],
|
|
7985
|
+
"destinationName": "shopify_products",
|
|
7986
|
+
"queryName": "products",
|
|
7987
|
+
"connectionPath": "products",
|
|
7988
|
+
"isTimeSeries": true,
|
|
7989
|
+
"queryFilterTemplate": `query: "updated_at:>='{{startDate}}' AND updated_at:<='{{endDate}}'"`
|
|
7990
|
+
},
|
|
7991
|
+
"product-variants": {
|
|
7992
|
+
"overview": "Product Variants",
|
|
7993
|
+
"description": "Variants of products.",
|
|
7994
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/ProductVariant",
|
|
7995
|
+
"fields": productVariantsFields,
|
|
7996
|
+
"uniqueKeys": ["id"],
|
|
7997
|
+
"destinationName": "shopify_product_variants",
|
|
7998
|
+
"queryName": "productVariants",
|
|
7999
|
+
"connectionPath": "productVariants",
|
|
8000
|
+
"isTimeSeries": false
|
|
8001
|
+
},
|
|
8002
|
+
"pages": {
|
|
8003
|
+
"overview": "Pages",
|
|
8004
|
+
"description": "Static pages in the store.",
|
|
8005
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Page",
|
|
8006
|
+
"fields": pagesFields,
|
|
8007
|
+
"uniqueKeys": ["id"],
|
|
8008
|
+
"destinationName": "shopify_pages",
|
|
8009
|
+
"queryName": "pages",
|
|
8010
|
+
"connectionPath": "pages",
|
|
8011
|
+
"isTimeSeries": false
|
|
8012
|
+
},
|
|
8013
|
+
"shop": {
|
|
8014
|
+
"overview": "Shop",
|
|
8015
|
+
"description": "Shop settings and information.",
|
|
8016
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Shop",
|
|
8017
|
+
"fields": shopFields,
|
|
8018
|
+
"uniqueKeys": ["id"],
|
|
8019
|
+
"destinationName": "shopify_shop",
|
|
8020
|
+
"queryName": "shop",
|
|
8021
|
+
"connectionPath": "shop",
|
|
8022
|
+
"isSingleton": true,
|
|
8023
|
+
"isTimeSeries": false
|
|
8024
|
+
},
|
|
8025
|
+
"tender-transactions": {
|
|
8026
|
+
"overview": "Tender Transactions",
|
|
8027
|
+
"description": "Tender transactions for payments.",
|
|
8028
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/TenderTransaction",
|
|
8029
|
+
"fields": tenderTransactionsFields,
|
|
8030
|
+
"uniqueKeys": ["id"],
|
|
8031
|
+
"destinationName": "shopify_tender_transactions",
|
|
8032
|
+
"queryName": "tenderTransactions",
|
|
8033
|
+
"connectionPath": "tenderTransactions",
|
|
8034
|
+
"isTimeSeries": false
|
|
8035
|
+
},
|
|
8036
|
+
"metafield-articles": {
|
|
8037
|
+
"overview": "Article Metafields",
|
|
8038
|
+
"description": "Custom metafields for articles.",
|
|
8039
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8040
|
+
"fields": metafieldsFields,
|
|
8041
|
+
"uniqueKeys": ["id"],
|
|
8042
|
+
"destinationName": "shopify_metafield_articles",
|
|
8043
|
+
"ownerType": "ARTICLE",
|
|
8044
|
+
"parentQuery": "articles",
|
|
8045
|
+
"isTimeSeries": false
|
|
8046
|
+
},
|
|
8047
|
+
"metafield-blogs": {
|
|
8048
|
+
"overview": "Blog Metafields",
|
|
8049
|
+
"description": "Custom metafields for blogs.",
|
|
8050
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8051
|
+
"fields": metafieldsFields,
|
|
8052
|
+
"uniqueKeys": ["id"],
|
|
8053
|
+
"destinationName": "shopify_metafield_blogs",
|
|
8054
|
+
"ownerType": "BLOG",
|
|
8055
|
+
"parentQuery": "blogs",
|
|
8056
|
+
"isTimeSeries": false
|
|
8057
|
+
},
|
|
8058
|
+
"metafield-collections": {
|
|
8059
|
+
"overview": "Collection Metafields",
|
|
8060
|
+
"description": "Custom metafields for collections.",
|
|
8061
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8062
|
+
"fields": metafieldsFields,
|
|
8063
|
+
"uniqueKeys": ["id"],
|
|
8064
|
+
"destinationName": "shopify_metafield_collections",
|
|
8065
|
+
"ownerType": "COLLECTION",
|
|
8066
|
+
"parentQuery": "collections",
|
|
8067
|
+
"isTimeSeries": false
|
|
8068
|
+
},
|
|
8069
|
+
"metafield-customers": {
|
|
8070
|
+
"overview": "Customer Metafields",
|
|
8071
|
+
"description": "Custom metafields for customers.",
|
|
8072
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8073
|
+
"fields": metafieldsFields,
|
|
8074
|
+
"uniqueKeys": ["id"],
|
|
8075
|
+
"destinationName": "shopify_metafield_customers",
|
|
8076
|
+
"ownerType": "CUSTOMER",
|
|
8077
|
+
"parentQuery": "customers",
|
|
8078
|
+
"isTimeSeries": false
|
|
8079
|
+
},
|
|
8080
|
+
"metafield-locations": {
|
|
8081
|
+
"overview": "Location Metafields",
|
|
8082
|
+
"description": "Custom metafields for locations.",
|
|
8083
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8084
|
+
"fields": metafieldsFields,
|
|
8085
|
+
"uniqueKeys": ["id"],
|
|
8086
|
+
"destinationName": "shopify_metafield_locations",
|
|
8087
|
+
"ownerType": "LOCATION",
|
|
8088
|
+
"parentQuery": "locations",
|
|
8089
|
+
"isTimeSeries": false
|
|
8090
|
+
},
|
|
8091
|
+
"metafield-orders": {
|
|
8092
|
+
"overview": "Order Metafields",
|
|
8093
|
+
"description": "Custom metafields for orders.",
|
|
8094
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8095
|
+
"fields": metafieldsFields,
|
|
8096
|
+
"uniqueKeys": ["id"],
|
|
8097
|
+
"destinationName": "shopify_metafield_orders",
|
|
8098
|
+
"ownerType": "ORDER",
|
|
8099
|
+
"parentQuery": "orders",
|
|
8100
|
+
"isTimeSeries": false
|
|
8101
|
+
},
|
|
8102
|
+
"metafield-pages": {
|
|
8103
|
+
"overview": "Page Metafields",
|
|
8104
|
+
"description": "Custom metafields for pages.",
|
|
8105
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8106
|
+
"fields": metafieldsFields,
|
|
8107
|
+
"uniqueKeys": ["id"],
|
|
8108
|
+
"destinationName": "shopify_metafield_pages",
|
|
8109
|
+
"ownerType": "PAGE",
|
|
8110
|
+
"parentQuery": "pages",
|
|
8111
|
+
"isTimeSeries": false
|
|
8112
|
+
},
|
|
8113
|
+
"metafield-product-variants": {
|
|
8114
|
+
"overview": "Product Variant Metafields",
|
|
8115
|
+
"description": "Custom metafields for product variants.",
|
|
8116
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8117
|
+
"fields": metafieldsFields,
|
|
8118
|
+
"uniqueKeys": ["id"],
|
|
8119
|
+
"destinationName": "shopify_metafield_product_variants",
|
|
8120
|
+
"ownerType": "PRODUCTVARIANT",
|
|
8121
|
+
"parentQuery": "productVariants",
|
|
8122
|
+
"isTimeSeries": false
|
|
8123
|
+
},
|
|
8124
|
+
"metafield-products": {
|
|
8125
|
+
"overview": "Product Metafields",
|
|
8126
|
+
"description": "Custom metafields for products.",
|
|
8127
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8128
|
+
"fields": metafieldsFields,
|
|
8129
|
+
"uniqueKeys": ["id"],
|
|
8130
|
+
"destinationName": "shopify_metafield_products",
|
|
8131
|
+
"ownerType": "PRODUCT",
|
|
8132
|
+
"parentQuery": "products",
|
|
8133
|
+
"isTimeSeries": false
|
|
8134
|
+
},
|
|
8135
|
+
"metafield-shops": {
|
|
8136
|
+
"overview": "Shop Metafields",
|
|
8137
|
+
"description": "Custom metafields for the shop.",
|
|
8138
|
+
"documentation": "https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Metafield",
|
|
8139
|
+
"fields": metafieldsFields,
|
|
8140
|
+
"uniqueKeys": ["id"],
|
|
8141
|
+
"destinationName": "shopify_metafield_shops",
|
|
8142
|
+
"ownerType": "SHOP",
|
|
8143
|
+
"parentQuery": null,
|
|
8144
|
+
"isTimeSeries": false
|
|
8145
|
+
}
|
|
8146
|
+
};
|
|
8147
|
+
var ShopifyAdsSource = class ShopifyAdsSource extends AbstractSource3 {
|
|
8148
|
+
constructor(config) {
|
|
8149
|
+
super(config.mergeParameters({
|
|
8150
|
+
ShopDomain: {
|
|
8151
|
+
isRequired: true,
|
|
8152
|
+
requiredType: "string",
|
|
8153
|
+
label: "Shop Domain",
|
|
8154
|
+
description: "Shopify shop domain, e.g. example-store.myshopify.com"
|
|
8155
|
+
},
|
|
8156
|
+
AccessToken: {
|
|
8157
|
+
isRequired: true,
|
|
8158
|
+
requiredType: "string",
|
|
8159
|
+
label: "Admin API Access Token",
|
|
8160
|
+
description: "Private or custom app Admin API access token",
|
|
8161
|
+
attributes: [CONFIG_ATTRIBUTES2.SECRET]
|
|
8162
|
+
},
|
|
8163
|
+
Fields: {
|
|
8164
|
+
isRequired: true,
|
|
8165
|
+
requiredType: "string",
|
|
8166
|
+
label: "Fields",
|
|
8167
|
+
description: "Comma separated list in format 'node field'. Example: orders id, orders totalPrice"
|
|
8168
|
+
},
|
|
8169
|
+
ReimportLookbackWindow: {
|
|
8170
|
+
requiredType: "number",
|
|
8171
|
+
isRequired: true,
|
|
8172
|
+
default: 2,
|
|
8173
|
+
label: "Reimport Lookback Window",
|
|
8174
|
+
description: "Number of days to look back when reimporting data",
|
|
8175
|
+
attributes: [CONFIG_ATTRIBUTES2.ADVANCED]
|
|
8176
|
+
},
|
|
8177
|
+
CreateEmptyTables: {
|
|
8178
|
+
requiredType: "boolean",
|
|
8179
|
+
default: true,
|
|
8180
|
+
label: "Create Empty Tables",
|
|
8181
|
+
description: "Create tables with all schema columns even when API returned zero rows",
|
|
8182
|
+
attributes: [CONFIG_ATTRIBUTES2.ADVANCED]
|
|
8183
|
+
},
|
|
8184
|
+
StartDate: {
|
|
8185
|
+
requiredType: "date",
|
|
8186
|
+
label: "Start Date",
|
|
8187
|
+
description: "Start date for data import",
|
|
8188
|
+
attributes: [CONFIG_ATTRIBUTES2.MANUAL_BACKFILL, CONFIG_ATTRIBUTES2.HIDE_IN_CONFIG_FORM]
|
|
8189
|
+
},
|
|
8190
|
+
EndDate: {
|
|
8191
|
+
requiredType: "date",
|
|
8192
|
+
label: "End Date",
|
|
8193
|
+
description: "End date for data import",
|
|
8194
|
+
attributes: [CONFIG_ATTRIBUTES2.MANUAL_BACKFILL, CONFIG_ATTRIBUTES2.HIDE_IN_CONFIG_FORM]
|
|
8195
|
+
}
|
|
8196
|
+
}));
|
|
8197
|
+
this.fieldsSchema = ShopifyAdsFieldsSchema;
|
|
8198
|
+
}
|
|
8199
|
+
/**
|
|
8200
|
+
* Entry point to fetch Shopify data.
|
|
8201
|
+
*/
|
|
8202
|
+
async fetchData({ nodeName, fields = [], startDate = null, endDate = null }) {
|
|
8203
|
+
const schema = this.fieldsSchema[nodeName];
|
|
8204
|
+
if (nodeName.startsWith("metafield-")) {
|
|
8205
|
+
return this._fetchMetafields({ nodeName, schema, fields });
|
|
8206
|
+
}
|
|
8207
|
+
if (schema.isSingleton) {
|
|
8208
|
+
return this._fetchSingleton({ nodeName, schema, fields });
|
|
8209
|
+
}
|
|
8210
|
+
return this._fetchPaginated({
|
|
8211
|
+
nodeName,
|
|
8212
|
+
schema,
|
|
8213
|
+
fields,
|
|
8214
|
+
startDate,
|
|
8215
|
+
endDate,
|
|
8216
|
+
buildQuery: (afterClause, filterClause, graphqlFields) => `query { ${schema.queryName}(first: 250${afterClause}${filterClause}) { nodes { ${graphqlFields} } pageInfo { hasNextPage endCursor } } }`,
|
|
8217
|
+
extractNodes: (connection) => connection.nodes || []
|
|
8218
|
+
});
|
|
8219
|
+
}
|
|
8220
|
+
/**
|
|
8221
|
+
* Generic paginated fetch with customizable query and node extraction.
|
|
8222
|
+
*/
|
|
8223
|
+
async _fetchPaginated({ nodeName, schema, fields, startDate, endDate, buildQuery, extractNodes }) {
|
|
8224
|
+
var _a, _b, _c;
|
|
8225
|
+
const queryFields = this._buildQueryFields(schema, fields);
|
|
8226
|
+
const dateFilter = this._buildDateFilter(schema, startDate, endDate);
|
|
8227
|
+
const results = [];
|
|
8228
|
+
let cursor = null;
|
|
8229
|
+
let hasNextPage = true;
|
|
8230
|
+
while (hasNextPage) {
|
|
8231
|
+
const afterClause = cursor ? `, after: "${cursor}"` : "";
|
|
8232
|
+
const query = buildQuery(afterClause, dateFilter, queryFields);
|
|
8233
|
+
const payload = await this._graphqlRequest(query);
|
|
8234
|
+
const connection = (_a = payload == null ? void 0 : payload.data) == null ? void 0 : _a[schema.connectionPath];
|
|
8235
|
+
if (!connection) {
|
|
8236
|
+
break;
|
|
8237
|
+
}
|
|
8238
|
+
for (const node of extractNodes(connection)) {
|
|
8239
|
+
const normalized = nodeName === "discount-codes" ? this._normalizeDiscountCode(node, fields) : this._normalizeFromSchema({ node, schema, fields });
|
|
8240
|
+
results.push(normalized);
|
|
8241
|
+
}
|
|
8242
|
+
hasNextPage = ((_b = connection.pageInfo) == null ? void 0 : _b.hasNextPage) || false;
|
|
8243
|
+
cursor = ((_c = connection.pageInfo) == null ? void 0 : _c.endCursor) || null;
|
|
8244
|
+
}
|
|
8245
|
+
console.log(`[Shopify] Fetched ${results.length} records for ${nodeName}`);
|
|
8246
|
+
return results;
|
|
8247
|
+
}
|
|
8248
|
+
/**
|
|
8249
|
+
* Fetch singleton (shop).
|
|
8250
|
+
*/
|
|
8251
|
+
async _fetchSingleton({ nodeName, schema, fields }) {
|
|
8252
|
+
var _a;
|
|
8253
|
+
const queryFields = this._buildQueryFields(schema, fields);
|
|
8254
|
+
const query = `query { ${schema.queryName} { ${queryFields} } }`;
|
|
8255
|
+
const payload = await this._graphqlRequest(query);
|
|
8256
|
+
const node = (_a = payload == null ? void 0 : payload.data) == null ? void 0 : _a[schema.queryName];
|
|
8257
|
+
console.log(`[Shopify] Fetched ${node ? 1 : 0} records for ${nodeName}`);
|
|
8258
|
+
return node ? [this._normalizeFromSchema({ node, schema, fields })] : [];
|
|
8259
|
+
}
|
|
8260
|
+
/**
|
|
8261
|
+
* Fetch metafields for various owner types.
|
|
8262
|
+
* Shop metafields: single query (shop is singleton)
|
|
8263
|
+
* Other metafields: paginate through parent entities (products, orders, etc.)
|
|
8264
|
+
*/
|
|
8265
|
+
async _fetchMetafields({ nodeName, schema, fields }) {
|
|
8266
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
8267
|
+
const queryFields = this._buildQueryFields(schema, fields);
|
|
8268
|
+
const isShopMetafields = schema.parentQuery === null;
|
|
8269
|
+
const includeOwnerId = fields.includes("ownerId");
|
|
8270
|
+
if (isShopMetafields) {
|
|
8271
|
+
const query = `query { shop { id metafields(first: 250) { nodes { ${queryFields} } } } }`;
|
|
8272
|
+
const payload = await this._graphqlRequest(query);
|
|
8273
|
+
const shopId = ((_b = (_a = payload == null ? void 0 : payload.data) == null ? void 0 : _a.shop) == null ? void 0 : _b.id) || null;
|
|
8274
|
+
const metafields2 = ((_e = (_d = (_c = payload == null ? void 0 : payload.data) == null ? void 0 : _c.shop) == null ? void 0 : _d.metafields) == null ? void 0 : _e.nodes) || [];
|
|
8275
|
+
console.log(`[Shopify] Fetched ${metafields2.length} records for ${nodeName}`);
|
|
8276
|
+
return metafields2.map((mf) => {
|
|
8277
|
+
const normalized = this._normalizeFromSchema({ node: mf, schema, fields });
|
|
8278
|
+
if (includeOwnerId) {
|
|
8279
|
+
normalized.ownerId = shopId;
|
|
8280
|
+
}
|
|
8281
|
+
return normalized;
|
|
8282
|
+
});
|
|
8283
|
+
}
|
|
8284
|
+
const metafields = [];
|
|
8285
|
+
let cursor = null;
|
|
8286
|
+
do {
|
|
8287
|
+
const afterClause = cursor ? `, after: "${cursor}"` : "";
|
|
8288
|
+
const query = `query { ${schema.parentQuery}(first: 250${afterClause}) { nodes { id metafields(first: 250) { nodes { ${queryFields} } } } pageInfo { hasNextPage endCursor } } }`;
|
|
8289
|
+
const payload = await this._graphqlRequest(query);
|
|
8290
|
+
const connection = (_f = payload == null ? void 0 : payload.data) == null ? void 0 : _f[schema.parentQuery];
|
|
8291
|
+
if (!connection) {
|
|
8292
|
+
break;
|
|
8293
|
+
}
|
|
8294
|
+
for (const owner of connection.nodes || []) {
|
|
8295
|
+
for (const metafield of ((_g = owner.metafields) == null ? void 0 : _g.nodes) || []) {
|
|
8296
|
+
const normalized = this._normalizeFromSchema({ node: metafield, schema, fields });
|
|
8297
|
+
if (includeOwnerId) {
|
|
8298
|
+
normalized.ownerId = owner.id;
|
|
8299
|
+
}
|
|
8300
|
+
metafields.push(normalized);
|
|
8301
|
+
}
|
|
8302
|
+
}
|
|
8303
|
+
cursor = ((_h = connection.pageInfo) == null ? void 0 : _h.hasNextPage) ? connection.pageInfo.endCursor : null;
|
|
8304
|
+
} while (cursor);
|
|
8305
|
+
console.log(`[Shopify] Fetched ${metafields.length} records for ${nodeName}`);
|
|
8306
|
+
return metafields;
|
|
8307
|
+
}
|
|
8308
|
+
// ========== Data Processing ==========
|
|
8309
|
+
_normalizeFromSchema({ node, schema, fields }) {
|
|
8310
|
+
if (!node) {
|
|
8311
|
+
return {};
|
|
8312
|
+
}
|
|
8313
|
+
const result = {};
|
|
8314
|
+
for (const field of fields) {
|
|
8315
|
+
const fieldDefinition = schema.fields[field];
|
|
8316
|
+
if (!(fieldDefinition == null ? void 0 : fieldDefinition.graphqlPath)) {
|
|
8317
|
+
result[field] = null;
|
|
8318
|
+
continue;
|
|
8319
|
+
}
|
|
8320
|
+
const rawValue = this._extractValue(node, fieldDefinition.graphqlPath);
|
|
8321
|
+
result[field] = this._formatValue(rawValue);
|
|
8322
|
+
}
|
|
8323
|
+
return result;
|
|
8324
|
+
}
|
|
8325
|
+
_normalizeDiscountCode(node, fields) {
|
|
8326
|
+
var _a, _b, _c;
|
|
8327
|
+
const d = node.codeDiscount || {};
|
|
8328
|
+
const all = {
|
|
8329
|
+
id: node.id,
|
|
8330
|
+
code: ((_c = (_b = (_a = d.codes) == null ? void 0 : _a.nodes) == null ? void 0 : _b[0]) == null ? void 0 : _c.code) || null,
|
|
8331
|
+
discountType: d.__typename || null,
|
|
8332
|
+
title: d.title || null,
|
|
8333
|
+
status: d.status || null,
|
|
8334
|
+
startsAt: d.startsAt || null,
|
|
8335
|
+
endsAt: d.endsAt || null,
|
|
8336
|
+
usageLimit: d.usageLimit || null,
|
|
8337
|
+
appliesOncePerCustomer: d.appliesOncePerCustomer || null,
|
|
8338
|
+
asyncUsageCount: d.asyncUsageCount || null,
|
|
8339
|
+
createdAt: d.createdAt || null,
|
|
8340
|
+
updatedAt: d.updatedAt || null
|
|
8341
|
+
};
|
|
8342
|
+
const result = {};
|
|
8343
|
+
for (const field of fields) {
|
|
8344
|
+
result[field] = all[field] ?? null;
|
|
8345
|
+
}
|
|
8346
|
+
return result;
|
|
8347
|
+
}
|
|
8348
|
+
_extractValue(node, graphqlPath) {
|
|
8349
|
+
const match = graphqlPath.match(/^(\w+)\s*\{\s*(.+)\s*\}$/);
|
|
8350
|
+
if (match) {
|
|
8351
|
+
const [, parent, inner] = match;
|
|
8352
|
+
return node[parent] ? this._extractValue(node[parent], inner.trim()) : null;
|
|
8353
|
+
}
|
|
8354
|
+
return node[graphqlPath.split(/\s+/)[0]];
|
|
8355
|
+
}
|
|
8356
|
+
/**
|
|
8357
|
+
* Converts arrays and objects to strings for storage compatibility.
|
|
8358
|
+
*/
|
|
8359
|
+
_formatValue(value) {
|
|
8360
|
+
if (value == null) {
|
|
8361
|
+
return null;
|
|
8362
|
+
}
|
|
8363
|
+
if (Array.isArray(value)) {
|
|
8364
|
+
return value.join(", ");
|
|
8365
|
+
}
|
|
8366
|
+
if (typeof value === "object") {
|
|
8367
|
+
return JSON.stringify(value);
|
|
8368
|
+
}
|
|
8369
|
+
return value;
|
|
8370
|
+
}
|
|
8371
|
+
// ========== Query Builders ==========
|
|
8372
|
+
/**
|
|
8373
|
+
* Builds GraphQL fields string from requested fields.
|
|
8374
|
+
* Handles union types (like discount-codes) with inline fragments.
|
|
8375
|
+
*/
|
|
8376
|
+
_buildQueryFields(schema, fields) {
|
|
8377
|
+
const regularFields = [];
|
|
8378
|
+
const unionTypeFields = [];
|
|
8379
|
+
for (const field of fields) {
|
|
8380
|
+
const fieldDefinition = schema.fields[field];
|
|
8381
|
+
if (!(fieldDefinition == null ? void 0 : fieldDefinition.graphqlPath)) {
|
|
8382
|
+
continue;
|
|
8383
|
+
}
|
|
8384
|
+
if (fieldDefinition.isUnionField) {
|
|
8385
|
+
unionTypeFields.push(fieldDefinition.graphqlPath);
|
|
8386
|
+
} else {
|
|
8387
|
+
regularFields.push(fieldDefinition.graphqlPath);
|
|
8388
|
+
}
|
|
8389
|
+
}
|
|
8390
|
+
let queryFields = regularFields.join(" ");
|
|
8391
|
+
if (schema.unionField && unionTypeFields.length) {
|
|
8392
|
+
const unionFieldsString = unionTypeFields.join(" ");
|
|
8393
|
+
const inlineFragments = schema.unionTypes.map((typeName) => `... on ${typeName} { ${unionFieldsString} }`).join(" ");
|
|
8394
|
+
queryFields += ` ${schema.unionField} { __typename ${inlineFragments} }`;
|
|
8395
|
+
}
|
|
8396
|
+
return queryFields;
|
|
8397
|
+
}
|
|
8398
|
+
_buildDateFilter(schema, startDate, endDate) {
|
|
8399
|
+
if (schema.queryFilterTemplate && startDate && endDate) {
|
|
8400
|
+
return `, ${schema.queryFilterTemplate.replace("{{startDate}}", startDate).replace("{{endDate}}", endDate)}`;
|
|
8401
|
+
}
|
|
8402
|
+
return "";
|
|
8403
|
+
}
|
|
8404
|
+
// ========== HTTP ==========
|
|
8405
|
+
async _graphqlRequest(query) {
|
|
8406
|
+
var _a;
|
|
8407
|
+
const url = this._buildGraphqlUrl();
|
|
8408
|
+
console.log(`[Shopify] Query: ${query}`);
|
|
8409
|
+
const response = await this.urlFetchWithRetry(url, {
|
|
8410
|
+
method: "post",
|
|
8411
|
+
headers: this._buildHeaders(),
|
|
8412
|
+
body: JSON.stringify({ query }),
|
|
8413
|
+
payload: JSON.stringify({ query }),
|
|
8414
|
+
muteHttpExceptions: true
|
|
8415
|
+
});
|
|
8416
|
+
const result = JSON.parse(await response.getContentText());
|
|
8417
|
+
if ((_a = result.errors) == null ? void 0 : _a.length) {
|
|
8418
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
8419
|
+
throw new Error(`[Shopify] GraphQL errors: ${errorMessages}`);
|
|
8420
|
+
}
|
|
8421
|
+
return result;
|
|
8422
|
+
}
|
|
8423
|
+
_buildGraphqlUrl() {
|
|
8424
|
+
const domain = String(this.config.ShopDomain.value).replace(/^https?:\/\//, "").replace(/\/$/, "");
|
|
8425
|
+
return `https://${domain}/admin/api/2025-01/graphql.json`;
|
|
8426
|
+
}
|
|
8427
|
+
_buildHeaders() {
|
|
8428
|
+
return {
|
|
8429
|
+
"Accept": "application/json",
|
|
8430
|
+
"Content-Type": "application/json",
|
|
8431
|
+
"X-Shopify-Access-Token": this.config.AccessToken.value
|
|
8432
|
+
};
|
|
8433
|
+
}
|
|
8434
|
+
isValidToRetry(error) {
|
|
8435
|
+
return !(error == null ? void 0 : error.statusCode) || error.statusCode >= HTTP_STATUS2.SERVER_ERROR_MIN || [HTTP_STATUS2.TOO_MANY_REQUESTS, HTTP_STATUS2.SERVICE_UNAVAILABLE, HTTP_STATUS2.GATEWAY_TIMEOUT].includes(error.statusCode);
|
|
8436
|
+
}
|
|
8437
|
+
};
|
|
8438
|
+
var ShopifyAdsConnector = class ShopifyAdsConnector extends AbstractConnector3 {
|
|
8439
|
+
constructor(config, source, storageName = "GoogleBigQueryStorage", runConfig = null) {
|
|
8440
|
+
super(config, source, null, runConfig);
|
|
8441
|
+
this.storageName = storageName;
|
|
8442
|
+
}
|
|
8443
|
+
/**
|
|
8444
|
+
* Import entry point for Shopify Ads.
|
|
8445
|
+
*/
|
|
8446
|
+
async startImportProcess() {
|
|
8447
|
+
const fields = ConnectorUtils.parseFields(this.config.Fields.value);
|
|
8448
|
+
for (const nodeName in fields) {
|
|
8449
|
+
const schema = this.source.fieldsSchema[nodeName];
|
|
8450
|
+
const isTimeSeries = (schema == null ? void 0 : schema.isTimeSeries) || false;
|
|
8451
|
+
if (isTimeSeries) {
|
|
8452
|
+
await this._processTimeSeriesNode({
|
|
8453
|
+
nodeName,
|
|
8454
|
+
fields: fields[nodeName] || []
|
|
8455
|
+
});
|
|
8456
|
+
} else {
|
|
8457
|
+
await this._processCatalogNode({
|
|
8458
|
+
nodeName,
|
|
8459
|
+
fields: fields[nodeName] || []
|
|
8460
|
+
});
|
|
8461
|
+
}
|
|
8462
|
+
}
|
|
8463
|
+
}
|
|
8464
|
+
/**
|
|
8465
|
+
* Process time series node (orders, customers, products, etc.).
|
|
8466
|
+
* Fetches data incrementally based on date range.
|
|
8467
|
+
* @param {Object} options
|
|
8468
|
+
* @param {string} options.nodeName
|
|
8469
|
+
* @param {Array<string>} options.fields
|
|
8470
|
+
* @returns {Promise<void>}
|
|
8471
|
+
* @private
|
|
8472
|
+
*/
|
|
8473
|
+
async _processTimeSeriesNode({ nodeName, fields }) {
|
|
8474
|
+
var _a;
|
|
8475
|
+
const [startDate, daysToFetch] = this.getStartDateAndDaysToFetch();
|
|
8476
|
+
if (daysToFetch <= 0) {
|
|
8477
|
+
this.config.logMessage(`No days to fetch for ${nodeName}`);
|
|
8478
|
+
return;
|
|
8479
|
+
}
|
|
8480
|
+
for (let i = 0; i < daysToFetch; i++) {
|
|
8481
|
+
const currentDate = new Date(startDate);
|
|
8482
|
+
currentDate.setDate(currentDate.getDate() + i);
|
|
8483
|
+
const dateStr = DateUtils3.formatDate(currentDate);
|
|
8484
|
+
const formattedStartDate = `${dateStr}T00:00:00Z`;
|
|
8485
|
+
const formattedEndDate = `${dateStr}T23:59:59Z`;
|
|
8486
|
+
const data = await this.source.fetchData({
|
|
8487
|
+
nodeName,
|
|
8488
|
+
fields,
|
|
8489
|
+
startDate: formattedStartDate,
|
|
8490
|
+
endDate: formattedEndDate
|
|
8491
|
+
});
|
|
8492
|
+
this.config.logMessage(
|
|
8493
|
+
data.length ? `${data.length} rows of ${nodeName} were fetched on ${dateStr}` : `ℹ️ No records have been fetched`
|
|
8494
|
+
);
|
|
8495
|
+
if (data.length || ((_a = this.config.CreateEmptyTables) == null ? void 0 : _a.value)) {
|
|
8496
|
+
const preparedData = data.length ? this.addMissingFieldsToData(data, fields) : data;
|
|
8497
|
+
const storage = await this.getStorageByNode(nodeName);
|
|
8498
|
+
await storage.saveData(preparedData);
|
|
8499
|
+
}
|
|
8500
|
+
if (this.runConfig.type === RUN_CONFIG_TYPE2.INCREMENTAL) {
|
|
8501
|
+
this.config.updateLastRequstedDate(currentDate);
|
|
8502
|
+
}
|
|
8503
|
+
}
|
|
8504
|
+
}
|
|
8505
|
+
/**
|
|
8506
|
+
* Process catalog node (static data like shop, blogs, etc.).
|
|
8507
|
+
* @param {Object} options
|
|
8508
|
+
* @param {string} options.nodeName
|
|
8509
|
+
* @param {Array<string>} options.fields
|
|
8510
|
+
* @returns {Promise<void>}
|
|
8511
|
+
* @private
|
|
8512
|
+
*/
|
|
8513
|
+
async _processCatalogNode({ nodeName, fields }) {
|
|
8514
|
+
var _a;
|
|
8515
|
+
const data = await this.source.fetchData({
|
|
8516
|
+
nodeName,
|
|
8517
|
+
fields
|
|
8518
|
+
});
|
|
8519
|
+
const storage = await this.getStorageByNode(nodeName);
|
|
8520
|
+
if (data.length || ((_a = this.config.CreateEmptyTables) == null ? void 0 : _a.value)) {
|
|
8521
|
+
const preparedData = data.length ? this.addMissingFieldsToData(data, fields) : data;
|
|
8522
|
+
await storage.saveData(preparedData);
|
|
8523
|
+
}
|
|
8524
|
+
this.config.logMessage(
|
|
8525
|
+
data.length ? `${data.length} rows of ${nodeName} were fetched` : `No records have been fetched`
|
|
8526
|
+
);
|
|
8527
|
+
}
|
|
8528
|
+
/**
|
|
8529
|
+
* Lazy storage init per node.
|
|
8530
|
+
* @param {string} nodeName
|
|
8531
|
+
* @returns {Promise<AbstractStorage>}
|
|
8532
|
+
*/
|
|
8533
|
+
async getStorageByNode(nodeName) {
|
|
8534
|
+
if (!("storages" in this)) {
|
|
8535
|
+
this.storages = {};
|
|
8536
|
+
}
|
|
8537
|
+
if (!(nodeName in this.storages)) {
|
|
8538
|
+
if (!("uniqueKeys" in this.source.fieldsSchema[nodeName])) {
|
|
8539
|
+
throw new Error(`Unique keys for '${nodeName}' are not defined in the fields schema`);
|
|
8540
|
+
}
|
|
8541
|
+
const uniqueFields = this.source.fieldsSchema[nodeName].uniqueKeys;
|
|
8542
|
+
this.storages[nodeName] = new globalThis[this.storageName](
|
|
8543
|
+
this.config.mergeParameters({
|
|
8544
|
+
DestinationSheetName: { value: this.source.fieldsSchema[nodeName].destinationName },
|
|
8545
|
+
DestinationTableName: { value: this.getDestinationName(nodeName, this.config, this.source.fieldsSchema[nodeName].destinationName) }
|
|
8546
|
+
}),
|
|
8547
|
+
uniqueFields,
|
|
8548
|
+
this.source.fieldsSchema[nodeName].fields,
|
|
8549
|
+
`${this.source.fieldsSchema[nodeName].description} ${this.source.fieldsSchema[nodeName].documentation}`
|
|
8550
|
+
);
|
|
8551
|
+
await this.storages[nodeName].init();
|
|
8552
|
+
}
|
|
8553
|
+
return this.storages[nodeName];
|
|
8554
|
+
}
|
|
8555
|
+
};
|
|
8556
|
+
const manifest = {
|
|
8557
|
+
"title": "Shopify Ads",
|
|
8558
|
+
"logo": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDEwOS41IDEyNC41Ij4KICA8cGF0aCBmaWxsPSIjOTVCRjQ3IiBkPSJNOTUuOSAyMy45Yy0uMS0uNi0uNi0xLTEuMS0xLS41IDAtOS4zLS4yLTkuMy0uMnMtNy40LTcuMi04LjEtNy45Yy0uNy0uNy0yLjItLjUtMi43LS4zIDAgMC0xLjQuNC0zLjcgMS4xLS40LTEuMy0xLTIuOC0xLjgtNC40LTIuNi01LTYuNS03LjctMTEuMS03LjcgMCAwIDAgMCAwIDAtLjMgMC0uNiAwLTEgLjEtLjEtLjItLjMtLjMtLjQtLjUtMi0yLjItNC42LTMuMi03LjctMy4xLTYgLjItMTIgNC41LTE2LjggMTIuMi0zLjQgNS40LTYgMTIuMi02LjcgMTcuNS02LjkgMi4xLTExLjcgMy42LTExLjggMy43LTMuNSAxLjEtMy42IDEuMi00IDQuNS0uMyAyLjUtOS41IDczLjEtOS41IDczLjFsNzUuNiAxMy4xVjIzLjljLS4yIDAtLjMgMC0uMyAwem0tMjguMy02LjNjLTEuNy41LTMuNyAxLjEtNS44IDEuOCAwLTMtLjQtNy4zLTEuOC0xMC45IDQuNS45IDYuNyA1LjkgNy42IDkuMXptLTkuOCAzYy0zLjkgMS4yLTguMiAyLjUtMTIuNSAzLjkgMS4yLTQuNyAzLjUtOS40IDYuMy0xMi41IDEuMS0xLjEgMi42LTIuNCA0LjMtMy4xIDEuNyAzLjUgMiA4LjUgMS45IDExLjd6bS03LjktMTUuNmMxLjQgMCAyLjYuMyAzLjYuOS0xLjYuOC0zLjIgMi4xLTQuNyAzLjYtMy43IDQtNi41IDEwLjItNy42IDE2LjItMy42IDEuMS03LjEgMi4yLTEwLjIgMy4yIDItOS45IDkuOC0yMy4zIDE4LjktMjMuOXoiLz4KICA8cGF0aCBmaWxsPSIjNUU4RTNFIiBkPSJNOTQuOCAyMi45Yy0uNSAwLTkuMy0uMi05LjMtLjJzLTcuNC03LjItOC4xLTcuOWMtLjMtLjMtLjYtLjQtMS0uNXYxMDguMmwzOC40LTkuNFM5NS45IDIzLjkgOTUuOSAyMy45Yy0uMS0uNi0uNi0xLTEuMS0xeiIvPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik01OCAzOS45bC0zLjggMTQuNHMtNC4yLTItOS4yLTEuN2MtNy4zLjUtNy40IDUuMS03LjMgNi4yLjQgNi41IDE3LjUgNy45IDE4LjUgMjMuMS43IDEyLTYuNCAyMC4yLTE2LjYgMjAuOC0xMi4zLjgtMTktNi41LTE5LTYuNWwyLjYtMTFzNi42IDUgMTEuOSA0LjdjMy41LS4yIDQuOC0zLjEgNC42LTUuMS0uNS04LjQtMTQuNC03LjktMTUuMy0yMS45LS44LTExLjggNy0yMy44IDI0LjEtMjQuOSA2LjctLjQgMTAuMSAxLjMgMTAuNSAxLjl6Ii8+Cjwvc3ZnPgoK",
|
|
8559
|
+
"docUrl": null
|
|
8560
|
+
};
|
|
8561
|
+
return {
|
|
8562
|
+
ShopifyAdsSource,
|
|
8563
|
+
ShopifyAdsConnector,
|
|
8564
|
+
manifest
|
|
8565
|
+
};
|
|
8566
|
+
})();
|
|
6584
8567
|
const RedditAds = (function() {
|
|
6585
8568
|
const { AbstractException: AbstractException2, HttpRequestException: HttpRequestException2, OauthFlowException: OauthFlowException2, AbstractStorage: AbstractStorage2, AbstractSource: AbstractSource3, AbstractRunConfig: AbstractRunConfig3, AbstractConnector: AbstractConnector3, AbstractConfig: AbstractConfig2, HttpUtils: HttpUtils3, FileUtils: FileUtils3, DateUtils: DateUtils3, CryptoUtils: CryptoUtils3, AsyncUtils: AsyncUtils3, RunConfigDto: RunConfigDto2, OauthCredentialsDto: OauthCredentialsDto2, OauthCredentialsDtoBuilder: OauthCredentialsDtoBuilder2, SourceConfigDto: SourceConfigDto2, StorageConfigDto: StorageConfigDto2, ConfigDto: ConfigDto2, HTTP_STATUS: HTTP_STATUS2, EXECUTION_STATUS: EXECUTION_STATUS2, RUN_CONFIG_TYPE: RUN_CONFIG_TYPE2, CONFIG_ATTRIBUTES: CONFIG_ATTRIBUTES2, OAUTH_CONSTANTS: OAUTH_CONSTANTS2, OAUTH_SOURCE_CREDENTIALS_KEY: OAUTH_SOURCE_CREDENTIALS_KEY2 } = Core;
|
|
6586
8569
|
const RedditAdsHelper = {
|
|
@@ -22566,6 +24549,7 @@ const BankOfCanada = (function() {
|
|
|
22566
24549
|
const Connectors = {
|
|
22567
24550
|
XAds,
|
|
22568
24551
|
TikTokAds,
|
|
24552
|
+
ShopifyAds,
|
|
22569
24553
|
RedditAds,
|
|
22570
24554
|
OpenHolidays,
|
|
22571
24555
|
OpenExchangeRates,
|
|
@@ -22581,6 +24565,7 @@ const Connectors = {
|
|
|
22581
24565
|
const AvailableConnectors = [
|
|
22582
24566
|
"XAds",
|
|
22583
24567
|
"TikTokAds",
|
|
24568
|
+
"ShopifyAds",
|
|
22584
24569
|
"RedditAds",
|
|
22585
24570
|
"OpenHolidays",
|
|
22586
24571
|
"OpenExchangeRates",
|
|
@@ -22607,6 +24592,7 @@ const OWOX = {
|
|
|
22607
24592
|
// Individual connectors
|
|
22608
24593
|
XAds,
|
|
22609
24594
|
TikTokAds,
|
|
24595
|
+
ShopifyAds,
|
|
22610
24596
|
RedditAds,
|
|
22611
24597
|
OpenHolidays,
|
|
22612
24598
|
OpenExchangeRates,
|