@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
package/dist/server/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { Category, Comment, CommentAuthorAvatar, CreateAttributeTermInput, CreateAuthorInput, CreateCategoryInput, CreateCommentInput, CreateCouponInput, CreateMenuInput, CreateMenuItemInput, CreatePageInput, CreatePostInput, CreateProductAttributeInput, CreateProductCategoryInput, CreateProductInput, CreateProductReviewInput, CreateProductTagInput, CreateShippingClassInput, CreateShippingZoneInput, CreateShippingZoneMethodInput, CreateTagInput, CreateTaxClassInput, CreateTaxRateInput, CreateWebhookInput, FaustConfig, FaustPreviewConfig, FaustPreviewDeps, GQLACFFieldGroup, GQLAuthor, GQLCPTNode, GQLCategory, GQLCreateCommentInput, GQLCreateCommentResult, GQLCreatePostInput, GQLCustomer, GQLDeletePostResult, GQLLineItem, GQLMutatedComment, GQLMutatedPost, GQLOrder, GQLOrderAddress, GQLPage, GQLPageWithSEO, GQLPostStatus, GQLPostWithSEO, GQLProduct, GQLProductFilter, GQLProductVariation, GQLTag, GQLUpdatePostInput, GQLYoastSEO, Menu, MenuItem, MenuLocation, MenuWithItems, OmnibusPriceEntry, OmnibusProductData, Page, RestPageStatus, RestPostStatus, RevalidationConfig, RevalidationPayload, RevalidationResult, Tag, UpdateAttributeTermInput, UpdateAuthorInput, UpdateCategoryInput, UpdateCommentInput, UpdateCouponInput, UpdateMediaInput, UpdateMenuInput, UpdateMenuItemInput, UpdatePageInput, UpdatePostInput, UpdateProductAttributeInput, UpdateProductCategoryInput, UpdateProductInput, UpdateProductReviewInput, UpdateProductTagInput, UpdateShippingClassInput, UpdateShippingZoneInput, UpdateShippingZoneMethodInput, UpdateTagInput, UpdateTaxRateInput, UpdateWebhookInput, UploadMediaInput, WCAttributeTerm, WCContinent, WCCountry, WCCoupon, WCCreateOrderNoteInput, WCCreateOrderRefundInput, WCCurrency, WCGlobalProductAttribute, WCOrderNote, WCOrderRefund, WCPaymentGateway, WCPaymentGatewaySetting, WCProductCategory, WCProductReview, WCProductReviewFilterParams, WCProductStatus, WCProductTag, WCProductVariationWithOmnibus, WCProductWithOmnibus, WCRefundLineItem, WCReviewStatus, WCSalesReport, WCSalesReportParams, WCSettingGroup, WCSettingOption, WCShippingClass, WCShippingMethod, WCShippingZone, WCShippingZoneLocation, WCShippingZoneMethod, WCStatusCount, WCSystemStatus, WCSystemStatusTool, WCTaxClass, WCTaxRate, WCTopSeller, WCTopSellersParams, WCWebhook, WCWebhookStatus, WCWebhookTopic, WPGraphQLFetcher, WooCommerceFetcher, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLClient, createWPGraphQLClient as createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation } from '../index.cjs';
|
|
1
|
+
export { K as AddProductToWishlistInput, V as AuthenticationError, A as Author, X as BlockType, Z as CF7Error, u as CF7SubmissionResponse, _ as CF7SubmissionStatus, $ as CF7ValidationError, C as CookieConsentCategories, a0 as CookieConsentConfig, H as CreateWishlistInput, a1 as EditorBlock, a2 as EmbeddedAuthor, a3 as EmbeddedTerm, E as ErrorCode, F as FeaturedMedia, n as GQLConnection, a4 as GQLError, a5 as GQLPageInfo, l as GQLPost, m as GQLPostFilter, S as GQLResetUserPasswordInput, a as GQLResetUserPasswordResult, Q as GQLSendPasswordResetEmailInput, G as GQLSendPasswordResetEmailResult, J as JwtAuthCredentials, v as JwtAuthResponse, a6 as MediaDetails, a7 as MediaSize, N as NextWordpressConfig, P as Post, a8 as PostEmbedded, y as RenderedContent, x as RenderedTitle, a9 as SearchResult, T as Taxonomy, aa as TemplatePart, U as UpdateCustomerInput, I as UpdateWishlistInput, M as WCAddress, h as WCCreateOrderInput, j as WCCustomer, ab as WCDimensions, D as WCImage, i as WCOrder, ac as WCOrderLineItem, e as WCProduct, ad as WCProductAttribute, ae as WCProductDefaultAttribute, f as WCProductFilterParams, L as WCProductVariation, af as WCShippingLine, k as WCWishlist, ag as WCWishlistItem, w as WPEntity, W as WPGraphQLConfig, ah as WPGraphQLError, s as WPULikeCheckParams, t as WPULikeCheckResponse, ai as WPULikeItemType, p as WPULikeStats, o as WPULikeStatsParams, q as WPULikeStatus, O as WPULikeVoteParams, r as WPULikeVoteResponse, d as WooCommerceConfig, aj as WooCommerceError, ak as WooCommercePaginationHeaders, g as WooCommerceResponse, al as WordPressAPIError, Y as YithWishlistConfig, am as createCookieConsentHandler, an as defaultMessages, ao as defaultMessagesPl, ap as parseCookieConsent, aq as resolveMessage } from '../types-DUmH-vcl.cjs';
|
|
2
|
+
export { Category, Comment, CommentAuthorAvatar, CreateAttributeTermInput, CreateAuthorInput, CreateCategoryInput, CreateCommentInput, CreateCouponInput, CreateMenuInput, CreateMenuItemInput, CreatePageInput, CreatePostInput, CreateProductAttributeInput, CreateProductCategoryInput, CreateProductInput, CreateProductReviewInput, CreateProductTagInput, CreateShippingClassInput, CreateShippingZoneInput, CreateShippingZoneMethodInput, CreateTagInput, CreateTaxClassInput, CreateTaxRateInput, CreateWebhookInput, FaustConfig, FaustPreviewConfig, FaustPreviewDeps, GQLACFFieldGroup, GQLAuthor, GQLCPTNode, GQLCategory, GQLCreateCommentInput, GQLCreateCommentResult, GQLCreatePostInput, GQLCustomer, GQLDeletePostResult, GQLLineItem, GQLMutatedComment, GQLMutatedPost, GQLOrder, GQLOrderAddress, GQLPage, GQLPageWithSEO, GQLPostStatus, GQLPostWithSEO, GQLProduct, GQLProductFilter, GQLProductVariation, GQLTag, GQLUpdatePostInput, GQLYoastSEO, Menu, MenuItem, MenuLocation, MenuWithItems, OmnibusPriceEntry, OmnibusProductData, Page, RestPageStatus, RestPostStatus, RevalidationConfig, RevalidationPayload, RevalidationResult, Tag, UpdateAttributeTermInput, UpdateAuthorInput, UpdateCategoryInput, UpdateCommentInput, UpdateCouponInput, UpdateMediaInput, UpdateMenuInput, UpdateMenuItemInput, UpdatePageInput, UpdatePostInput, UpdateProductAttributeInput, UpdateProductCategoryInput, UpdateProductInput, UpdateProductReviewInput, UpdateProductTagInput, UpdateShippingClassInput, UpdateShippingZoneInput, UpdateShippingZoneMethodInput, UpdateTagInput, UpdateTaxRateInput, UpdateWebhookInput, UploadMediaInput, WCAttributeTerm, WCContinent, WCCountry, WCCoupon, WCCreateOrderNoteInput, WCCreateOrderRefundInput, WCCurrency, WCGlobalProductAttribute, WCOrderNote, WCOrderRefund, WCPaymentGateway, WCPaymentGatewaySetting, WCProductCategory, WCProductReview, WCProductReviewFilterParams, WCProductStatus, WCProductTag, WCProductVariationWithOmnibus, WCProductWithOmnibus, WCRefundLineItem, WCReviewStatus, WCSalesReport, WCSalesReportParams, WCSettingGroup, WCSettingOption, WCShippingClass, WCShippingMethod, WCShippingZone, WCShippingZoneLocation, WCShippingZoneMethod, WCStatusCount, WCSystemStatus, WCSystemStatusTool, WCTaxClass, WCTaxRate, WCTopSeller, WCTopSellersParams, WCWebhook, WCWebhookStatus, WCWebhookTopic, WPGraphQLFetcher, WooCommerceFetcher, YithWishlistError, YithWishlistFetcher, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLClient, createWPGraphQLClient as createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWishlistMutations, createWishlistQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYithWishlistFetcher, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation } from '../index.cjs';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { Category, Comment, CommentAuthorAvatar, CreateAttributeTermInput, CreateAuthorInput, CreateCategoryInput, CreateCommentInput, CreateCouponInput, CreateMenuInput, CreateMenuItemInput, CreatePageInput, CreatePostInput, CreateProductAttributeInput, CreateProductCategoryInput, CreateProductInput, CreateProductReviewInput, CreateProductTagInput, CreateShippingClassInput, CreateShippingZoneInput, CreateShippingZoneMethodInput, CreateTagInput, CreateTaxClassInput, CreateTaxRateInput, CreateWebhookInput, FaustConfig, FaustPreviewConfig, FaustPreviewDeps, GQLACFFieldGroup, GQLAuthor, GQLCPTNode, GQLCategory, GQLCreateCommentInput, GQLCreateCommentResult, GQLCreatePostInput, GQLCustomer, GQLDeletePostResult, GQLLineItem, GQLMutatedComment, GQLMutatedPost, GQLOrder, GQLOrderAddress, GQLPage, GQLPageWithSEO, GQLPostStatus, GQLPostWithSEO, GQLProduct, GQLProductFilter, GQLProductVariation, GQLTag, GQLUpdatePostInput, GQLYoastSEO, Menu, MenuItem, MenuLocation, MenuWithItems, OmnibusPriceEntry, OmnibusProductData, Page, RestPageStatus, RestPostStatus, RevalidationConfig, RevalidationPayload, RevalidationResult, Tag, UpdateAttributeTermInput, UpdateAuthorInput, UpdateCategoryInput, UpdateCommentInput, UpdateCouponInput, UpdateMediaInput, UpdateMenuInput, UpdateMenuItemInput, UpdatePageInput, UpdatePostInput, UpdateProductAttributeInput, UpdateProductCategoryInput, UpdateProductInput, UpdateProductReviewInput, UpdateProductTagInput, UpdateShippingClassInput, UpdateShippingZoneInput, UpdateShippingZoneMethodInput, UpdateTagInput, UpdateTaxRateInput, UpdateWebhookInput, UploadMediaInput, WCAttributeTerm, WCContinent, WCCountry, WCCoupon, WCCreateOrderNoteInput, WCCreateOrderRefundInput, WCCurrency, WCGlobalProductAttribute, WCOrderNote, WCOrderRefund, WCPaymentGateway, WCPaymentGatewaySetting, WCProductCategory, WCProductReview, WCProductReviewFilterParams, WCProductStatus, WCProductTag, WCProductVariationWithOmnibus, WCProductWithOmnibus, WCRefundLineItem, WCReviewStatus, WCSalesReport, WCSalesReportParams, WCSettingGroup, WCSettingOption, WCShippingClass, WCShippingMethod, WCShippingZone, WCShippingZoneLocation, WCShippingZoneMethod, WCStatusCount, WCSystemStatus, WCSystemStatusTool, WCTaxClass, WCTaxRate, WCTopSeller, WCTopSellersParams, WCWebhook, WCWebhookStatus, WCWebhookTopic, WPGraphQLFetcher, WooCommerceFetcher, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLClient, createWPGraphQLClient as createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation } from '../index.js';
|
|
1
|
+
export { K as AddProductToWishlistInput, V as AuthenticationError, A as Author, X as BlockType, Z as CF7Error, u as CF7SubmissionResponse, _ as CF7SubmissionStatus, $ as CF7ValidationError, C as CookieConsentCategories, a0 as CookieConsentConfig, H as CreateWishlistInput, a1 as EditorBlock, a2 as EmbeddedAuthor, a3 as EmbeddedTerm, E as ErrorCode, F as FeaturedMedia, n as GQLConnection, a4 as GQLError, a5 as GQLPageInfo, l as GQLPost, m as GQLPostFilter, S as GQLResetUserPasswordInput, a as GQLResetUserPasswordResult, Q as GQLSendPasswordResetEmailInput, G as GQLSendPasswordResetEmailResult, J as JwtAuthCredentials, v as JwtAuthResponse, a6 as MediaDetails, a7 as MediaSize, N as NextWordpressConfig, P as Post, a8 as PostEmbedded, y as RenderedContent, x as RenderedTitle, a9 as SearchResult, T as Taxonomy, aa as TemplatePart, U as UpdateCustomerInput, I as UpdateWishlistInput, M as WCAddress, h as WCCreateOrderInput, j as WCCustomer, ab as WCDimensions, D as WCImage, i as WCOrder, ac as WCOrderLineItem, e as WCProduct, ad as WCProductAttribute, ae as WCProductDefaultAttribute, f as WCProductFilterParams, L as WCProductVariation, af as WCShippingLine, k as WCWishlist, ag as WCWishlistItem, w as WPEntity, W as WPGraphQLConfig, ah as WPGraphQLError, s as WPULikeCheckParams, t as WPULikeCheckResponse, ai as WPULikeItemType, p as WPULikeStats, o as WPULikeStatsParams, q as WPULikeStatus, O as WPULikeVoteParams, r as WPULikeVoteResponse, d as WooCommerceConfig, aj as WooCommerceError, ak as WooCommercePaginationHeaders, g as WooCommerceResponse, al as WordPressAPIError, Y as YithWishlistConfig, am as createCookieConsentHandler, an as defaultMessages, ao as defaultMessagesPl, ap as parseCookieConsent, aq as resolveMessage } from '../types-DUmH-vcl.js';
|
|
2
|
+
export { Category, Comment, CommentAuthorAvatar, CreateAttributeTermInput, CreateAuthorInput, CreateCategoryInput, CreateCommentInput, CreateCouponInput, CreateMenuInput, CreateMenuItemInput, CreatePageInput, CreatePostInput, CreateProductAttributeInput, CreateProductCategoryInput, CreateProductInput, CreateProductReviewInput, CreateProductTagInput, CreateShippingClassInput, CreateShippingZoneInput, CreateShippingZoneMethodInput, CreateTagInput, CreateTaxClassInput, CreateTaxRateInput, CreateWebhookInput, FaustConfig, FaustPreviewConfig, FaustPreviewDeps, GQLACFFieldGroup, GQLAuthor, GQLCPTNode, GQLCategory, GQLCreateCommentInput, GQLCreateCommentResult, GQLCreatePostInput, GQLCustomer, GQLDeletePostResult, GQLLineItem, GQLMutatedComment, GQLMutatedPost, GQLOrder, GQLOrderAddress, GQLPage, GQLPageWithSEO, GQLPostStatus, GQLPostWithSEO, GQLProduct, GQLProductFilter, GQLProductVariation, GQLTag, GQLUpdatePostInput, GQLYoastSEO, Menu, MenuItem, MenuLocation, MenuWithItems, OmnibusPriceEntry, OmnibusProductData, Page, RestPageStatus, RestPostStatus, RevalidationConfig, RevalidationPayload, RevalidationResult, Tag, UpdateAttributeTermInput, UpdateAuthorInput, UpdateCategoryInput, UpdateCommentInput, UpdateCouponInput, UpdateMediaInput, UpdateMenuInput, UpdateMenuItemInput, UpdatePageInput, UpdatePostInput, UpdateProductAttributeInput, UpdateProductCategoryInput, UpdateProductInput, UpdateProductReviewInput, UpdateProductTagInput, UpdateShippingClassInput, UpdateShippingZoneInput, UpdateShippingZoneMethodInput, UpdateTagInput, UpdateTaxRateInput, UpdateWebhookInput, UploadMediaInput, WCAttributeTerm, WCContinent, WCCountry, WCCoupon, WCCreateOrderNoteInput, WCCreateOrderRefundInput, WCCurrency, WCGlobalProductAttribute, WCOrderNote, WCOrderRefund, WCPaymentGateway, WCPaymentGatewaySetting, WCProductCategory, WCProductReview, WCProductReviewFilterParams, WCProductStatus, WCProductTag, WCProductVariationWithOmnibus, WCProductWithOmnibus, WCRefundLineItem, WCReviewStatus, WCSalesReport, WCSalesReportParams, WCSettingGroup, WCSettingOption, WCShippingClass, WCShippingMethod, WCShippingZone, WCShippingZoneLocation, WCShippingZoneMethod, WCStatusCount, WCSystemStatus, WCSystemStatusTool, WCTaxClass, WCTaxRate, WCTopSeller, WCTopSellersParams, WCWebhook, WCWebhookStatus, WCWebhookTopic, WPGraphQLFetcher, WooCommerceFetcher, YithWishlistError, YithWishlistFetcher, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLClient, createWPGraphQLClient as createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWishlistMutations, createWishlistQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYithWishlistFetcher, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation } from '../index.js';
|
package/dist/server/index.js
CHANGED
|
@@ -33,6 +33,8 @@ var ErrorCode = {
|
|
|
33
33
|
WOO_REVIEW_NOT_FOUND: "WOO_REVIEW_NOT_FOUND",
|
|
34
34
|
WOO_WEBHOOK_NOT_FOUND: "WOO_WEBHOOK_NOT_FOUND",
|
|
35
35
|
WOO_SHIPPING_ZONE_NOT_FOUND: "WOO_SHIPPING_ZONE_NOT_FOUND",
|
|
36
|
+
WOO_WISHLIST_NOT_FOUND: "WOO_WISHLIST_NOT_FOUND",
|
|
37
|
+
WOO_WISHLIST_ITEM_NOT_FOUND: "WOO_WISHLIST_ITEM_NOT_FOUND",
|
|
36
38
|
// Auth
|
|
37
39
|
AUTH_JWT_FAILED: "AUTH_JWT_FAILED",
|
|
38
40
|
AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID",
|
|
@@ -67,6 +69,8 @@ var defaultMessages = {
|
|
|
67
69
|
WOO_REVIEW_NOT_FOUND: "Product review not found",
|
|
68
70
|
WOO_WEBHOOK_NOT_FOUND: "Webhook not found",
|
|
69
71
|
WOO_SHIPPING_ZONE_NOT_FOUND: "Shipping zone not found",
|
|
72
|
+
WOO_WISHLIST_NOT_FOUND: "Wishlist not found",
|
|
73
|
+
WOO_WISHLIST_ITEM_NOT_FOUND: "Wishlist item not found",
|
|
70
74
|
AUTH_JWT_FAILED: "JWT authentication failed",
|
|
71
75
|
AUTH_CREDENTIALS_INVALID: "Invalid credentials",
|
|
72
76
|
AUTH_TOKEN_INVALID: "JWT token is invalid or expired",
|
|
@@ -99,6 +103,8 @@ var defaultMessagesPl = {
|
|
|
99
103
|
WOO_REVIEW_NOT_FOUND: "Opinia o produkcie nie istnieje",
|
|
100
104
|
WOO_WEBHOOK_NOT_FOUND: "Webhook nie istnieje",
|
|
101
105
|
WOO_SHIPPING_ZONE_NOT_FOUND: "Strefa wysy\u0142ki nie istnieje",
|
|
106
|
+
WOO_WISHLIST_NOT_FOUND: "Lista \u017Cycze\u0144 nie istnieje",
|
|
107
|
+
WOO_WISHLIST_ITEM_NOT_FOUND: "Element listy \u017Cycze\u0144 nie istnieje",
|
|
102
108
|
AUTH_JWT_FAILED: "B\u0142\u0105d uwierzytelnienia JWT",
|
|
103
109
|
AUTH_CREDENTIALS_INVALID: "Nieprawid\u0142owe dane logowania",
|
|
104
110
|
AUTH_TOKEN_INVALID: "Token JWT jest nieprawid\u0142owy lub wygas\u0142",
|
|
@@ -307,6 +313,26 @@ function createMediaMutations(fetcher) {
|
|
|
307
313
|
return { uploadMedia, updateMedia, deleteMedia };
|
|
308
314
|
}
|
|
309
315
|
|
|
316
|
+
// src/integrations/restApi/core/mutations/passwordReset/mutations.ts
|
|
317
|
+
function createPasswordResetMutations(fetcher) {
|
|
318
|
+
const { wpMutate } = fetcher;
|
|
319
|
+
async function sendPasswordResetEmail(input) {
|
|
320
|
+
return wpMutate(
|
|
321
|
+
"/wp-json/wp/v2/users/lost-password",
|
|
322
|
+
input,
|
|
323
|
+
"POST"
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
async function resetUserPassword(input) {
|
|
327
|
+
return wpMutate(
|
|
328
|
+
"/wp-json/wp/v2/users/reset-password",
|
|
329
|
+
input,
|
|
330
|
+
"POST"
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
return { sendPasswordResetEmail, resetUserPassword };
|
|
334
|
+
}
|
|
335
|
+
|
|
310
336
|
// src/integrations/restApi/core/client/types.ts
|
|
311
337
|
var WordPressAPIError = class extends Error {
|
|
312
338
|
constructor(code, status, endpoint, message, detail) {
|
|
@@ -441,7 +467,8 @@ function createWordPressMutationsClient(config) {
|
|
|
441
467
|
...createTagsMutations(fetcher),
|
|
442
468
|
...createAuthorsMutations(fetcher),
|
|
443
469
|
...createMenusMutations(fetcher),
|
|
444
|
-
...createMediaMutations(fetcher)
|
|
470
|
+
...createMediaMutations(fetcher),
|
|
471
|
+
...createPasswordResetMutations(fetcher)
|
|
445
472
|
};
|
|
446
473
|
}
|
|
447
474
|
|
|
@@ -782,6 +809,138 @@ function createWordPressClient(config) {
|
|
|
782
809
|
};
|
|
783
810
|
}
|
|
784
811
|
|
|
812
|
+
// src/integrations/restApi/woocommerce/wishlist/fetcher.ts
|
|
813
|
+
var USER_AGENT2 = "NextWordpress YITH Wishlist Client";
|
|
814
|
+
var DEFAULT_CACHE_TTL = 3600;
|
|
815
|
+
var YithWishlistError = class extends Error {
|
|
816
|
+
constructor(code, status, url, message, upstreamCode, upstreamMessage) {
|
|
817
|
+
super(message);
|
|
818
|
+
__publicField(this, "code", code);
|
|
819
|
+
__publicField(this, "status", status);
|
|
820
|
+
__publicField(this, "url", url);
|
|
821
|
+
__publicField(this, "upstreamCode", upstreamCode);
|
|
822
|
+
__publicField(this, "upstreamMessage", upstreamMessage);
|
|
823
|
+
this.name = "YithWishlistError";
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
function resolveYithErrorCode(status, upstreamCode) {
|
|
827
|
+
if (status === 401) return ErrorCode.WOO_UNAUTHORIZED;
|
|
828
|
+
if (status === 403) return ErrorCode.WOO_FORBIDDEN;
|
|
829
|
+
if (status === 404) {
|
|
830
|
+
if (upstreamCode === "yith_wcwl_wishlist_not_found") return ErrorCode.WOO_WISHLIST_NOT_FOUND;
|
|
831
|
+
if (upstreamCode === "yith_wcwl_wishlist_item_not_found")
|
|
832
|
+
return ErrorCode.WOO_WISHLIST_ITEM_NOT_FOUND;
|
|
833
|
+
return ErrorCode.WOO_NOT_FOUND;
|
|
834
|
+
}
|
|
835
|
+
return ErrorCode.WOO_REQUEST_FAILED;
|
|
836
|
+
}
|
|
837
|
+
function createYithWishlistFetcher(config) {
|
|
838
|
+
const cacheTTL = config.cacheTTL ?? DEFAULT_CACHE_TTL;
|
|
839
|
+
function buildUrl2(path) {
|
|
840
|
+
const base = typeof window !== "undefined" && config.clientURL ? config.clientURL : config.serverURL;
|
|
841
|
+
return `${base}${path}`;
|
|
842
|
+
}
|
|
843
|
+
function authHeaders() {
|
|
844
|
+
return {
|
|
845
|
+
"User-Agent": USER_AGENT2,
|
|
846
|
+
"Content-Type": "application/json",
|
|
847
|
+
Authorization: `Bearer ${config.token}`
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
async function throwYithError(response, url) {
|
|
851
|
+
const body = await response.json().catch(() => ({}));
|
|
852
|
+
const errorCode = resolveYithErrorCode(response.status, body.code);
|
|
853
|
+
throw new YithWishlistError(
|
|
854
|
+
errorCode,
|
|
855
|
+
response.status,
|
|
856
|
+
url,
|
|
857
|
+
resolveMessage(errorCode, config.errorMessages),
|
|
858
|
+
body.code,
|
|
859
|
+
body.message
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
async function yithFetch(path, tags = ["yith-wishlist"], options) {
|
|
863
|
+
const url = buildUrl2(path);
|
|
864
|
+
const isMutation = options?.method && options.method !== "GET";
|
|
865
|
+
const response = await fetch(url, {
|
|
866
|
+
...options,
|
|
867
|
+
headers: {
|
|
868
|
+
...authHeaders(),
|
|
869
|
+
...options?.headers
|
|
870
|
+
},
|
|
871
|
+
next: isMutation ? void 0 : { tags, revalidate: cacheTTL }
|
|
872
|
+
});
|
|
873
|
+
if (!response.ok) {
|
|
874
|
+
await throwYithError(response, url);
|
|
875
|
+
}
|
|
876
|
+
return response.json();
|
|
877
|
+
}
|
|
878
|
+
async function yithFetchGraceful(path, fallback, tags = ["yith-wishlist"]) {
|
|
879
|
+
try {
|
|
880
|
+
return await yithFetch(path, tags);
|
|
881
|
+
} catch (err) {
|
|
882
|
+
console.warn(`YITH Wishlist fetch failed for ${path}`, err);
|
|
883
|
+
return fallback;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
async function yithMutate(path, body, method = "POST") {
|
|
887
|
+
return yithFetch(path, ["yith-wishlist"], {
|
|
888
|
+
method,
|
|
889
|
+
body: JSON.stringify(body)
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
return { yithFetch, yithFetchGraceful, yithMutate };
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// src/integrations/restApi/woocommerce/wishlist/queries.ts
|
|
896
|
+
var BASE = "/wp-json/yith/wishlist/v1/wishlists";
|
|
897
|
+
function createWishlistQueries(fetcher) {
|
|
898
|
+
const { yithFetch, yithFetchGraceful } = fetcher;
|
|
899
|
+
async function getWishlists() {
|
|
900
|
+
return yithFetchGraceful(BASE, [], ["yith-wishlist", "wishlists"]);
|
|
901
|
+
}
|
|
902
|
+
async function getWishlistByToken(token) {
|
|
903
|
+
return yithFetch(`${BASE}/${token}`, ["yith-wishlist", "wishlists", `wishlist-${token}`]);
|
|
904
|
+
}
|
|
905
|
+
return { getWishlists, getWishlistByToken };
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
// src/integrations/restApi/woocommerce/wishlist/mutations.ts
|
|
909
|
+
var BASE2 = "/wp-json/yith/wishlist/v1/wishlists";
|
|
910
|
+
function createWishlistMutations(fetcher) {
|
|
911
|
+
const { yithMutate } = fetcher;
|
|
912
|
+
async function createWishlist(input) {
|
|
913
|
+
return yithMutate(BASE2, input, "POST");
|
|
914
|
+
}
|
|
915
|
+
async function updateWishlist(token, input) {
|
|
916
|
+
return yithMutate(`${BASE2}/${token}`, input, "PATCH");
|
|
917
|
+
}
|
|
918
|
+
async function deleteWishlist(token) {
|
|
919
|
+
return yithMutate(
|
|
920
|
+
`${BASE2}/${token}`,
|
|
921
|
+
{},
|
|
922
|
+
"DELETE"
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
async function addProductToWishlist(token, input) {
|
|
926
|
+
return yithMutate(`${BASE2}/${token}/add-product`, input, "POST");
|
|
927
|
+
}
|
|
928
|
+
async function removeProductFromWishlist(token, productId) {
|
|
929
|
+
return yithMutate(
|
|
930
|
+
`${BASE2}/${token}/remove-product/${productId}`,
|
|
931
|
+
{},
|
|
932
|
+
"DELETE"
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
return {
|
|
936
|
+
createWishlist,
|
|
937
|
+
updateWishlist,
|
|
938
|
+
deleteWishlist,
|
|
939
|
+
addProductToWishlist,
|
|
940
|
+
removeProductFromWishlist
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
|
|
785
944
|
// src/integrations/restApi/woocommerce/omnibus/queries.ts
|
|
786
945
|
var META_KEY_LOWEST_PRICE = "wpo_lowest_price";
|
|
787
946
|
var META_KEY_PRICE_HISTORY = "_alg_wc_price_history";
|
|
@@ -848,8 +1007,8 @@ function resolveWooErrorCode(status, upstreamCode) {
|
|
|
848
1007
|
}
|
|
849
1008
|
|
|
850
1009
|
// src/integrations/restApi/woocommerce/client/fetcher.ts
|
|
851
|
-
var
|
|
852
|
-
var
|
|
1010
|
+
var USER_AGENT3 = "NextWordpress WooCommerce Client";
|
|
1011
|
+
var DEFAULT_CACHE_TTL2 = 3600;
|
|
853
1012
|
function toQueryString(params) {
|
|
854
1013
|
const pairs = [];
|
|
855
1014
|
for (const [key, value] of Object.entries(params)) {
|
|
@@ -859,7 +1018,7 @@ function toQueryString(params) {
|
|
|
859
1018
|
return pairs.join("&");
|
|
860
1019
|
}
|
|
861
1020
|
function createWooCommerceFetcher(config) {
|
|
862
|
-
const cacheTTL = config.cacheTTL ??
|
|
1021
|
+
const cacheTTL = config.cacheTTL ?? DEFAULT_CACHE_TTL2;
|
|
863
1022
|
function withAuth(query) {
|
|
864
1023
|
return { ...query, consumer_key: config.consumerKey, consumer_secret: config.consumerSecret };
|
|
865
1024
|
}
|
|
@@ -886,7 +1045,7 @@ function createWooCommerceFetcher(config) {
|
|
|
886
1045
|
const response = await fetch(url, {
|
|
887
1046
|
...options,
|
|
888
1047
|
headers: {
|
|
889
|
-
"User-Agent":
|
|
1048
|
+
"User-Agent": USER_AGENT3,
|
|
890
1049
|
"Content-Type": "application/json",
|
|
891
1050
|
...options?.headers
|
|
892
1051
|
},
|
|
@@ -908,7 +1067,7 @@ function createWooCommerceFetcher(config) {
|
|
|
908
1067
|
async function wcFetchPaginated(path, query, tags = ["woocommerce"]) {
|
|
909
1068
|
const url = buildUrl2(path, query);
|
|
910
1069
|
const response = await fetch(url, {
|
|
911
|
-
headers: { "User-Agent":
|
|
1070
|
+
headers: { "User-Agent": USER_AGENT3 },
|
|
912
1071
|
next: { tags, revalidate: cacheTTL }
|
|
913
1072
|
});
|
|
914
1073
|
if (!response.ok) {
|
|
@@ -2194,7 +2353,7 @@ var WPGraphQLError = class extends Error {
|
|
|
2194
2353
|
};
|
|
2195
2354
|
|
|
2196
2355
|
// src/integrations/wpGraphQL/client/fetcher.ts
|
|
2197
|
-
var
|
|
2356
|
+
var USER_AGENT4 = "NextWordpress WPGraphQL Client";
|
|
2198
2357
|
function createWPGraphQLFetcher(config) {
|
|
2199
2358
|
const url = `${resolveBaseUrl(config)}/graphql`;
|
|
2200
2359
|
const cacheTTL = config.cacheTTL ?? 300;
|
|
@@ -2203,7 +2362,7 @@ function createWPGraphQLFetcher(config) {
|
|
|
2203
2362
|
method: "POST",
|
|
2204
2363
|
headers: {
|
|
2205
2364
|
"Content-Type": "application/json",
|
|
2206
|
-
"User-Agent":
|
|
2365
|
+
"User-Agent": USER_AGENT4
|
|
2207
2366
|
},
|
|
2208
2367
|
body: JSON.stringify({ query: document, variables }),
|
|
2209
2368
|
next: { tags, revalidate: cacheTTL }
|
|
@@ -2247,7 +2406,7 @@ function createWPGraphQLFetcher(config) {
|
|
|
2247
2406
|
async function gqlMutate(document, variables, authToken) {
|
|
2248
2407
|
const headers = {
|
|
2249
2408
|
"Content-Type": "application/json",
|
|
2250
|
-
"User-Agent":
|
|
2409
|
+
"User-Agent": USER_AGENT4
|
|
2251
2410
|
};
|
|
2252
2411
|
if (authToken) {
|
|
2253
2412
|
headers["Authorization"] = authToken;
|
|
@@ -3411,7 +3570,7 @@ var GQL_RESET_USER_PASSWORD = `
|
|
|
3411
3570
|
}
|
|
3412
3571
|
}
|
|
3413
3572
|
`;
|
|
3414
|
-
function
|
|
3573
|
+
function createPasswordResetMutations2(fetcher) {
|
|
3415
3574
|
const { gqlMutate } = fetcher;
|
|
3416
3575
|
async function sendPasswordResetEmail(input) {
|
|
3417
3576
|
const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
|
|
@@ -3439,7 +3598,7 @@ function createWPGraphQLMutationsClient(config) {
|
|
|
3439
3598
|
...createTagsMutations3(fetcher),
|
|
3440
3599
|
...createAuthorsMutations2(fetcher),
|
|
3441
3600
|
...createMediaMutations2(fetcher),
|
|
3442
|
-
...
|
|
3601
|
+
...createPasswordResetMutations2(fetcher)
|
|
3443
3602
|
};
|
|
3444
3603
|
}
|
|
3445
3604
|
|
|
@@ -4398,6 +4557,6 @@ async function validateJwtToken(config, token) {
|
|
|
4398
4557
|
return response.ok;
|
|
4399
4558
|
}
|
|
4400
4559
|
|
|
4401
|
-
export { AuthenticationError, CF7Error, ErrorCode, WPGraphQLError, WooCommerceError, WordPressAPIError, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createCookieConsentHandler, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, defaultMessages, defaultMessagesPl, extractOmnibusData, parseCookieConsent, resolveBaseUrl, resolveMessage, validateJwtToken, withOmnibus, withOmnibusVariation };
|
|
4560
|
+
export { AuthenticationError, CF7Error, ErrorCode, WPGraphQLError, WooCommerceError, WordPressAPIError, YithWishlistError, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createCookieConsentHandler, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWishlistMutations, createWishlistQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYithWishlistFetcher, createYoastQueries, defaultMessages, defaultMessagesPl, extractOmnibusData, parseCookieConsent, resolveBaseUrl, resolveMessage, validateJwtToken, withOmnibus, withOmnibusVariation };
|
|
4402
4561
|
//# sourceMappingURL=index.js.map
|
|
4403
4562
|
//# sourceMappingURL=index.js.map
|