@szymonpiatek/nextwordpress 0.0.18 → 0.0.20

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.
@@ -19,6 +19,8 @@ declare const ErrorCode: {
19
19
  readonly WOO_REVIEW_NOT_FOUND: "WOO_REVIEW_NOT_FOUND";
20
20
  readonly WOO_WEBHOOK_NOT_FOUND: "WOO_WEBHOOK_NOT_FOUND";
21
21
  readonly WOO_SHIPPING_ZONE_NOT_FOUND: "WOO_SHIPPING_ZONE_NOT_FOUND";
22
+ readonly WOO_WISHLIST_NOT_FOUND: "WOO_WISHLIST_NOT_FOUND";
23
+ readonly WOO_WISHLIST_ITEM_NOT_FOUND: "WOO_WISHLIST_ITEM_NOT_FOUND";
22
24
  readonly AUTH_JWT_FAILED: "AUTH_JWT_FAILED";
23
25
  readonly AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID";
24
26
  readonly AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID";
@@ -649,6 +651,88 @@ interface UpdateCustomerInput {
649
651
  }[];
650
652
  }
651
653
 
654
+ interface YithWishlistConfig {
655
+ serverURL: string;
656
+ clientURL?: string;
657
+ token: string;
658
+ cacheTTL?: number;
659
+ errorMessages?: Partial<Record<ErrorCode, string>>;
660
+ }
661
+ interface WCWishlistItem {
662
+ wishlist_item_id: number;
663
+ prod_id: number;
664
+ quantity: number;
665
+ dateadded: string;
666
+ }
667
+ interface WCWishlist {
668
+ id: number;
669
+ wishlist_token: string;
670
+ wishlist_name: string;
671
+ wishlist_privacy: 0 | 1 | 2;
672
+ dateadded: string;
673
+ user_id: number;
674
+ is_default: boolean;
675
+ items: WCWishlistItem[];
676
+ }
677
+ interface CreateWishlistInput {
678
+ wishlist_name: string;
679
+ wishlist_privacy?: 0 | 1 | 2;
680
+ is_default?: boolean;
681
+ }
682
+ interface UpdateWishlistInput {
683
+ wishlist_name?: string;
684
+ wishlist_privacy?: 0 | 1 | 2;
685
+ is_default?: boolean;
686
+ }
687
+ interface AddProductToWishlistInput {
688
+ product_id: number;
689
+ quantity?: number;
690
+ }
691
+
692
+ interface TIWishlistConfig {
693
+ serverURL: string;
694
+ clientURL?: string;
695
+ token: string;
696
+ cacheTTL?: number;
697
+ errorMessages?: Partial<Record<ErrorCode, string>>;
698
+ }
699
+ interface TIWishlistItem {
700
+ item_id: number;
701
+ product_id: number;
702
+ variation_id: number;
703
+ meta: Record<string, unknown>[];
704
+ date_added: string;
705
+ price: string;
706
+ in_stock: boolean;
707
+ }
708
+ interface TIWishlist {
709
+ id: number;
710
+ user_id: number;
711
+ date_added: string;
712
+ title: string;
713
+ share_key: string;
714
+ status?: number;
715
+ }
716
+ interface CreateTIWishlistInput {
717
+ title: string;
718
+ user_id?: number;
719
+ status?: number;
720
+ }
721
+ interface UpdateTIWishlistInput {
722
+ title?: string;
723
+ user_id?: number;
724
+ }
725
+ interface AddProductToTIWishlistInput {
726
+ product_id: number;
727
+ variation_id?: number;
728
+ meta?: Record<string, unknown>[];
729
+ }
730
+ interface GetTIWishlistProductsParams {
731
+ count?: number;
732
+ offset?: number;
733
+ order?: string;
734
+ }
735
+
652
736
  interface GQLPostFilter {
653
737
  authorName?: string;
654
738
  categoryName?: string;
@@ -753,4 +837,4 @@ declare class CF7Error extends Error {
753
837
  constructor(code: ErrorCode, status: number, endpoint: string, message: string);
754
838
  }
755
839
 
756
- export { type GQLError as $, type Author as A, type WCImage as B, type CookieConsentCategories as C, type WCProductVariation as D, type WCAddress as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type WPULikeVoteParams as H, type GQLSendPasswordResetEmailInput as I, type JwtAuthCredentials as J, type GQLResetUserPasswordInput as K, AuthenticationError as L, type BlockType as M, type NextWordpressConfig as N, CF7Error as O, type Post as P, type CF7SubmissionStatus as Q, type RestSendPasswordResetEmailResult as R, type CF7ValidationError as S, type Taxonomy as T, type UpdateCustomerInput as U, type CookieConsentConfig as V, type WPGraphQLConfig as W, type EditorBlock as X, type EmbeddedAuthor as Y, type EmbeddedTerm as Z, ErrorCode as _, type GQLResetUserPasswordResult as a, type GQLPageInfo as a0, type MediaDetails as a1, type MediaSize as a2, type PostEmbedded as a3, type SearchResult as a4, type TemplatePart as a5, type WCDimensions as a6, type WCOrderLineItem as a7, type WCProductAttribute as a8, type WCProductDefaultAttribute as a9, type WCShippingLine as aa, WPGraphQLError as ab, type WPULikeItemType as ac, WooCommerceError as ad, type WooCommercePaginationHeaders as ae, WordPressAPIError as af, createCookieConsentHandler as ag, defaultMessages as ah, defaultMessagesPl as ai, parseCookieConsent as aj, resolveMessage as ak, type RestResetUserPasswordResult as b, type WordPressResponse as c, type WooCommerceConfig as d, type WCProduct as e, type WCProductFilterParams as f, type WooCommerceResponse as g, type WCCreateOrderInput as h, type WCOrder as i, type WCCustomer as j, type GQLPost as k, type GQLPostFilter as l, type GQLConnection as m, type WPULikeStatsParams as n, type WPULikeStats as o, type WPULikeStatus as p, type WPULikeVoteResponse as q, type WPULikeCheckParams as r, type WPULikeCheckResponse as s, type CF7SubmissionResponse as t, type JwtAuthResponse as u, type WPEntity as v, type RenderedTitle as w, type RenderedContent as x, type RestSendPasswordResetEmailInput as y, type RestResetUserPasswordInput as z };
840
+ export { type WPULikeVoteParams as $, type WPEntity as A, type RenderedTitle as B, type CookieConsentCategories as C, type RenderedContent as D, type Author as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type RestSendPasswordResetEmailInput as H, type RestResetUserPasswordInput as I, type JwtAuthCredentials as J, type WCImage as K, ErrorCode as L, type CreateWishlistInput as M, type NextWordpressConfig as N, type UpdateWishlistInput as O, type Post as P, type AddProductToWishlistInput as Q, type RestSendPasswordResetEmailResult as R, type CreateTIWishlistInput as S, type TIWishlistConfig as T, type UpdateCustomerInput as U, type UpdateTIWishlistInput as V, type WPGraphQLConfig as W, type AddProductToTIWishlistInput as X, type YithWishlistConfig as Y, type WCProductVariation as Z, type WCAddress as _, type GQLResetUserPasswordResult as a, type GQLSendPasswordResetEmailInput as a0, type GQLResetUserPasswordInput as a1, AuthenticationError as a2, type BlockType as a3, CF7Error as a4, type CF7SubmissionStatus as a5, type CF7ValidationError as a6, type CookieConsentConfig as a7, type EditorBlock as a8, type EmbeddedAuthor as a9, type EmbeddedTerm as aa, type GQLError as ab, type GQLPageInfo as ac, type MediaDetails as ad, type MediaSize as ae, type PostEmbedded as af, type SearchResult as ag, type TemplatePart as ah, type WCDimensions as ai, type WCOrderLineItem as aj, type WCProductAttribute as ak, type WCProductDefaultAttribute as al, type WCShippingLine as am, type WCWishlistItem as an, WPGraphQLError as ao, type WPULikeItemType as ap, WooCommerceError as aq, type WooCommercePaginationHeaders as ar, WordPressAPIError as as, createCookieConsentHandler as at, defaultMessages as au, defaultMessagesPl as av, parseCookieConsent as aw, resolveMessage as ax, type RestResetUserPasswordResult as b, type WordPressResponse as c, type WooCommerceConfig as d, type WCProduct as e, type WCProductFilterParams as f, type WooCommerceResponse as g, type WCCreateOrderInput as h, type WCOrder as i, type WCCustomer as j, type WCWishlist as k, type TIWishlist as l, type GetTIWishlistProductsParams as m, type TIWishlistItem as n, type GQLPost as o, type GQLPostFilter as p, type GQLConnection as q, type WPULikeStatsParams as r, type WPULikeStats as s, type WPULikeStatus as t, type WPULikeVoteResponse as u, type WPULikeCheckParams as v, type WPULikeCheckResponse as w, type CF7SubmissionResponse as x, type JwtAuthResponse as y, type Taxonomy as z };
@@ -19,6 +19,8 @@ declare const ErrorCode: {
19
19
  readonly WOO_REVIEW_NOT_FOUND: "WOO_REVIEW_NOT_FOUND";
20
20
  readonly WOO_WEBHOOK_NOT_FOUND: "WOO_WEBHOOK_NOT_FOUND";
21
21
  readonly WOO_SHIPPING_ZONE_NOT_FOUND: "WOO_SHIPPING_ZONE_NOT_FOUND";
22
+ readonly WOO_WISHLIST_NOT_FOUND: "WOO_WISHLIST_NOT_FOUND";
23
+ readonly WOO_WISHLIST_ITEM_NOT_FOUND: "WOO_WISHLIST_ITEM_NOT_FOUND";
22
24
  readonly AUTH_JWT_FAILED: "AUTH_JWT_FAILED";
23
25
  readonly AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID";
24
26
  readonly AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID";
@@ -649,6 +651,88 @@ interface UpdateCustomerInput {
649
651
  }[];
650
652
  }
651
653
 
654
+ interface YithWishlistConfig {
655
+ serverURL: string;
656
+ clientURL?: string;
657
+ token: string;
658
+ cacheTTL?: number;
659
+ errorMessages?: Partial<Record<ErrorCode, string>>;
660
+ }
661
+ interface WCWishlistItem {
662
+ wishlist_item_id: number;
663
+ prod_id: number;
664
+ quantity: number;
665
+ dateadded: string;
666
+ }
667
+ interface WCWishlist {
668
+ id: number;
669
+ wishlist_token: string;
670
+ wishlist_name: string;
671
+ wishlist_privacy: 0 | 1 | 2;
672
+ dateadded: string;
673
+ user_id: number;
674
+ is_default: boolean;
675
+ items: WCWishlistItem[];
676
+ }
677
+ interface CreateWishlistInput {
678
+ wishlist_name: string;
679
+ wishlist_privacy?: 0 | 1 | 2;
680
+ is_default?: boolean;
681
+ }
682
+ interface UpdateWishlistInput {
683
+ wishlist_name?: string;
684
+ wishlist_privacy?: 0 | 1 | 2;
685
+ is_default?: boolean;
686
+ }
687
+ interface AddProductToWishlistInput {
688
+ product_id: number;
689
+ quantity?: number;
690
+ }
691
+
692
+ interface TIWishlistConfig {
693
+ serverURL: string;
694
+ clientURL?: string;
695
+ token: string;
696
+ cacheTTL?: number;
697
+ errorMessages?: Partial<Record<ErrorCode, string>>;
698
+ }
699
+ interface TIWishlistItem {
700
+ item_id: number;
701
+ product_id: number;
702
+ variation_id: number;
703
+ meta: Record<string, unknown>[];
704
+ date_added: string;
705
+ price: string;
706
+ in_stock: boolean;
707
+ }
708
+ interface TIWishlist {
709
+ id: number;
710
+ user_id: number;
711
+ date_added: string;
712
+ title: string;
713
+ share_key: string;
714
+ status?: number;
715
+ }
716
+ interface CreateTIWishlistInput {
717
+ title: string;
718
+ user_id?: number;
719
+ status?: number;
720
+ }
721
+ interface UpdateTIWishlistInput {
722
+ title?: string;
723
+ user_id?: number;
724
+ }
725
+ interface AddProductToTIWishlistInput {
726
+ product_id: number;
727
+ variation_id?: number;
728
+ meta?: Record<string, unknown>[];
729
+ }
730
+ interface GetTIWishlistProductsParams {
731
+ count?: number;
732
+ offset?: number;
733
+ order?: string;
734
+ }
735
+
652
736
  interface GQLPostFilter {
653
737
  authorName?: string;
654
738
  categoryName?: string;
@@ -753,4 +837,4 @@ declare class CF7Error extends Error {
753
837
  constructor(code: ErrorCode, status: number, endpoint: string, message: string);
754
838
  }
755
839
 
756
- export { type GQLError as $, type Author as A, type WCImage as B, type CookieConsentCategories as C, type WCProductVariation as D, type WCAddress as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type WPULikeVoteParams as H, type GQLSendPasswordResetEmailInput as I, type JwtAuthCredentials as J, type GQLResetUserPasswordInput as K, AuthenticationError as L, type BlockType as M, type NextWordpressConfig as N, CF7Error as O, type Post as P, type CF7SubmissionStatus as Q, type RestSendPasswordResetEmailResult as R, type CF7ValidationError as S, type Taxonomy as T, type UpdateCustomerInput as U, type CookieConsentConfig as V, type WPGraphQLConfig as W, type EditorBlock as X, type EmbeddedAuthor as Y, type EmbeddedTerm as Z, ErrorCode as _, type GQLResetUserPasswordResult as a, type GQLPageInfo as a0, type MediaDetails as a1, type MediaSize as a2, type PostEmbedded as a3, type SearchResult as a4, type TemplatePart as a5, type WCDimensions as a6, type WCOrderLineItem as a7, type WCProductAttribute as a8, type WCProductDefaultAttribute as a9, type WCShippingLine as aa, WPGraphQLError as ab, type WPULikeItemType as ac, WooCommerceError as ad, type WooCommercePaginationHeaders as ae, WordPressAPIError as af, createCookieConsentHandler as ag, defaultMessages as ah, defaultMessagesPl as ai, parseCookieConsent as aj, resolveMessage as ak, type RestResetUserPasswordResult as b, type WordPressResponse as c, type WooCommerceConfig as d, type WCProduct as e, type WCProductFilterParams as f, type WooCommerceResponse as g, type WCCreateOrderInput as h, type WCOrder as i, type WCCustomer as j, type GQLPost as k, type GQLPostFilter as l, type GQLConnection as m, type WPULikeStatsParams as n, type WPULikeStats as o, type WPULikeStatus as p, type WPULikeVoteResponse as q, type WPULikeCheckParams as r, type WPULikeCheckResponse as s, type CF7SubmissionResponse as t, type JwtAuthResponse as u, type WPEntity as v, type RenderedTitle as w, type RenderedContent as x, type RestSendPasswordResetEmailInput as y, type RestResetUserPasswordInput as z };
840
+ export { type WPULikeVoteParams as $, type WPEntity as A, type RenderedTitle as B, type CookieConsentCategories as C, type RenderedContent as D, type Author as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type RestSendPasswordResetEmailInput as H, type RestResetUserPasswordInput as I, type JwtAuthCredentials as J, type WCImage as K, ErrorCode as L, type CreateWishlistInput as M, type NextWordpressConfig as N, type UpdateWishlistInput as O, type Post as P, type AddProductToWishlistInput as Q, type RestSendPasswordResetEmailResult as R, type CreateTIWishlistInput as S, type TIWishlistConfig as T, type UpdateCustomerInput as U, type UpdateTIWishlistInput as V, type WPGraphQLConfig as W, type AddProductToTIWishlistInput as X, type YithWishlistConfig as Y, type WCProductVariation as Z, type WCAddress as _, type GQLResetUserPasswordResult as a, type GQLSendPasswordResetEmailInput as a0, type GQLResetUserPasswordInput as a1, AuthenticationError as a2, type BlockType as a3, CF7Error as a4, type CF7SubmissionStatus as a5, type CF7ValidationError as a6, type CookieConsentConfig as a7, type EditorBlock as a8, type EmbeddedAuthor as a9, type EmbeddedTerm as aa, type GQLError as ab, type GQLPageInfo as ac, type MediaDetails as ad, type MediaSize as ae, type PostEmbedded as af, type SearchResult as ag, type TemplatePart as ah, type WCDimensions as ai, type WCOrderLineItem as aj, type WCProductAttribute as ak, type WCProductDefaultAttribute as al, type WCShippingLine as am, type WCWishlistItem as an, WPGraphQLError as ao, type WPULikeItemType as ap, WooCommerceError as aq, type WooCommercePaginationHeaders as ar, WordPressAPIError as as, createCookieConsentHandler as at, defaultMessages as au, defaultMessagesPl as av, parseCookieConsent as aw, resolveMessage as ax, type RestResetUserPasswordResult as b, type WordPressResponse as c, type WooCommerceConfig as d, type WCProduct as e, type WCProductFilterParams as f, type WooCommerceResponse as g, type WCCreateOrderInput as h, type WCOrder as i, type WCCustomer as j, type WCWishlist as k, type TIWishlist as l, type GetTIWishlistProductsParams as m, type TIWishlistItem as n, type GQLPost as o, type GQLPostFilter as p, type GQLConnection as q, type WPULikeStatsParams as r, type WPULikeStats as s, type WPULikeStatus as t, type WPULikeVoteResponse as u, type WPULikeCheckParams as v, type WPULikeCheckResponse as w, type CF7SubmissionResponse as x, type JwtAuthResponse as y, type Taxonomy as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@szymonpiatek/nextwordpress",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Szymon Piątek - Next.js WordPress client (types, queries, fetcher)",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,