@szymonpiatek/nextwordpress 0.0.13 → 0.0.15

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.
@@ -1,2 +1,2 @@
1
- export { x as AuthenticationError, A as Author, B as BlockType, C as CookieConsentCategories, y as CookieConsentConfig, E as EditorBlock, z as EmbeddedAuthor, D as EmbeddedTerm, H as ErrorCode, F as FeaturedMedia, j as GQLConnection, I as GQLError, K as GQLPageInfo, G as GQLPost, i as GQLPostFilter, J as JwtAuthCredentials, q as JwtAuthResponse, M as MediaDetails, L as MediaSize, N as NextWordpressConfig, P as Post, O as PostEmbedded, s as RenderedContent, R as RenderedTitle, S as SearchResult, T as Taxonomy, Q as TemplatePart, U as UpdateCustomerInput, v as WCAddress, e as WCCreateOrderInput, g as WCCustomer, V as WCDimensions, t as WCImage, f as WCOrder, X as WCOrderLineItem, b as WCProduct, Y as WCProductAttribute, Z as WCProductDefaultAttribute, c as WCProductFilterParams, u as WCProductVariation, _ as WCShippingLine, r as WPEntity, h as WPGraphQLConfig, $ as WPGraphQLError, o as WPULikeCheckParams, p as WPULikeCheckResponse, a0 as WPULikeItemType, l as WPULikeStats, k as WPULikeStatsParams, m as WPULikeStatus, w as WPULikeVoteParams, n as WPULikeVoteResponse, a as WooCommerceConfig, a1 as WooCommerceError, a2 as WooCommercePaginationHeaders, d as WooCommerceResponse, a3 as WordPressAPIError, a4 as createCookieConsentHandler, a5 as defaultMessages, a6 as defaultMessagesPl, a7 as parseCookieConsent, a8 as resolveMessage } from '../types-BELSHjQr.cjs';
2
- export { CF7SubmissionResponse, CF7SubmissionStatus, CF7ValidationError, 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 { y as AuthenticationError, A as Author, B as BlockType, z as CF7Error, q as CF7SubmissionResponse, D as CF7SubmissionStatus, E as CF7ValidationError, C as CookieConsentCategories, H as CookieConsentConfig, I as EditorBlock, K as EmbeddedAuthor, L as EmbeddedTerm, M as ErrorCode, F as FeaturedMedia, j as GQLConnection, O as GQLError, Q as GQLPageInfo, G as GQLPost, i as GQLPostFilter, J as JwtAuthCredentials, r as JwtAuthResponse, S as MediaDetails, V as MediaSize, N as NextWordpressConfig, P as Post, X as PostEmbedded, t as RenderedContent, R as RenderedTitle, Y as SearchResult, T as Taxonomy, Z as TemplatePart, U as UpdateCustomerInput, w as WCAddress, e as WCCreateOrderInput, g as WCCustomer, _ as WCDimensions, u as WCImage, f as WCOrder, $ as WCOrderLineItem, b as WCProduct, a0 as WCProductAttribute, a1 as WCProductDefaultAttribute, c as WCProductFilterParams, v as WCProductVariation, a2 as WCShippingLine, s as WPEntity, h as WPGraphQLConfig, a3 as WPGraphQLError, o as WPULikeCheckParams, p as WPULikeCheckResponse, a4 as WPULikeItemType, l as WPULikeStats, k as WPULikeStatsParams, m as WPULikeStatus, x as WPULikeVoteParams, n as WPULikeVoteResponse, a as WooCommerceConfig, a5 as WooCommerceError, a6 as WooCommercePaginationHeaders, d as WooCommerceResponse, a7 as WordPressAPIError, a8 as createCookieConsentHandler, a9 as defaultMessages, aa as defaultMessagesPl, ab as parseCookieConsent, ac as resolveMessage } from '../types-D6rih4G8.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, 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,2 +1,2 @@
1
- export { x as AuthenticationError, A as Author, B as BlockType, C as CookieConsentCategories, y as CookieConsentConfig, E as EditorBlock, z as EmbeddedAuthor, D as EmbeddedTerm, H as ErrorCode, F as FeaturedMedia, j as GQLConnection, I as GQLError, K as GQLPageInfo, G as GQLPost, i as GQLPostFilter, J as JwtAuthCredentials, q as JwtAuthResponse, M as MediaDetails, L as MediaSize, N as NextWordpressConfig, P as Post, O as PostEmbedded, s as RenderedContent, R as RenderedTitle, S as SearchResult, T as Taxonomy, Q as TemplatePart, U as UpdateCustomerInput, v as WCAddress, e as WCCreateOrderInput, g as WCCustomer, V as WCDimensions, t as WCImage, f as WCOrder, X as WCOrderLineItem, b as WCProduct, Y as WCProductAttribute, Z as WCProductDefaultAttribute, c as WCProductFilterParams, u as WCProductVariation, _ as WCShippingLine, r as WPEntity, h as WPGraphQLConfig, $ as WPGraphQLError, o as WPULikeCheckParams, p as WPULikeCheckResponse, a0 as WPULikeItemType, l as WPULikeStats, k as WPULikeStatsParams, m as WPULikeStatus, w as WPULikeVoteParams, n as WPULikeVoteResponse, a as WooCommerceConfig, a1 as WooCommerceError, a2 as WooCommercePaginationHeaders, d as WooCommerceResponse, a3 as WordPressAPIError, a4 as createCookieConsentHandler, a5 as defaultMessages, a6 as defaultMessagesPl, a7 as parseCookieConsent, a8 as resolveMessage } from '../types-BELSHjQr.js';
2
- export { CF7SubmissionResponse, CF7SubmissionStatus, CF7ValidationError, 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 { y as AuthenticationError, A as Author, B as BlockType, z as CF7Error, q as CF7SubmissionResponse, D as CF7SubmissionStatus, E as CF7ValidationError, C as CookieConsentCategories, H as CookieConsentConfig, I as EditorBlock, K as EmbeddedAuthor, L as EmbeddedTerm, M as ErrorCode, F as FeaturedMedia, j as GQLConnection, O as GQLError, Q as GQLPageInfo, G as GQLPost, i as GQLPostFilter, J as JwtAuthCredentials, r as JwtAuthResponse, S as MediaDetails, V as MediaSize, N as NextWordpressConfig, P as Post, X as PostEmbedded, t as RenderedContent, R as RenderedTitle, Y as SearchResult, T as Taxonomy, Z as TemplatePart, U as UpdateCustomerInput, w as WCAddress, e as WCCreateOrderInput, g as WCCustomer, _ as WCDimensions, u as WCImage, f as WCOrder, $ as WCOrderLineItem, b as WCProduct, a0 as WCProductAttribute, a1 as WCProductDefaultAttribute, c as WCProductFilterParams, v as WCProductVariation, a2 as WCShippingLine, s as WPEntity, h as WPGraphQLConfig, a3 as WPGraphQLError, o as WPULikeCheckParams, p as WPULikeCheckResponse, a4 as WPULikeItemType, l as WPULikeStats, k as WPULikeStatsParams, m as WPULikeStatus, x as WPULikeVoteParams, n as WPULikeVoteResponse, a as WooCommerceConfig, a5 as WooCommerceError, a6 as WooCommercePaginationHeaders, d as WooCommerceResponse, a7 as WordPressAPIError, a8 as createCookieConsentHandler, a9 as defaultMessages, aa as defaultMessagesPl, ab as parseCookieConsent, ac as resolveMessage } from '../types-D6rih4G8.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, 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';
@@ -36,7 +36,13 @@ var ErrorCode = {
36
36
  // Auth
37
37
  AUTH_JWT_FAILED: "AUTH_JWT_FAILED",
38
38
  AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID",
39
- AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID"
39
+ AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID",
40
+ // Contact Form 7
41
+ CF7_MAIL_SENT: "CF7_MAIL_SENT",
42
+ CF7_MAIL_FAILED: "CF7_MAIL_FAILED",
43
+ CF7_VALIDATION_FAILED: "CF7_VALIDATION_FAILED",
44
+ CF7_SPAM: "CF7_SPAM",
45
+ CF7_ABORTED: "CF7_ABORTED"
40
46
  };
41
47
  var defaultMessages = {
42
48
  WP_REQUEST_FAILED: "WordPress API request failed",
@@ -61,7 +67,12 @@ var defaultMessages = {
61
67
  WOO_SHIPPING_ZONE_NOT_FOUND: "Shipping zone not found",
62
68
  AUTH_JWT_FAILED: "JWT authentication failed",
63
69
  AUTH_CREDENTIALS_INVALID: "Invalid credentials",
64
- AUTH_TOKEN_INVALID: "JWT token is invalid or expired"
70
+ AUTH_TOKEN_INVALID: "JWT token is invalid or expired",
71
+ CF7_MAIL_SENT: "Thank you for your message.",
72
+ CF7_MAIL_FAILED: "There was an error trying to send your message.",
73
+ CF7_VALIDATION_FAILED: "One or more fields have an error. Please check and try again.",
74
+ CF7_SPAM: "There was an error trying to send your message. Please try later.",
75
+ CF7_ABORTED: "Message submission has been aborted."
65
76
  };
66
77
  var defaultMessagesPl = {
67
78
  WP_REQUEST_FAILED: "B\u0142\u0105d \u017C\u0105dania do WordPress API",
@@ -86,149 +97,17 @@ var defaultMessagesPl = {
86
97
  WOO_SHIPPING_ZONE_NOT_FOUND: "Strefa wysy\u0142ki nie istnieje",
87
98
  AUTH_JWT_FAILED: "B\u0142\u0105d uwierzytelnienia JWT",
88
99
  AUTH_CREDENTIALS_INVALID: "Nieprawid\u0142owe dane logowania",
89
- AUTH_TOKEN_INVALID: "Token JWT jest nieprawid\u0142owy lub wygas\u0142"
100
+ AUTH_TOKEN_INVALID: "Token JWT jest nieprawid\u0142owy lub wygas\u0142",
101
+ CF7_MAIL_SENT: "Dzi\u0119kujemy za wiadomo\u015B\u0107.",
102
+ CF7_MAIL_FAILED: "Wyst\u0105pi\u0142 b\u0142\u0105d podczas wysy\u0142ania wiadomo\u015Bci.",
103
+ CF7_VALIDATION_FAILED: "Jedno lub wi\u0119cej p\xF3l zawiera b\u0142\u0105d. Sprawd\u017A i spr\xF3buj ponownie.",
104
+ CF7_SPAM: "Wyst\u0105pi\u0142 b\u0142\u0105d podczas wysy\u0142ania wiadomo\u015Bci. Spr\xF3buj p\xF3\u017Aniej.",
105
+ CF7_ABORTED: "Wysy\u0142anie formularza zosta\u0142o przerwane."
90
106
  };
91
107
  function resolveMessage(code, overrides) {
92
108
  return overrides?.[code] ?? defaultMessages[code];
93
109
  }
94
110
 
95
- // src/integrations/restApi/core/client/types.ts
96
- var WordPressAPIError = class extends Error {
97
- constructor(code, status, endpoint, message, detail) {
98
- super(detail ? `${message}: ${detail}` : message);
99
- __publicField(this, "code", code);
100
- __publicField(this, "status", status);
101
- __publicField(this, "endpoint", endpoint);
102
- this.name = "WordPressAPIError";
103
- }
104
- };
105
-
106
- // src/integrations/restApi/core/client/url.ts
107
- function buildUrl(config, path, query) {
108
- const base = resolveBaseUrl(config);
109
- if (!query) return `${base}${path}`;
110
- const params = new URLSearchParams();
111
- for (const [key, value] of Object.entries(query)) {
112
- if (value !== void 0 && value !== null) {
113
- params.set(key, String(value));
114
- }
115
- }
116
- const qs = params.toString();
117
- return qs ? `${base}${path}?${qs}` : `${base}${path}`;
118
- }
119
-
120
- // src/integrations/restApi/core/client/fetcher.ts
121
- var USER_AGENT = "NextWordpress Client";
122
- function resolveWpErrorCode(status) {
123
- if (status === 401) return ErrorCode.WP_UNAUTHORIZED;
124
- if (status === 403) return ErrorCode.WP_FORBIDDEN;
125
- if (status === 404) return ErrorCode.WP_NOT_FOUND;
126
- return ErrorCode.WP_REQUEST_FAILED;
127
- }
128
- function createFetcher(config) {
129
- const cacheTtl = config.cacheTTL ?? 300;
130
- async function doFetch(url, init = {}) {
131
- const response = await fetch(url, init);
132
- if (!response.ok) {
133
- const code = resolveWpErrorCode(response.status);
134
- throw new WordPressAPIError(
135
- code,
136
- response.status,
137
- url,
138
- resolveMessage(code, config.errorMessages),
139
- response.statusText
140
- );
141
- }
142
- return response;
143
- }
144
- async function wpFetch(path, query, tags = ["wordpress"]) {
145
- const url = buildUrl(config, path, query);
146
- const res = await doFetch(url, {
147
- headers: { "User-Agent": USER_AGENT },
148
- next: { tags, revalidate: cacheTtl }
149
- });
150
- return await res.json();
151
- }
152
- async function wpFetchGraceful(path, fallback, query, tags = ["wordpress"]) {
153
- try {
154
- return await wpFetch(path, query, tags);
155
- } catch {
156
- console.warn(`WordPress fetch failed for ${path}`);
157
- return fallback;
158
- }
159
- }
160
- async function wpFetchPaginated(path, query, tags = ["wordpress"]) {
161
- const url = buildUrl(config, path, query);
162
- const res = await doFetch(url, {
163
- headers: { "User-Agent": USER_AGENT },
164
- next: { tags, revalidate: cacheTtl }
165
- });
166
- return {
167
- data: await res.json(),
168
- headers: {
169
- total: parseInt(res.headers.get("X-WP-Total") ?? "0", 10),
170
- totalPages: parseInt(res.headers.get("X-WP-TotalPages") ?? "0", 10)
171
- }
172
- };
173
- }
174
- async function wpFetchPaginatedGraceful(path, query, tags = ["wordpress"]) {
175
- const empty = { data: [], headers: { total: 0, totalPages: 0 } };
176
- try {
177
- return await wpFetchPaginated(path, query, tags);
178
- } catch {
179
- console.warn(`WordPress paginated fetch failed for ${path}`);
180
- return empty;
181
- }
182
- }
183
- async function wpMutate(path, body, method = "POST", authToken) {
184
- const url = buildUrl(config, path);
185
- const headers = {
186
- "Content-Type": "application/json",
187
- "User-Agent": USER_AGENT
188
- };
189
- if (authToken) {
190
- headers["Authorization"] = authToken.startsWith("Basic ") || authToken.startsWith("Bearer ") ? authToken : `Bearer ${authToken}`;
191
- }
192
- const res = await doFetch(url, {
193
- method,
194
- headers,
195
- body: JSON.stringify(body),
196
- cache: "no-store"
197
- });
198
- return await res.json();
199
- }
200
- async function wpUpload(path, file, filename, mimeType, authToken) {
201
- const url = buildUrl(config, path);
202
- const res = await doFetch(url, {
203
- method: "POST",
204
- headers: {
205
- "Content-Disposition": `attachment; filename="${filename}"`,
206
- "Content-Type": mimeType,
207
- "User-Agent": USER_AGENT,
208
- "Authorization": authToken.startsWith("Basic ") || authToken.startsWith("Bearer ") ? authToken : `Bearer ${authToken}`
209
- },
210
- body: file,
211
- cache: "no-store"
212
- });
213
- return await res.json();
214
- }
215
- return { wpFetch, wpFetchGraceful, wpFetchPaginated, wpFetchPaginatedGraceful, wpMutate, wpUpload };
216
- }
217
-
218
- // src/integrations/restApi/core/contactForm7/queries.ts
219
- function createCF7Queries(config) {
220
- async function submitForm(formId, data) {
221
- const url = buildUrl(config, `/wp-json/contact-form-7/v1/contact-forms/${formId}/feedback`);
222
- const body = new FormData();
223
- for (const [key, value] of Object.entries(data)) {
224
- body.append(key, value);
225
- }
226
- const res = await fetch(url, { method: "POST", body, cache: "no-store" });
227
- return res.json();
228
- }
229
- return { submitForm };
230
- }
231
-
232
111
  // src/integrations/restApi/core/mutations/posts/mutations.ts
233
112
  function createPostsMutations(fetcher) {
234
113
  const { wpMutate } = fetcher;
@@ -422,6 +301,129 @@ function createMediaMutations(fetcher) {
422
301
  return { uploadMedia, updateMedia, deleteMedia };
423
302
  }
424
303
 
304
+ // src/integrations/restApi/core/client/types.ts
305
+ var WordPressAPIError = class extends Error {
306
+ constructor(code, status, endpoint, message, detail) {
307
+ super(detail ? `${message}: ${detail}` : message);
308
+ __publicField(this, "code", code);
309
+ __publicField(this, "status", status);
310
+ __publicField(this, "endpoint", endpoint);
311
+ this.name = "WordPressAPIError";
312
+ }
313
+ };
314
+
315
+ // src/integrations/restApi/core/client/url.ts
316
+ function buildUrl(config, path, query) {
317
+ const base = resolveBaseUrl(config);
318
+ if (!query) return `${base}${path}`;
319
+ const params = new URLSearchParams();
320
+ for (const [key, value] of Object.entries(query)) {
321
+ if (value !== void 0 && value !== null) {
322
+ params.set(key, String(value));
323
+ }
324
+ }
325
+ const qs = params.toString();
326
+ return qs ? `${base}${path}?${qs}` : `${base}${path}`;
327
+ }
328
+
329
+ // src/integrations/restApi/core/client/fetcher.ts
330
+ var USER_AGENT = "NextWordpress Client";
331
+ function resolveWpErrorCode(status) {
332
+ if (status === 401) return ErrorCode.WP_UNAUTHORIZED;
333
+ if (status === 403) return ErrorCode.WP_FORBIDDEN;
334
+ if (status === 404) return ErrorCode.WP_NOT_FOUND;
335
+ return ErrorCode.WP_REQUEST_FAILED;
336
+ }
337
+ function createFetcher(config) {
338
+ const cacheTtl = config.cacheTTL ?? 300;
339
+ async function doFetch(url, init = {}) {
340
+ const response = await fetch(url, init);
341
+ if (!response.ok) {
342
+ const code = resolveWpErrorCode(response.status);
343
+ throw new WordPressAPIError(
344
+ code,
345
+ response.status,
346
+ url,
347
+ resolveMessage(code, config.errorMessages),
348
+ response.statusText
349
+ );
350
+ }
351
+ return response;
352
+ }
353
+ async function wpFetch(path, query, tags = ["wordpress"]) {
354
+ const url = buildUrl(config, path, query);
355
+ const res = await doFetch(url, {
356
+ headers: { "User-Agent": USER_AGENT },
357
+ next: { tags, revalidate: cacheTtl }
358
+ });
359
+ return await res.json();
360
+ }
361
+ async function wpFetchGraceful(path, fallback, query, tags = ["wordpress"]) {
362
+ try {
363
+ return await wpFetch(path, query, tags);
364
+ } catch {
365
+ console.warn(`WordPress fetch failed for ${path}`);
366
+ return fallback;
367
+ }
368
+ }
369
+ async function wpFetchPaginated(path, query, tags = ["wordpress"]) {
370
+ const url = buildUrl(config, path, query);
371
+ const res = await doFetch(url, {
372
+ headers: { "User-Agent": USER_AGENT },
373
+ next: { tags, revalidate: cacheTtl }
374
+ });
375
+ return {
376
+ data: await res.json(),
377
+ headers: {
378
+ total: parseInt(res.headers.get("X-WP-Total") ?? "0", 10),
379
+ totalPages: parseInt(res.headers.get("X-WP-TotalPages") ?? "0", 10)
380
+ }
381
+ };
382
+ }
383
+ async function wpFetchPaginatedGraceful(path, query, tags = ["wordpress"]) {
384
+ const empty = { data: [], headers: { total: 0, totalPages: 0 } };
385
+ try {
386
+ return await wpFetchPaginated(path, query, tags);
387
+ } catch {
388
+ console.warn(`WordPress paginated fetch failed for ${path}`);
389
+ return empty;
390
+ }
391
+ }
392
+ async function wpMutate(path, body, method = "POST", authToken) {
393
+ const url = buildUrl(config, path);
394
+ const headers = {
395
+ "Content-Type": "application/json",
396
+ "User-Agent": USER_AGENT
397
+ };
398
+ if (authToken) {
399
+ headers["Authorization"] = authToken.startsWith("Basic ") || authToken.startsWith("Bearer ") ? authToken : `Bearer ${authToken}`;
400
+ }
401
+ const res = await doFetch(url, {
402
+ method,
403
+ headers,
404
+ body: JSON.stringify(body),
405
+ cache: "no-store"
406
+ });
407
+ return await res.json();
408
+ }
409
+ async function wpUpload(path, file, filename, mimeType, authToken) {
410
+ const url = buildUrl(config, path);
411
+ const res = await doFetch(url, {
412
+ method: "POST",
413
+ headers: {
414
+ "Content-Disposition": `attachment; filename="${filename}"`,
415
+ "Content-Type": mimeType,
416
+ "User-Agent": USER_AGENT,
417
+ "Authorization": authToken.startsWith("Basic ") || authToken.startsWith("Bearer ") ? authToken : `Bearer ${authToken}`
418
+ },
419
+ body: file,
420
+ cache: "no-store"
421
+ });
422
+ return await res.json();
423
+ }
424
+ return { wpFetch, wpFetchGraceful, wpFetchPaginated, wpFetchPaginatedGraceful, wpMutate, wpUpload };
425
+ }
426
+
425
427
  // src/integrations/restApi/core/mutations/index.ts
426
428
  function createWordPressMutationsClient(config) {
427
429
  const fetcher = createFetcher(config);
@@ -2131,6 +2133,48 @@ function createWPULikeClient(config) {
2131
2133
  return createWPULikeQueries(fetcher);
2132
2134
  }
2133
2135
 
2136
+ // src/integrations/restApi/contactForm7/types.ts
2137
+ var CF7Error = class extends Error {
2138
+ constructor(code, status, endpoint, message) {
2139
+ super(message);
2140
+ __publicField(this, "code", code);
2141
+ __publicField(this, "status", status);
2142
+ __publicField(this, "endpoint", endpoint);
2143
+ this.name = "CF7Error";
2144
+ }
2145
+ };
2146
+
2147
+ // src/integrations/restApi/contactForm7/queries.ts
2148
+ var statusToCode = {
2149
+ mail_sent: ErrorCode.CF7_MAIL_SENT,
2150
+ mail_failed: ErrorCode.CF7_MAIL_FAILED,
2151
+ validation_failed: ErrorCode.CF7_VALIDATION_FAILED,
2152
+ spam: ErrorCode.CF7_SPAM,
2153
+ aborted: ErrorCode.CF7_ABORTED
2154
+ };
2155
+ function createCF7Queries(config) {
2156
+ async function submitForm(formId, data) {
2157
+ const url = buildUrl(config, `/wp-json/contact-form-7/v1/contact-forms/${formId}/feedback`);
2158
+ const body = new FormData();
2159
+ for (const [key, value] of Object.entries(data)) {
2160
+ body.append(key, value);
2161
+ }
2162
+ const res = await fetch(url, { method: "POST", body, cache: "no-store" });
2163
+ if (!res.ok) {
2164
+ throw new CF7Error(
2165
+ ErrorCode.CF7_MAIL_FAILED,
2166
+ res.status,
2167
+ url,
2168
+ resolveMessage(ErrorCode.CF7_MAIL_FAILED, config.errorMessages)
2169
+ );
2170
+ }
2171
+ const result = await res.json();
2172
+ const code = statusToCode[result.status];
2173
+ return { ...result, message: resolveMessage(code, config.errorMessages) };
2174
+ }
2175
+ return { submitForm };
2176
+ }
2177
+
2134
2178
  // src/integrations/wpGraphQL/client/types.ts
2135
2179
  var WPGraphQLError = class extends Error {
2136
2180
  constructor(code, status, endpoint, message, gqlErrors) {
@@ -4311,6 +4355,6 @@ async function validateJwtToken(config, token) {
4311
4355
  return response.ok;
4312
4356
  }
4313
4357
 
4314
- export { AuthenticationError, 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 };
4358
+ 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 };
4315
4359
  //# sourceMappingURL=index.js.map
4316
4360
  //# sourceMappingURL=index.js.map