@szymonpiatek/nextwordpress 0.0.5 → 0.0.7

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.d.ts CHANGED
@@ -1,8 +1,22 @@
1
- import { N as NextWordpressConfig, W as WordPressResponse, T as Taxonomy, h as WPEntity, R as RenderedTitle, i as RenderedContent, P as Post, A as Author, F as FeaturedMedia, a as WooCommerceConfig, d as WooCommerceResponse, j as WCImage, k as WCAddress, l as WCProductVariation, b as WCProduct, c as WCProductFilterParams, e as WPGraphQLConfig, g as GQLConnection, f as GQLPostFilter, G as GQLPost } from './types-EjYH-eZp.js';
2
- export { B as BlockType, E as EditorBlock, m as EmbeddedAuthor, n as EmbeddedTerm, o as GQLError, p as GQLPageInfo, M as MediaDetails, q as MediaSize, r as PostEmbedded, S as SearchResult, s as TemplatePart, t as WCDimensions, u as WCProductAttribute, v as WCProductDefaultAttribute, w as WPGraphQLError, x as WooCommercePaginationHeaders } from './types-EjYH-eZp.js';
1
+ import { N as NextWordpressConfig, J as JwtAuthCredentials, k as JwtAuthResponse, a as WooCommerceConfig, d as WooCommerceResponse, W as WordPressResponse, T as Taxonomy, l as WPEntity, R as RenderedTitle, m as RenderedContent, P as Post, A as Author, F as FeaturedMedia, n as WCImage, o as WCProductVariation, b as WCProduct, g as WCCustomer, p as WCAddress, U as UpdateCustomerInput, e as WCCreateOrderInput, f as WCOrder, c as WCProductFilterParams, h as WPGraphQLConfig, j as GQLConnection, i as GQLPostFilter, G as GQLPost } from './types-Be60n09c.js';
2
+ export { q as AuthenticationError, B as BlockType, E as EditorBlock, r as EmbeddedAuthor, s as EmbeddedTerm, t as GQLError, u as GQLPageInfo, M as MediaDetails, v as MediaSize, w as PostEmbedded, S as SearchResult, x as TemplatePart, y as WCDimensions, z as WCOrderLineItem, C as WCProductAttribute, D as WCProductDefaultAttribute, H as WCShippingLine, I as WPGraphQLError, K as WooCommercePaginationHeaders } from './types-Be60n09c.js';
3
+
4
+ declare function createApplicationPasswordToken(username: string, appPassword: string): string;
3
5
 
4
6
  declare function resolveBaseUrl(config: NextWordpressConfig): string;
5
7
 
8
+ declare function authenticateJwt(config: NextWordpressConfig, credentials: JwtAuthCredentials): Promise<JwtAuthResponse>;
9
+ declare function validateJwtToken(config: NextWordpressConfig, token: string): Promise<boolean>;
10
+
11
+ declare function createWooCommerceFetcher(config: WooCommerceConfig): {
12
+ wcFetch: <T>(path: string, query?: Record<string, unknown>, tags?: string[], options?: RequestInit) => Promise<T>;
13
+ wcFetchGraceful: <T>(path: string, fallback: T, query?: Record<string, unknown>, tags?: string[]) => Promise<T>;
14
+ wcFetchPaginated: <T>(path: string, query?: Record<string, unknown>, tags?: string[]) => Promise<WooCommerceResponse<T[]>>;
15
+ wcFetchPaginatedGraceful: <T>(path: string, query?: Record<string, unknown>, tags?: string[]) => Promise<WooCommerceResponse<T[]>>;
16
+ wcMutate: <T>(path: string, body: unknown, method?: "POST" | "PUT" | "PATCH" | "DELETE") => Promise<T>;
17
+ };
18
+ type WooCommerceFetcher = ReturnType<typeof createWooCommerceFetcher>;
19
+
6
20
  declare function createFetcher(config: NextWordpressConfig): {
7
21
  wpFetch: <T>(path: string, query?: Record<string, unknown>, tags?: string[]) => Promise<T>;
8
22
  wpFetchGraceful: <T>(path: string, fallback: T, query?: Record<string, unknown>, tags?: string[]) => Promise<T>;
@@ -446,15 +460,6 @@ declare function createWordPressClient(config: NextWordpressConfig): {
446
460
  }[]>;
447
461
  };
448
462
 
449
- declare function createWooCommerceFetcher(config: WooCommerceConfig): {
450
- wcFetch: <T>(path: string, query?: Record<string, unknown>, tags?: string[], options?: RequestInit) => Promise<T>;
451
- wcFetchGraceful: <T>(path: string, fallback: T, query?: Record<string, unknown>, tags?: string[]) => Promise<T>;
452
- wcFetchPaginated: <T>(path: string, query?: Record<string, unknown>, tags?: string[]) => Promise<WooCommerceResponse<T[]>>;
453
- wcFetchPaginatedGraceful: <T>(path: string, query?: Record<string, unknown>, tags?: string[]) => Promise<WooCommerceResponse<T[]>>;
454
- wcMutate: <T>(path: string, body: unknown, method?: "POST" | "PUT" | "PATCH" | "DELETE") => Promise<T>;
455
- };
456
- type WooCommerceFetcher = ReturnType<typeof createWooCommerceFetcher>;
457
-
458
463
  interface WCProductCategory {
459
464
  id: number;
460
465
  name: string;
@@ -535,14 +540,28 @@ interface CreateProductTagInput {
535
540
  }
536
541
  type UpdateProductTagInput = Partial<CreateProductTagInput>;
537
542
 
538
- interface WCOrderLineItem {
543
+ interface WCOrderNote {
544
+ id: number;
545
+ author: string;
546
+ date_created: string;
547
+ date_created_gmt: string;
548
+ note: string;
549
+ customer_note: boolean;
550
+ added_by_user: boolean;
551
+ }
552
+ interface WCCreateOrderNoteInput {
553
+ note: string;
554
+ customer_note?: boolean;
555
+ added_by_user?: boolean;
556
+ }
557
+
558
+ interface WCRefundLineItem {
539
559
  id: number;
540
560
  name: string;
541
561
  product_id: number;
542
562
  variation_id: number;
543
563
  quantity: number;
544
- sku: string;
545
- price: number;
564
+ tax_class: string;
546
565
  subtotal: string;
547
566
  subtotal_tax: string;
548
567
  total: string;
@@ -556,87 +575,402 @@ interface WCOrderLineItem {
556
575
  id: number;
557
576
  key: string;
558
577
  value: unknown;
559
- display_key: string;
560
- display_value: string;
561
578
  }>;
562
- image: {
563
- id: string;
564
- src: string;
565
- } | null;
579
+ sku: string;
580
+ price: number;
581
+ refund_total: number;
566
582
  }
567
- interface WCShippingLine {
583
+ interface WCOrderRefund {
568
584
  id: number;
569
- method_title: string;
570
- method_id: string;
571
- instance_id: string;
572
- total: string;
573
- total_tax: string;
574
- taxes: Array<{
575
- id: number;
576
- total: string;
577
- }>;
585
+ date_created: string;
586
+ date_created_gmt: string;
587
+ amount: string;
588
+ reason: string;
589
+ refunded_by: number;
590
+ refunded_payment: boolean;
578
591
  meta_data: Array<{
579
592
  id: number;
580
593
  key: string;
581
594
  value: unknown;
582
595
  }>;
596
+ line_items: WCRefundLineItem[];
583
597
  }
584
- interface WCOrder {
598
+ interface WCCreateOrderRefundInput {
599
+ amount?: string;
600
+ reason?: string;
601
+ refunded_by?: number;
602
+ meta_data?: Array<{
603
+ key: string;
604
+ value: unknown;
605
+ }>;
606
+ line_items?: Array<{
607
+ id: number;
608
+ quantity?: number;
609
+ refund_total?: number;
610
+ refund_tax?: Array<{
611
+ id: number;
612
+ refund_total: number;
613
+ }>;
614
+ }>;
615
+ api_refund?: boolean;
616
+ }
617
+
618
+ interface WCProductAttribute {
585
619
  id: number;
586
- parent_id: number;
587
- status: 'pending' | 'processing' | 'on-hold' | 'completed' | 'cancelled' | 'refunded' | 'failed' | 'trash';
588
- currency: string;
620
+ name: string;
621
+ slug: string;
622
+ type: 'select' | 'text' | 'color' | 'button' | 'image';
623
+ order_by: 'menu_order' | 'name' | 'name_num' | 'id';
624
+ has_archives: boolean;
625
+ }
626
+ interface WCAttributeTerm {
627
+ id: number;
628
+ name: string;
629
+ slug: string;
630
+ description: string;
631
+ menu_order: number;
632
+ count: number;
633
+ }
634
+ interface CreateProductAttributeInput {
635
+ name: string;
636
+ slug?: string;
637
+ type?: WCProductAttribute['type'];
638
+ order_by?: WCProductAttribute['order_by'];
639
+ has_archives?: boolean;
640
+ }
641
+ type UpdateProductAttributeInput = Partial<CreateProductAttributeInput>;
642
+ interface CreateAttributeTermInput {
643
+ name: string;
644
+ slug?: string;
645
+ description?: string;
646
+ menu_order?: number;
647
+ }
648
+ type UpdateAttributeTermInput = Partial<CreateAttributeTermInput>;
649
+
650
+ type WCReviewStatus = 'approved' | 'hold' | 'spam' | 'unspam' | 'trash' | 'untrash';
651
+ interface WCProductReview {
652
+ id: number;
653
+ date_created: string;
654
+ date_created_gmt: string;
655
+ product_id: number;
656
+ product_name: string;
657
+ product_permalink: string;
658
+ status: WCReviewStatus;
659
+ reviewer: string;
660
+ reviewer_email: string;
661
+ review: string;
662
+ rating: number;
663
+ verified: boolean;
664
+ reviewer_avatar_urls: Record<string, string>;
665
+ }
666
+ interface CreateProductReviewInput {
667
+ product_id: number;
668
+ review: string;
669
+ reviewer: string;
670
+ reviewer_email: string;
671
+ rating: number;
672
+ status?: WCReviewStatus;
673
+ }
674
+ interface UpdateProductReviewInput {
675
+ product_id?: number;
676
+ review?: string;
677
+ reviewer?: string;
678
+ reviewer_email?: string;
679
+ rating?: number;
680
+ status?: WCReviewStatus;
681
+ }
682
+ interface WCProductReviewFilterParams {
683
+ product?: number[];
684
+ status?: WCReviewStatus;
685
+ reviewer?: string;
686
+ reviewer_email?: string;
687
+ }
688
+
689
+ interface WCShippingClass {
690
+ id: number;
691
+ name: string;
692
+ slug: string;
693
+ description: string;
694
+ count: number;
695
+ }
696
+ interface CreateShippingClassInput {
697
+ name: string;
698
+ slug?: string;
699
+ description?: string;
700
+ }
701
+ type UpdateShippingClassInput = Partial<CreateShippingClassInput>;
702
+
703
+ interface WCTaxRate {
704
+ id: number;
705
+ country: string;
706
+ state: string;
707
+ postcode: string;
708
+ city: string;
709
+ postcodes: string[];
710
+ cities: string[];
711
+ rate: string;
712
+ name: string;
713
+ priority: number;
714
+ compound: boolean;
715
+ shipping: boolean;
716
+ order: number;
717
+ class: string;
718
+ }
719
+ interface WCTaxClass {
720
+ slug: string;
721
+ name: string;
722
+ }
723
+ interface CreateTaxRateInput {
724
+ country?: string;
725
+ state?: string;
726
+ postcode?: string;
727
+ city?: string;
728
+ postcodes?: string[];
729
+ cities?: string[];
730
+ rate?: string;
731
+ name?: string;
732
+ priority?: number;
733
+ compound?: boolean;
734
+ shipping?: boolean;
735
+ order?: number;
736
+ class?: string;
737
+ }
738
+ type UpdateTaxRateInput = Partial<CreateTaxRateInput>;
739
+ interface CreateTaxClassInput {
740
+ name: string;
741
+ }
742
+
743
+ interface WCShippingZone {
744
+ id: number;
745
+ name: string;
746
+ order: number;
747
+ }
748
+ interface WCShippingZoneLocation {
749
+ code: string;
750
+ type: 'postcode' | 'state' | 'country' | 'continent';
751
+ }
752
+ interface WCShippingZoneMethod {
753
+ instance_id: number;
754
+ title: string;
755
+ order: number;
756
+ enabled: boolean;
757
+ method_id: string;
758
+ method_title: string;
759
+ method_description: string;
760
+ settings: Record<string, {
761
+ id: string;
762
+ label: string;
763
+ description: string;
764
+ type: string;
765
+ value: string;
766
+ default: string;
767
+ tip: string;
768
+ placeholder: string;
769
+ }>;
770
+ }
771
+ interface WCShippingMethod {
772
+ id: string;
773
+ title: string;
774
+ description: string;
775
+ }
776
+ interface CreateShippingZoneInput {
777
+ name: string;
778
+ order?: number;
779
+ }
780
+ type UpdateShippingZoneInput = Partial<CreateShippingZoneInput>;
781
+ interface CreateShippingZoneMethodInput {
782
+ method_id: string;
783
+ order?: number;
784
+ enabled?: boolean;
785
+ }
786
+ interface UpdateShippingZoneMethodInput {
787
+ title?: string;
788
+ order?: number;
789
+ enabled?: boolean;
790
+ settings?: Record<string, {
791
+ value: string;
792
+ }>;
793
+ }
794
+
795
+ type WCWebhookStatus = 'active' | 'paused' | 'disabled';
796
+ type WCWebhookTopic = 'coupon.created' | 'coupon.updated' | 'coupon.deleted' | 'coupon.restored' | 'customer.created' | 'customer.updated' | 'customer.deleted' | 'order.created' | 'order.updated' | 'order.deleted' | 'order.restored' | 'product.created' | 'product.updated' | 'product.deleted' | 'product.restored' | 'action.woocommerce_checkout_order_created' | string;
797
+ interface WCWebhook {
798
+ id: number;
799
+ name: string;
800
+ status: WCWebhookStatus;
801
+ topic: WCWebhookTopic;
802
+ resource: string;
803
+ event: string;
804
+ hooks: string[];
805
+ delivery_url: string;
806
+ secret: string;
589
807
  date_created: string;
808
+ date_created_gmt: string;
590
809
  date_modified: string;
591
- discount_total: string;
592
- discount_tax: string;
593
- shipping_total: string;
594
- shipping_tax: string;
595
- cart_tax: string;
596
- total: string;
810
+ date_modified_gmt: string;
811
+ }
812
+ interface CreateWebhookInput {
813
+ name?: string;
814
+ status?: WCWebhookStatus;
815
+ topic: WCWebhookTopic;
816
+ delivery_url: string;
817
+ secret?: string;
818
+ }
819
+ interface UpdateWebhookInput {
820
+ name?: string;
821
+ status?: WCWebhookStatus;
822
+ topic?: WCWebhookTopic;
823
+ delivery_url?: string;
824
+ secret?: string;
825
+ }
826
+
827
+ interface WCSettingGroup {
828
+ id: string;
829
+ label: string;
830
+ description: string;
831
+ parent_id: string;
832
+ sub_groups: string[];
833
+ }
834
+ interface WCSettingOption {
835
+ id: string;
836
+ label: string;
837
+ description: string;
838
+ type: 'text' | 'email' | 'number' | 'color' | 'password' | 'textarea' | 'select' | 'multiselect' | 'radio' | 'image_width' | 'checkbox';
839
+ value: string | string[];
840
+ default: string | string[];
841
+ tip: string;
842
+ placeholder: string;
843
+ options?: Record<string, string>;
844
+ group_id: string;
845
+ }
846
+
847
+ interface WCSalesReport {
848
+ total_sales: string;
849
+ net_sales: string;
850
+ average_sales: string;
851
+ total_orders: number;
852
+ total_items: number;
597
853
  total_tax: string;
598
- customer_id: number;
599
- order_key: string;
600
- billing: WCAddress;
601
- shipping: WCAddress;
602
- payment_method: string;
603
- payment_method_title: string;
604
- transaction_id: string;
605
- customer_note: string;
606
- line_items: WCOrderLineItem[];
607
- shipping_lines: WCShippingLine[];
608
- meta_data: Array<{
609
- id: number;
610
- key: string;
611
- value: unknown;
854
+ total_shipping: string;
855
+ total_refunds: number;
856
+ total_discount: string;
857
+ totals_grouped_by: string;
858
+ totals: Record<string, {
859
+ sales: string;
860
+ orders: number;
861
+ items: number;
862
+ tax: string;
863
+ shipping: string;
864
+ discount: string;
865
+ customers: number;
612
866
  }>;
613
867
  }
614
- interface WCCreateOrderInput {
615
- status?: WCOrder['status'];
616
- payment_method?: string;
617
- payment_method_title?: string;
618
- customer_id?: number;
619
- customer_note?: string;
620
- billing?: Partial<WCAddress>;
621
- shipping?: Partial<WCAddress>;
622
- line_items: Array<{
623
- product_id: number;
624
- variation_id?: number;
625
- quantity: number;
626
- }>;
627
- coupon_lines?: Array<{
868
+ interface WCTopSeller {
869
+ title: string;
870
+ product_id: number;
871
+ quantity: number;
872
+ }
873
+ interface WCStatusCount {
874
+ slug: string;
875
+ name: string;
876
+ total: number;
877
+ }
878
+ interface WCSalesReportParams {
879
+ period?: 'week' | 'month' | 'last_month' | 'year';
880
+ date_min?: string;
881
+ date_max?: string;
882
+ }
883
+ interface WCTopSellersParams {
884
+ period?: 'week' | 'month' | 'last_month' | 'year';
885
+ date_min?: string;
886
+ date_max?: string;
887
+ }
888
+
889
+ interface WCCurrency {
890
+ code: string;
891
+ name: string;
892
+ symbol: string;
893
+ }
894
+ interface WCCountry {
895
+ code: string;
896
+ name: string;
897
+ states: Array<{
628
898
  code: string;
899
+ name: string;
629
900
  }>;
630
- shipping_lines?: Array<{
631
- method_id: string;
632
- method_title: string;
633
- total: string;
901
+ }
902
+ interface WCContinent {
903
+ code: string;
904
+ name: string;
905
+ countries: WCCountry[];
906
+ }
907
+ interface WCSystemStatus {
908
+ environment: {
909
+ home_url: string;
910
+ site_url: string;
911
+ wc_version: string;
912
+ wordpress_version: string;
913
+ php_version: string;
914
+ mysql_version: string;
915
+ server_info: string;
916
+ wp_debug_mode: boolean;
917
+ wp_cron: boolean;
918
+ language: string;
919
+ external_object_cache: boolean | null;
920
+ };
921
+ database: {
922
+ wc_database_version: string;
923
+ database_prefix: string;
924
+ maxmind_geoip_database: string;
925
+ database_tables: Record<string, Record<string, {
926
+ name: string;
927
+ engine: string;
928
+ collation: string;
929
+ }>>;
930
+ };
931
+ active_plugins: Array<{
932
+ plugin: string;
933
+ name: string;
934
+ version: string;
935
+ author_name: string;
936
+ author_url: string;
937
+ network_activated: boolean;
634
938
  }>;
635
- meta_data?: Array<{
636
- key: string;
637
- value: unknown;
939
+ settings: {
940
+ api_enabled: boolean;
941
+ force_ssl: boolean;
942
+ currency: string;
943
+ currency_symbol: string;
944
+ currency_position: string;
945
+ thousand_separator: string;
946
+ decimal_separator: string;
947
+ number_of_decimals: number;
948
+ geolocation_enabled: boolean;
949
+ taxonomies: Record<string, string>;
950
+ product_visibility_terms: Record<string, string>;
951
+ };
952
+ security: {
953
+ secure_connection: boolean;
954
+ hide_errors: boolean;
955
+ };
956
+ pages: Array<{
957
+ page_name: string;
958
+ page_id: string;
959
+ page_set: boolean;
960
+ page_exists: boolean;
961
+ page_visible: boolean;
962
+ shortcode: string;
963
+ shortcode_required: boolean;
964
+ shortcode_present: boolean;
638
965
  }>;
639
- set_paid?: boolean;
966
+ }
967
+ interface WCSystemStatusTool {
968
+ id: string;
969
+ name: string;
970
+ action: string;
971
+ description: string;
972
+ success?: boolean;
973
+ message?: string;
640
974
  }
641
975
 
642
976
  interface WCCoupon {
@@ -674,40 +1008,26 @@ interface CreateCouponInput {
674
1008
  }
675
1009
  type UpdateCouponInput = Partial<CreateCouponInput>;
676
1010
 
677
- interface WCCustomer {
678
- id: number;
679
- date_created: string;
680
- date_modified: string;
681
- email: string;
682
- first_name: string;
683
- last_name: string;
684
- role: string;
685
- username: string;
686
- billing: WCAddress;
687
- shipping: Omit<WCAddress, 'email' | 'phone'>;
688
- is_paying_customer: boolean;
689
- avatar_url: string;
690
- orders_count: number;
691
- total_spent: string;
692
- meta_data: Array<{
693
- id: number;
694
- key: string;
695
- value: unknown;
696
- }>;
1011
+ interface WCPaymentGatewaySetting {
1012
+ id: string;
1013
+ label: string;
1014
+ description: string;
1015
+ type: 'text' | 'email' | 'number' | 'color' | 'password' | 'textarea' | 'select' | 'multiselect' | 'radio' | 'image_width' | 'checkbox';
1016
+ value: string;
1017
+ default: string;
1018
+ tip: string;
1019
+ placeholder: string;
697
1020
  }
698
-
699
- interface UpdateCustomerInput {
700
- email?: string;
701
- first_name?: string;
702
- last_name?: string;
703
- username?: string;
704
- password?: string;
705
- billing?: Partial<WCAddress>;
706
- shipping?: Partial<Omit<WCAddress, 'email' | 'phone'>>;
707
- meta_data?: {
708
- key: string;
709
- value: unknown;
710
- }[];
1021
+ interface WCPaymentGateway {
1022
+ id: string;
1023
+ title: string;
1024
+ description: string;
1025
+ order: number;
1026
+ enabled: boolean;
1027
+ method_title: string;
1028
+ method_description: string;
1029
+ method_supports: string[];
1030
+ settings: Record<string, WCPaymentGatewaySetting>;
711
1031
  }
712
1032
 
713
1033
  interface OmnibusPriceEntry {
@@ -740,6 +1060,9 @@ declare function withOmnibusVariation(variation: WCProductVariation & {
740
1060
  }): WCProductVariationWithOmnibus;
741
1061
 
742
1062
  declare function createWooCommerceClient(config: WooCommerceConfig): {
1063
+ getPaymentGateways: () => Promise<WCPaymentGateway[]>;
1064
+ getEnabledPaymentGateways: () => Promise<WCPaymentGateway[]>;
1065
+ getPaymentGatewayById: (id: string) => Promise<WCPaymentGateway>;
743
1066
  getCustomerById: (id: number) => Promise<WCCustomer>;
744
1067
  getCustomerByEmail: (email: string) => Promise<WCCustomer | undefined>;
745
1068
  getCustomerByEmailNoCache: (email: string) => Promise<WCCustomer | undefined>;
@@ -766,6 +1089,122 @@ declare function createWooCommerceClient(config: WooCommerceConfig): {
766
1089
  coupon?: WCCoupon;
767
1090
  reason?: string;
768
1091
  }>;
1092
+ getCurrencies: () => Promise<WCCurrency[]>;
1093
+ getCurrentCurrency: () => Promise<WCCurrency>;
1094
+ getCurrencyByCode: (code: string) => Promise<WCCurrency>;
1095
+ getContinents: () => Promise<WCContinent[]>;
1096
+ getContinentByCode: (code: string) => Promise<WCContinent>;
1097
+ getCountries: () => Promise<WCCountry[]>;
1098
+ getCountryByCode: (code: string) => Promise<WCCountry>;
1099
+ getTimeZones: () => Promise<Record<string, string>>;
1100
+ getSystemStatus: () => Promise<WCSystemStatus>;
1101
+ getSystemStatusTools: () => Promise<WCSystemStatusTool[]>;
1102
+ runSystemStatusTool: (toolId: string) => Promise<WCSystemStatusTool>;
1103
+ getSalesReport: (params?: WCSalesReportParams) => Promise<WCSalesReport[]>;
1104
+ getTopSellers: (params?: WCTopSellersParams) => Promise<WCTopSeller[]>;
1105
+ getOrdersTotals: () => Promise<WCStatusCount[]>;
1106
+ getProductsTotals: () => Promise<WCStatusCount[]>;
1107
+ getCustomersTotals: () => Promise<WCStatusCount[]>;
1108
+ getCouponsTotals: () => Promise<WCStatusCount[]>;
1109
+ getReviewsTotals: () => Promise<WCStatusCount[]>;
1110
+ getSettingGroups: () => Promise<WCSettingGroup[]>;
1111
+ getSettingOptions: (groupId: string) => Promise<WCSettingOption[]>;
1112
+ getSettingOption: (groupId: string, optionId: string) => Promise<WCSettingOption>;
1113
+ updateSettingOption: (groupId: string, optionId: string, value: string | string[]) => Promise<WCSettingOption>;
1114
+ getWebhooks: (params?: {
1115
+ status?: WCWebhookStatus;
1116
+ }) => Promise<WCWebhook[]>;
1117
+ getWebhookById: (id: number) => Promise<WCWebhook>;
1118
+ createWebhook: (input: CreateWebhookInput) => Promise<WCWebhook>;
1119
+ updateWebhook: (id: number, input: UpdateWebhookInput) => Promise<WCWebhook>;
1120
+ deleteWebhook: (id: number, force?: boolean) => Promise<{
1121
+ deleted: boolean;
1122
+ previous: WCWebhook;
1123
+ }>;
1124
+ getShippingZones: () => Promise<WCShippingZone[]>;
1125
+ getShippingZoneById: (id: number) => Promise<WCShippingZone>;
1126
+ createShippingZone: (input: CreateShippingZoneInput) => Promise<WCShippingZone>;
1127
+ updateShippingZone: (id: number, input: UpdateShippingZoneInput) => Promise<WCShippingZone>;
1128
+ deleteShippingZone: (id: number, force?: boolean) => Promise<{
1129
+ deleted: boolean;
1130
+ previous: WCShippingZone;
1131
+ }>;
1132
+ getShippingZoneLocations: (zoneId: number) => Promise<WCShippingZoneLocation[]>;
1133
+ updateShippingZoneLocations: (zoneId: number, locations: WCShippingZoneLocation[]) => Promise<WCShippingZoneLocation[]>;
1134
+ getShippingZoneMethods: (zoneId: number) => Promise<WCShippingZoneMethod[]>;
1135
+ getShippingZoneMethodById: (zoneId: number, instanceId: number) => Promise<WCShippingZoneMethod>;
1136
+ createShippingZoneMethod: (zoneId: number, input: CreateShippingZoneMethodInput) => Promise<WCShippingZoneMethod>;
1137
+ updateShippingZoneMethod: (zoneId: number, instanceId: number, input: UpdateShippingZoneMethodInput) => Promise<WCShippingZoneMethod>;
1138
+ deleteShippingZoneMethod: (zoneId: number, instanceId: number, force?: boolean) => Promise<{
1139
+ deleted: boolean;
1140
+ previous: WCShippingZoneMethod;
1141
+ }>;
1142
+ getShippingMethods: () => Promise<WCShippingMethod[]>;
1143
+ getShippingMethodById: (id: string) => Promise<WCShippingMethod>;
1144
+ getTaxRates: (params?: {
1145
+ class?: string;
1146
+ per_page?: number;
1147
+ }) => Promise<WCTaxRate[]>;
1148
+ getTaxRateById: (id: number) => Promise<WCTaxRate>;
1149
+ createTaxRate: (input: CreateTaxRateInput) => Promise<WCTaxRate>;
1150
+ updateTaxRate: (id: number, input: UpdateTaxRateInput) => Promise<WCTaxRate>;
1151
+ deleteTaxRate: (id: number, force?: boolean) => Promise<{
1152
+ deleted: boolean;
1153
+ previous: WCTaxRate;
1154
+ }>;
1155
+ getTaxClasses: () => Promise<WCTaxClass[]>;
1156
+ createTaxClass: (input: CreateTaxClassInput) => Promise<WCTaxClass>;
1157
+ deleteTaxClass: (slug: string, force?: boolean) => Promise<{
1158
+ deleted: boolean;
1159
+ previous: WCTaxClass;
1160
+ }>;
1161
+ getShippingClasses: () => Promise<WCShippingClass[]>;
1162
+ getShippingClassById: (id: number) => Promise<WCShippingClass>;
1163
+ createShippingClass: (input: CreateShippingClassInput) => Promise<WCShippingClass>;
1164
+ updateShippingClass: (id: number, input: UpdateShippingClassInput) => Promise<WCShippingClass>;
1165
+ deleteShippingClass: (id: number, force?: boolean) => Promise<{
1166
+ deleted: boolean;
1167
+ previous: WCShippingClass;
1168
+ }>;
1169
+ getProductReviews: (params?: WCProductReviewFilterParams) => Promise<WCProductReview[]>;
1170
+ getProductReviewsByProductId: (productId: number) => Promise<WCProductReview[]>;
1171
+ getProductReviewById: (id: number) => Promise<WCProductReview>;
1172
+ createProductReview: (input: CreateProductReviewInput) => Promise<WCProductReview>;
1173
+ updateProductReview: (id: number, input: UpdateProductReviewInput) => Promise<WCProductReview>;
1174
+ deleteProductReview: (id: number, force?: boolean) => Promise<{
1175
+ deleted: boolean;
1176
+ previous: WCProductReview;
1177
+ }>;
1178
+ getProductAttributes: () => Promise<WCProductAttribute[]>;
1179
+ getProductAttributeById: (id: number) => Promise<WCProductAttribute>;
1180
+ createProductAttribute: (input: CreateProductAttributeInput) => Promise<WCProductAttribute>;
1181
+ updateProductAttribute: (id: number, input: UpdateProductAttributeInput) => Promise<WCProductAttribute>;
1182
+ deleteProductAttribute: (id: number, force?: boolean) => Promise<{
1183
+ deleted: boolean;
1184
+ previous: WCProductAttribute;
1185
+ }>;
1186
+ getAttributeTerms: (attributeId: number) => Promise<WCAttributeTerm[]>;
1187
+ getAttributeTermById: (attributeId: number, termId: number) => Promise<WCAttributeTerm>;
1188
+ createAttributeTerm: (attributeId: number, input: CreateAttributeTermInput) => Promise<WCAttributeTerm>;
1189
+ updateAttributeTerm: (attributeId: number, termId: number, input: UpdateAttributeTermInput) => Promise<WCAttributeTerm>;
1190
+ deleteAttributeTerm: (attributeId: number, termId: number, force?: boolean) => Promise<{
1191
+ deleted: boolean;
1192
+ previous: WCAttributeTerm;
1193
+ }>;
1194
+ getRefundsByOrderId: (orderId: number) => Promise<WCOrderRefund[]>;
1195
+ getOrderRefundById: (orderId: number, refundId: number) => Promise<WCOrderRefund>;
1196
+ createOrderRefund: (orderId: number, input: WCCreateOrderRefundInput) => Promise<WCOrderRefund>;
1197
+ deleteOrderRefund: (orderId: number, refundId: number, force?: boolean) => Promise<{
1198
+ deleted: boolean;
1199
+ previous: WCOrderRefund;
1200
+ }>;
1201
+ getNotesByOrderId: (orderId: number) => Promise<WCOrderNote[]>;
1202
+ getOrderNoteById: (orderId: number, noteId: number) => Promise<WCOrderNote>;
1203
+ createOrderNote: (orderId: number, input: WCCreateOrderNoteInput) => Promise<WCOrderNote>;
1204
+ deleteOrderNote: (orderId: number, noteId: number, force?: boolean) => Promise<{
1205
+ deleted: boolean;
1206
+ previous: WCOrderNote;
1207
+ }>;
769
1208
  createOrder: (input: WCCreateOrderInput) => Promise<WCOrder>;
770
1209
  getOrderById: (id: number) => Promise<WCOrder>;
771
1210
  updateOrder: (id: number, data: Partial<WCCreateOrderInput>) => Promise<WCOrder>;
@@ -1568,24 +2007,4 @@ interface FaustPreviewDeps {
1568
2007
  declare function createFaustAuthHandler(config: FaustConfig): (request: Request, routePath: string) => Promise<Response>;
1569
2008
  declare function createPreviewHandler(config: FaustPreviewConfig, deps: FaustPreviewDeps): (request: Request) => Promise<Response>;
1570
2009
 
1571
- declare function createApplicationPasswordToken(username: string, appPassword: string): string;
1572
-
1573
- interface JwtAuthCredentials {
1574
- username: string;
1575
- password: string;
1576
- }
1577
- interface JwtAuthResponse {
1578
- token: string;
1579
- user_email: string;
1580
- user_nicename: string;
1581
- user_display_name: string;
1582
- }
1583
- declare class AuthenticationError extends Error {
1584
- status: number;
1585
- constructor(message: string, status: number);
1586
- }
1587
-
1588
- declare function authenticateJwt(config: NextWordpressConfig, credentials: JwtAuthCredentials): Promise<JwtAuthResponse>;
1589
- declare function validateJwtToken(config: NextWordpressConfig, token: string): Promise<boolean>;
1590
-
1591
- export { AuthenticationError, Author, type CF7SubmissionResponse, type CF7SubmissionStatus, type CF7ValidationError, type Category, type Comment, type CommentAuthorAvatar, type CreateAuthorInput, type CreateCategoryInput, type CreateCommentInput, type CreateCouponInput, type CreateMenuInput, type CreateMenuItemInput, type CreatePageInput, type CreatePostInput, type CreateProductCategoryInput, type CreateProductInput, type CreateProductTagInput, type CreateTagInput, type FaustConfig, type FaustPreviewConfig, type FaustPreviewDeps, FeaturedMedia, type GQLACFFieldGroup, type GQLAuthor, type GQLCPTNode, type GQLCategory, GQLConnection, type GQLCreateCommentInput, type GQLCreateCommentResult, type GQLCreatePostInput, type GQLCustomer, type GQLDeletePostResult, type GQLLineItem, type GQLMutatedComment, type GQLMutatedPost, type GQLOrder, type GQLOrderAddress, type GQLPage, type GQLPageWithSEO, GQLPost, GQLPostFilter, type GQLPostStatus, type GQLPostWithSEO, type GQLProduct, type GQLProductFilter, type GQLProductVariation, type GQLTag, type GQLUpdatePostInput, type GQLYoastSEO, type JwtAuthCredentials, type JwtAuthResponse, type Menu, type MenuItem, type MenuLocation, type MenuWithItems, NextWordpressConfig, type OmnibusPriceEntry, type OmnibusProductData, type Page, Post, RenderedContent, RenderedTitle, type RestPageStatus, type RestPostStatus, type RevalidationConfig, type RevalidationPayload, type RevalidationResult, type Tag, Taxonomy, type UpdateAuthorInput, type UpdateCategoryInput, type UpdateCommentInput, type UpdateCouponInput, type UpdateCustomerInput, type UpdateMediaInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePageInput, type UpdatePostInput, type UpdateProductCategoryInput, type UpdateProductInput, type UpdateProductTagInput, type UpdateTagInput, type UploadMediaInput, WCAddress, type WCCoupon, type WCCreateOrderInput, type WCCustomer, WCImage, type WCOrder, type WCOrderLineItem, WCProduct, type WCProductCategory, WCProductFilterParams, type WCProductStatus, type WCProductTag, WCProductVariation, type WCProductVariationWithOmnibus, type WCProductWithOmnibus, type WCShippingLine, WPEntity, WPGraphQLConfig, type WPGraphQLFetcher, WooCommerceConfig, type WooCommerceFetcher, WooCommerceResponse, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation };
2010
+ export { Author, type CF7SubmissionResponse, type CF7SubmissionStatus, type CF7ValidationError, type Category, type Comment, type CommentAuthorAvatar, type CreateAttributeTermInput, type CreateAuthorInput, type CreateCategoryInput, type CreateCommentInput, type CreateCouponInput, type CreateMenuInput, type CreateMenuItemInput, type CreatePageInput, type CreatePostInput, type CreateProductAttributeInput, type CreateProductCategoryInput, type CreateProductInput, type CreateProductReviewInput, type CreateProductTagInput, type CreateShippingClassInput, type CreateShippingZoneInput, type CreateShippingZoneMethodInput, type CreateTagInput, type CreateTaxClassInput, type CreateTaxRateInput, type CreateWebhookInput, type FaustConfig, type FaustPreviewConfig, type FaustPreviewDeps, FeaturedMedia, type GQLACFFieldGroup, type GQLAuthor, type GQLCPTNode, type GQLCategory, GQLConnection, type GQLCreateCommentInput, type GQLCreateCommentResult, type GQLCreatePostInput, type GQLCustomer, type GQLDeletePostResult, type GQLLineItem, type GQLMutatedComment, type GQLMutatedPost, type GQLOrder, type GQLOrderAddress, type GQLPage, type GQLPageWithSEO, GQLPost, GQLPostFilter, type GQLPostStatus, type GQLPostWithSEO, type GQLProduct, type GQLProductFilter, type GQLProductVariation, type GQLTag, type GQLUpdatePostInput, type GQLYoastSEO, JwtAuthCredentials, JwtAuthResponse, type Menu, type MenuItem, type MenuLocation, type MenuWithItems, NextWordpressConfig, type OmnibusPriceEntry, type OmnibusProductData, type Page, Post, RenderedContent, RenderedTitle, type RestPageStatus, type RestPostStatus, type RevalidationConfig, type RevalidationPayload, type RevalidationResult, type Tag, Taxonomy, type UpdateAttributeTermInput, type UpdateAuthorInput, type UpdateCategoryInput, type UpdateCommentInput, type UpdateCouponInput, UpdateCustomerInput, type UpdateMediaInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePageInput, type UpdatePostInput, type UpdateProductAttributeInput, type UpdateProductCategoryInput, type UpdateProductInput, type UpdateProductReviewInput, type UpdateProductTagInput, type UpdateShippingClassInput, type UpdateShippingZoneInput, type UpdateShippingZoneMethodInput, type UpdateTagInput, type UpdateTaxRateInput, type UpdateWebhookInput, type UploadMediaInput, WCAddress, type WCAttributeTerm, type WCContinent, type WCCountry, type WCCoupon, WCCreateOrderInput, type WCCreateOrderNoteInput, type WCCreateOrderRefundInput, type WCCurrency, WCCustomer, type WCProductAttribute as WCGlobalProductAttribute, WCImage, WCOrder, type WCOrderNote, type WCOrderRefund, type WCPaymentGateway, type WCPaymentGatewaySetting, WCProduct, type WCProductCategory, WCProductFilterParams, type WCProductReview, type WCProductReviewFilterParams, type WCProductStatus, type WCProductTag, WCProductVariation, type WCProductVariationWithOmnibus, type WCProductWithOmnibus, type WCRefundLineItem, type WCReviewStatus, type WCSalesReport, type WCSalesReportParams, type WCSettingGroup, type WCSettingOption, type WCShippingClass, type WCShippingMethod, type WCShippingZone, type WCShippingZoneLocation, type WCShippingZoneMethod, type WCStatusCount, type WCSystemStatus, type WCSystemStatusTool, type WCTaxClass, type WCTaxRate, type WCTopSeller, type WCTopSellersParams, type WCWebhook, type WCWebhookStatus, type WCWebhookTopic, WPEntity, WPGraphQLConfig, type WPGraphQLFetcher, WooCommerceConfig, type WooCommerceFetcher, WooCommerceResponse, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation };