@szymonpiatek/nextwordpress 0.0.17 → 0.0.19
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/client/index.cjs +210 -38
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +207 -39
- package/dist/client/index.js.map +1 -1
- package/dist/hooks/index.cjs +210 -38
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +19 -4
- package/dist/hooks/index.d.ts +19 -4
- package/dist/hooks/index.js +207 -39
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +174 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -12
- package/dist/index.d.ts +45 -12
- package/dist/index.js +171 -12
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +174 -11
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +171 -12
- package/dist/server/index.js.map +1 -1
- package/dist/{types-DVzJO3P-.d.cts → types-DUmH-vcl.d.cts} +71 -16
- package/dist/{types-DVzJO3P-.d.ts → types-DUmH-vcl.d.ts} +71 -16
- package/package.json +1 -1
|
@@ -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";
|
|
@@ -137,6 +139,36 @@ interface GQLResetUserPasswordResult {
|
|
|
137
139
|
} | null;
|
|
138
140
|
}
|
|
139
141
|
|
|
142
|
+
interface RestSendPasswordResetEmailInput {
|
|
143
|
+
username: string;
|
|
144
|
+
}
|
|
145
|
+
interface RestSendPasswordResetEmailResult {
|
|
146
|
+
message: string;
|
|
147
|
+
}
|
|
148
|
+
interface RestResetUserPasswordInput {
|
|
149
|
+
key: string;
|
|
150
|
+
login: string;
|
|
151
|
+
password: string;
|
|
152
|
+
}
|
|
153
|
+
interface RestResetUserPasswordResult {
|
|
154
|
+
message: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface WordPressPaginationHeaders {
|
|
158
|
+
total: number;
|
|
159
|
+
totalPages: number;
|
|
160
|
+
}
|
|
161
|
+
interface WordPressResponse<T> {
|
|
162
|
+
data: T;
|
|
163
|
+
headers: WordPressPaginationHeaders;
|
|
164
|
+
}
|
|
165
|
+
declare class WordPressAPIError extends Error {
|
|
166
|
+
readonly code: ErrorCode;
|
|
167
|
+
readonly status: number;
|
|
168
|
+
readonly endpoint: string;
|
|
169
|
+
constructor(code: ErrorCode, status: number, endpoint: string, message: string, detail?: string);
|
|
170
|
+
}
|
|
171
|
+
|
|
140
172
|
interface CookieConsentCategories {
|
|
141
173
|
necessary: true;
|
|
142
174
|
analytics: boolean;
|
|
@@ -309,21 +341,6 @@ interface Post extends WPEntity {
|
|
|
309
341
|
_embedded?: PostEmbedded;
|
|
310
342
|
}
|
|
311
343
|
|
|
312
|
-
interface WordPressPaginationHeaders {
|
|
313
|
-
total: number;
|
|
314
|
-
totalPages: number;
|
|
315
|
-
}
|
|
316
|
-
interface WordPressResponse<T> {
|
|
317
|
-
data: T;
|
|
318
|
-
headers: WordPressPaginationHeaders;
|
|
319
|
-
}
|
|
320
|
-
declare class WordPressAPIError extends Error {
|
|
321
|
-
readonly code: ErrorCode;
|
|
322
|
-
readonly status: number;
|
|
323
|
-
readonly endpoint: string;
|
|
324
|
-
constructor(code: ErrorCode, status: number, endpoint: string, message: string, detail?: string);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
344
|
interface WooCommerceConfig {
|
|
328
345
|
serverURL: string;
|
|
329
346
|
clientURL?: string;
|
|
@@ -634,6 +651,44 @@ interface UpdateCustomerInput {
|
|
|
634
651
|
}[];
|
|
635
652
|
}
|
|
636
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
|
+
|
|
637
692
|
interface GQLPostFilter {
|
|
638
693
|
authorName?: string;
|
|
639
694
|
categoryName?: string;
|
|
@@ -738,4 +793,4 @@ declare class CF7Error extends Error {
|
|
|
738
793
|
constructor(code: ErrorCode, status: number, endpoint: string, message: string);
|
|
739
794
|
}
|
|
740
795
|
|
|
741
|
-
export { type
|
|
796
|
+
export { type CF7ValidationError as $, type Author as A, type RestResetUserPasswordInput as B, type CookieConsentCategories as C, type WCImage as D, ErrorCode as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type CreateWishlistInput as H, type UpdateWishlistInput as I, type JwtAuthCredentials as J, type AddProductToWishlistInput as K, type WCProductVariation as L, type WCAddress as M, type NextWordpressConfig as N, type WPULikeVoteParams as O, type Post as P, type GQLSendPasswordResetEmailInput as Q, type RestSendPasswordResetEmailResult as R, type GQLResetUserPasswordInput as S, type Taxonomy as T, type UpdateCustomerInput as U, AuthenticationError as V, type WPGraphQLConfig as W, type BlockType as X, type YithWishlistConfig as Y, CF7Error as Z, type CF7SubmissionStatus as _, type GQLResetUserPasswordResult as a, type CookieConsentConfig as a0, type EditorBlock as a1, type EmbeddedAuthor as a2, type EmbeddedTerm as a3, type GQLError as a4, type GQLPageInfo as a5, type MediaDetails as a6, type MediaSize as a7, type PostEmbedded as a8, type SearchResult as a9, type TemplatePart as aa, type WCDimensions as ab, type WCOrderLineItem as ac, type WCProductAttribute as ad, type WCProductDefaultAttribute as ae, type WCShippingLine as af, type WCWishlistItem as ag, WPGraphQLError as ah, type WPULikeItemType as ai, WooCommerceError as aj, type WooCommercePaginationHeaders as ak, WordPressAPIError as al, createCookieConsentHandler as am, defaultMessages as an, defaultMessagesPl as ao, parseCookieConsent as ap, resolveMessage as aq, 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 GQLPost as l, type GQLPostFilter as m, type GQLConnection as n, type WPULikeStatsParams as o, type WPULikeStats as p, type WPULikeStatus as q, type WPULikeVoteResponse as r, type WPULikeCheckParams as s, type WPULikeCheckResponse as t, type CF7SubmissionResponse as u, type JwtAuthResponse as v, type WPEntity as w, type RenderedTitle as x, type RenderedContent as y, type RestSendPasswordResetEmailInput 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";
|
|
@@ -137,6 +139,36 @@ interface GQLResetUserPasswordResult {
|
|
|
137
139
|
} | null;
|
|
138
140
|
}
|
|
139
141
|
|
|
142
|
+
interface RestSendPasswordResetEmailInput {
|
|
143
|
+
username: string;
|
|
144
|
+
}
|
|
145
|
+
interface RestSendPasswordResetEmailResult {
|
|
146
|
+
message: string;
|
|
147
|
+
}
|
|
148
|
+
interface RestResetUserPasswordInput {
|
|
149
|
+
key: string;
|
|
150
|
+
login: string;
|
|
151
|
+
password: string;
|
|
152
|
+
}
|
|
153
|
+
interface RestResetUserPasswordResult {
|
|
154
|
+
message: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface WordPressPaginationHeaders {
|
|
158
|
+
total: number;
|
|
159
|
+
totalPages: number;
|
|
160
|
+
}
|
|
161
|
+
interface WordPressResponse<T> {
|
|
162
|
+
data: T;
|
|
163
|
+
headers: WordPressPaginationHeaders;
|
|
164
|
+
}
|
|
165
|
+
declare class WordPressAPIError extends Error {
|
|
166
|
+
readonly code: ErrorCode;
|
|
167
|
+
readonly status: number;
|
|
168
|
+
readonly endpoint: string;
|
|
169
|
+
constructor(code: ErrorCode, status: number, endpoint: string, message: string, detail?: string);
|
|
170
|
+
}
|
|
171
|
+
|
|
140
172
|
interface CookieConsentCategories {
|
|
141
173
|
necessary: true;
|
|
142
174
|
analytics: boolean;
|
|
@@ -309,21 +341,6 @@ interface Post extends WPEntity {
|
|
|
309
341
|
_embedded?: PostEmbedded;
|
|
310
342
|
}
|
|
311
343
|
|
|
312
|
-
interface WordPressPaginationHeaders {
|
|
313
|
-
total: number;
|
|
314
|
-
totalPages: number;
|
|
315
|
-
}
|
|
316
|
-
interface WordPressResponse<T> {
|
|
317
|
-
data: T;
|
|
318
|
-
headers: WordPressPaginationHeaders;
|
|
319
|
-
}
|
|
320
|
-
declare class WordPressAPIError extends Error {
|
|
321
|
-
readonly code: ErrorCode;
|
|
322
|
-
readonly status: number;
|
|
323
|
-
readonly endpoint: string;
|
|
324
|
-
constructor(code: ErrorCode, status: number, endpoint: string, message: string, detail?: string);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
344
|
interface WooCommerceConfig {
|
|
328
345
|
serverURL: string;
|
|
329
346
|
clientURL?: string;
|
|
@@ -634,6 +651,44 @@ interface UpdateCustomerInput {
|
|
|
634
651
|
}[];
|
|
635
652
|
}
|
|
636
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
|
+
|
|
637
692
|
interface GQLPostFilter {
|
|
638
693
|
authorName?: string;
|
|
639
694
|
categoryName?: string;
|
|
@@ -738,4 +793,4 @@ declare class CF7Error extends Error {
|
|
|
738
793
|
constructor(code: ErrorCode, status: number, endpoint: string, message: string);
|
|
739
794
|
}
|
|
740
795
|
|
|
741
|
-
export { type
|
|
796
|
+
export { type CF7ValidationError as $, type Author as A, type RestResetUserPasswordInput as B, type CookieConsentCategories as C, type WCImage as D, ErrorCode as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type CreateWishlistInput as H, type UpdateWishlistInput as I, type JwtAuthCredentials as J, type AddProductToWishlistInput as K, type WCProductVariation as L, type WCAddress as M, type NextWordpressConfig as N, type WPULikeVoteParams as O, type Post as P, type GQLSendPasswordResetEmailInput as Q, type RestSendPasswordResetEmailResult as R, type GQLResetUserPasswordInput as S, type Taxonomy as T, type UpdateCustomerInput as U, AuthenticationError as V, type WPGraphQLConfig as W, type BlockType as X, type YithWishlistConfig as Y, CF7Error as Z, type CF7SubmissionStatus as _, type GQLResetUserPasswordResult as a, type CookieConsentConfig as a0, type EditorBlock as a1, type EmbeddedAuthor as a2, type EmbeddedTerm as a3, type GQLError as a4, type GQLPageInfo as a5, type MediaDetails as a6, type MediaSize as a7, type PostEmbedded as a8, type SearchResult as a9, type TemplatePart as aa, type WCDimensions as ab, type WCOrderLineItem as ac, type WCProductAttribute as ad, type WCProductDefaultAttribute as ae, type WCShippingLine as af, type WCWishlistItem as ag, WPGraphQLError as ah, type WPULikeItemType as ai, WooCommerceError as aj, type WooCommercePaginationHeaders as ak, WordPressAPIError as al, createCookieConsentHandler as am, defaultMessages as an, defaultMessagesPl as ao, parseCookieConsent as ap, resolveMessage as aq, 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 GQLPost as l, type GQLPostFilter as m, type GQLConnection as n, type WPULikeStatsParams as o, type WPULikeStats as p, type WPULikeStatus as q, type WPULikeVoteResponse as r, type WPULikeCheckParams as s, type WPULikeCheckResponse as t, type CF7SubmissionResponse as u, type JwtAuthResponse as v, type WPEntity as w, type RenderedTitle as x, type RenderedContent as y, type RestSendPasswordResetEmailInput as z };
|