@szymonpiatek/nextwordpress 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { N as NextWordpressConfig, J as JwtAuthCredentials, r as JwtAuthResponse, a as WooCommerceConfig, d as WooCommerceResponse, W as WordPressResponse, T as Taxonomy, s as WPEntity, R as RenderedTitle, t as RenderedContent, P as Post, A as Author, F as FeaturedMedia, u as WCImage, v as WCProductVariation, b as WCProduct, g as WCCustomer, w as WCAddress, U as UpdateCustomerInput, e as WCCreateOrderInput, f as WCOrder, c as WCProductFilterParams, k as WPULikeStatsParams, l as WPULikeStats, o as WPULikeCheckParams, p as WPULikeCheckResponse, x as WPULikeVoteParams, n as WPULikeVoteResponse, q as CF7SubmissionResponse, h as WPGraphQLConfig, j as GQLConnection, i as GQLPostFilter, G as GQLPost } from './types-COJWPg77.cjs';
2
- export { y as AuthenticationError, B as BlockType, z as CF7SubmissionStatus, D as CF7ValidationError, C as CookieConsentCategories, E as CookieConsentConfig, H as EditorBlock, I as EmbeddedAuthor, K as EmbeddedTerm, L as ErrorCode, M as GQLError, O as GQLPageInfo, Q as MediaDetails, S as MediaSize, V as PostEmbedded, X as SearchResult, Y as TemplatePart, Z as WCDimensions, _ as WCOrderLineItem, $ as WCProductAttribute, a0 as WCProductDefaultAttribute, a1 as WCShippingLine, a2 as WPGraphQLError, a3 as WPULikeItemType, m as WPULikeStatus, a4 as WooCommerceError, a5 as WooCommercePaginationHeaders, a6 as WordPressAPIError, a7 as createCookieConsentHandler, a8 as defaultMessages, a9 as defaultMessagesPl, aa as parseCookieConsent, ab as resolveMessage } from './types-COJWPg77.cjs';
1
+ import { N as NextWordpressConfig, J as JwtAuthCredentials, t as JwtAuthResponse, W as WPGraphQLConfig, c as WooCommerceConfig, f as WooCommerceResponse, b as WordPressResponse, T as Taxonomy, u as WPEntity, R as RenderedTitle, v as RenderedContent, P as Post, A as Author, F as FeaturedMedia, w as WCImage, x as WCProductVariation, d as WCProduct, i as WCCustomer, y as WCAddress, U as UpdateCustomerInput, g as WCCreateOrderInput, h as WCOrder, e as WCProductFilterParams, m as WPULikeStatsParams, n as WPULikeStats, q as WPULikeCheckParams, r as WPULikeCheckResponse, z as WPULikeVoteParams, p as WPULikeVoteResponse, s as CF7SubmissionResponse, B as GQLSendPasswordResetEmailInput, G as GQLSendPasswordResetEmailResult, D as GQLResetUserPasswordInput, a as GQLResetUserPasswordResult, l as GQLConnection, k as GQLPostFilter, j as GQLPost } from './types-CvO7Ijbs.cjs';
2
+ export { E as AuthenticationError, H as BlockType, I as CF7Error, K as CF7SubmissionStatus, L as CF7ValidationError, C as CookieConsentCategories, M as CookieConsentConfig, O as EditorBlock, Q as EmbeddedAuthor, S as EmbeddedTerm, V as ErrorCode, X as GQLError, Y as GQLPageInfo, Z as MediaDetails, _ as MediaSize, $ as PostEmbedded, a0 as SearchResult, a1 as TemplatePart, a2 as WCDimensions, a3 as WCOrderLineItem, a4 as WCProductAttribute, a5 as WCProductDefaultAttribute, a6 as WCShippingLine, a7 as WPGraphQLError, a8 as WPULikeItemType, o as WPULikeStatus, a9 as WooCommerceError, aa as WooCommercePaginationHeaders, ab as WordPressAPIError, ac as createCookieConsentHandler, ad as defaultMessages, ae as defaultMessagesPl, af as parseCookieConsent, ag as resolveMessage } from './types-CvO7Ijbs.cjs';
3
3
 
4
4
  declare function createApplicationPasswordToken(username: string, appPassword: string): string;
5
5
 
@@ -8,6 +8,13 @@ declare function resolveBaseUrl(config: NextWordpressConfig): string;
8
8
  declare function authenticateJwt(config: NextWordpressConfig, credentials: JwtAuthCredentials): Promise<JwtAuthResponse>;
9
9
  declare function validateJwtToken(config: NextWordpressConfig, token: string): Promise<boolean>;
10
10
 
11
+ declare function createWPGraphQLFetcher(config: WPGraphQLConfig): {
12
+ gqlFetch: <TData>(document: string, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
13
+ gqlFetchGraceful: <TData>(document: string, fallback: TData, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
14
+ gqlMutate: <TData>(document: string, variables?: Record<string, unknown>, authToken?: string) => Promise<TData>;
15
+ };
16
+ type WPGraphQLFetcher = ReturnType<typeof createWPGraphQLFetcher>;
17
+
11
18
  declare function createWooCommerceFetcher(config: WooCommerceConfig): {
12
19
  wcFetch: <T>(path: string, query?: Record<string, unknown>, tags?: string[], options?: RequestInit) => Promise<T>;
13
20
  wcFetchGraceful: <T>(path: string, fallback: T, query?: Record<string, unknown>, tags?: string[]) => Promise<T>;
@@ -1252,13 +1259,6 @@ declare function createCF7Queries(config: NextWordpressConfig): {
1252
1259
  submitForm: (formId: number, data: Record<string, string>) => Promise<CF7SubmissionResponse>;
1253
1260
  };
1254
1261
 
1255
- declare function createWPGraphQLFetcher(config: WPGraphQLConfig): {
1256
- gqlFetch: <TData>(document: string, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
1257
- gqlFetchGraceful: <TData>(document: string, fallback: TData, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
1258
- gqlMutate: <TData>(document: string, variables?: Record<string, unknown>, authToken?: string) => Promise<TData>;
1259
- };
1260
- type WPGraphQLFetcher = ReturnType<typeof createWPGraphQLFetcher>;
1261
-
1262
1262
  interface GQLPage {
1263
1263
  id: string;
1264
1264
  databaseId: number;
@@ -1621,6 +1621,8 @@ interface GQLDeleteMediaItemResult {
1621
1621
  }
1622
1622
 
1623
1623
  declare function createWPGraphQLMutationsClient(config: WPGraphQLConfig): {
1624
+ sendPasswordResetEmail: (input: GQLSendPasswordResetEmailInput) => Promise<GQLSendPasswordResetEmailResult>;
1625
+ resetUserPassword: (input: GQLResetUserPasswordInput) => Promise<GQLResetUserPasswordResult>;
1624
1626
  createMediaItem: (input: GQLCreateMediaItemInput, authToken: string) => Promise<GQLMutatedMediaItem>;
1625
1627
  updateMediaItem: (input: GQLUpdateMediaItemInput, authToken: string) => Promise<GQLMutatedMediaItem>;
1626
1628
  deleteMediaItem: (id: string, authToken: string, forceDelete?: boolean) => Promise<GQLDeleteMediaItemResult>;
@@ -2006,4 +2008,4 @@ interface FaustPreviewDeps {
2006
2008
  declare function createFaustAuthHandler(config: FaustConfig): (request: Request, routePath: string) => Promise<Response>;
2007
2009
  declare function createPreviewHandler(config: FaustPreviewConfig, deps: FaustPreviewDeps): (request: Request) => Promise<Response>;
2008
2010
 
2009
- export { Author, CF7SubmissionResponse, type Category, type Comment, type CommentAuthorAvatar, type CreateAttributeTermInput, type CreateAuthorInput, type CreateCategoryInput, type CreateCommentInput, type CreateCouponInput, type CreateMenuInput, type CreateMenuItemInput, type CreatePageInput, type CreatePostInput, type CreateProductAttributeInput, type CreateProductCategoryInput, type CreateProductInput, type CreateProductReviewInput, type CreateProductTagInput, type CreateShippingClassInput, type CreateShippingZoneInput, type CreateShippingZoneMethodInput, type CreateTagInput, type CreateTaxClassInput, type CreateTaxRateInput, type CreateWebhookInput, type FaustConfig, type FaustPreviewConfig, type FaustPreviewDeps, FeaturedMedia, type GQLACFFieldGroup, type GQLAuthor, type GQLCPTNode, type GQLCategory, GQLConnection, type GQLCreateCommentInput, type GQLCreateCommentResult, type GQLCreatePostInput, type GQLCustomer, type GQLDeletePostResult, type GQLLineItem, type GQLMutatedComment, type GQLMutatedPost, type GQLOrder, type GQLOrderAddress, type GQLPage, type GQLPageWithSEO, GQLPost, GQLPostFilter, type GQLPostStatus, type GQLPostWithSEO, type GQLProduct, type GQLProductFilter, type GQLProductVariation, type GQLTag, type GQLUpdatePostInput, type GQLYoastSEO, JwtAuthCredentials, JwtAuthResponse, type Menu, type MenuItem, type MenuLocation, type MenuWithItems, NextWordpressConfig, type OmnibusPriceEntry, type OmnibusProductData, type Page, Post, RenderedContent, RenderedTitle, type RestPageStatus, type RestPostStatus, type RevalidationConfig, type RevalidationPayload, type RevalidationResult, type Tag, Taxonomy, type UpdateAttributeTermInput, type UpdateAuthorInput, type UpdateCategoryInput, type UpdateCommentInput, type UpdateCouponInput, UpdateCustomerInput, type UpdateMediaInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePageInput, type UpdatePostInput, type UpdateProductAttributeInput, type UpdateProductCategoryInput, type UpdateProductInput, type UpdateProductReviewInput, type UpdateProductTagInput, type UpdateShippingClassInput, type UpdateShippingZoneInput, type UpdateShippingZoneMethodInput, type UpdateTagInput, type UpdateTaxRateInput, type UpdateWebhookInput, type UploadMediaInput, WCAddress, type WCAttributeTerm, type WCContinent, type WCCountry, type WCCoupon, WCCreateOrderInput, type WCCreateOrderNoteInput, type WCCreateOrderRefundInput, type WCCurrency, WCCustomer, type WCProductAttribute as WCGlobalProductAttribute, WCImage, WCOrder, type WCOrderNote, type WCOrderRefund, type WCPaymentGateway, type WCPaymentGatewaySetting, WCProduct, type WCProductCategory, WCProductFilterParams, type WCProductReview, type WCProductReviewFilterParams, type WCProductStatus, type WCProductTag, WCProductVariation, type WCProductVariationWithOmnibus, type WCProductWithOmnibus, type WCRefundLineItem, type WCReviewStatus, type WCSalesReport, type WCSalesReportParams, type WCSettingGroup, type WCSettingOption, type WCShippingClass, type WCShippingMethod, type WCShippingZone, type WCShippingZoneLocation, type WCShippingZoneMethod, type WCStatusCount, type WCSystemStatus, type WCSystemStatusTool, type WCTaxClass, type WCTaxRate, type WCTopSeller, type WCTopSellersParams, type WCWebhook, type WCWebhookStatus, type WCWebhookTopic, WPEntity, WPGraphQLConfig, type WPGraphQLFetcher, WPULikeCheckParams, WPULikeCheckResponse, WPULikeStats, WPULikeStatsParams, WPULikeVoteParams, WPULikeVoteResponse, WooCommerceConfig, type WooCommerceFetcher, WooCommerceResponse, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation };
2011
+ export { Author, CF7SubmissionResponse, type Category, type Comment, type CommentAuthorAvatar, type CreateAttributeTermInput, type CreateAuthorInput, type CreateCategoryInput, type CreateCommentInput, type CreateCouponInput, type CreateMenuInput, type CreateMenuItemInput, type CreatePageInput, type CreatePostInput, type CreateProductAttributeInput, type CreateProductCategoryInput, type CreateProductInput, type CreateProductReviewInput, type CreateProductTagInput, type CreateShippingClassInput, type CreateShippingZoneInput, type CreateShippingZoneMethodInput, type CreateTagInput, type CreateTaxClassInput, type CreateTaxRateInput, type CreateWebhookInput, type FaustConfig, type FaustPreviewConfig, type FaustPreviewDeps, FeaturedMedia, type GQLACFFieldGroup, type GQLAuthor, type GQLCPTNode, type GQLCategory, GQLConnection, type GQLCreateCommentInput, type GQLCreateCommentResult, type GQLCreatePostInput, type GQLCustomer, type GQLDeletePostResult, type GQLLineItem, type GQLMutatedComment, type GQLMutatedPost, type GQLOrder, type GQLOrderAddress, type GQLPage, type GQLPageWithSEO, GQLPost, GQLPostFilter, type GQLPostStatus, type GQLPostWithSEO, type GQLProduct, type GQLProductFilter, type GQLProductVariation, GQLResetUserPasswordInput, GQLResetUserPasswordResult, GQLSendPasswordResetEmailInput, GQLSendPasswordResetEmailResult, type GQLTag, type GQLUpdatePostInput, type GQLYoastSEO, JwtAuthCredentials, JwtAuthResponse, type Menu, type MenuItem, type MenuLocation, type MenuWithItems, NextWordpressConfig, type OmnibusPriceEntry, type OmnibusProductData, type Page, Post, RenderedContent, RenderedTitle, type RestPageStatus, type RestPostStatus, type RevalidationConfig, type RevalidationPayload, type RevalidationResult, type Tag, Taxonomy, type UpdateAttributeTermInput, type UpdateAuthorInput, type UpdateCategoryInput, type UpdateCommentInput, type UpdateCouponInput, UpdateCustomerInput, type UpdateMediaInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePageInput, type UpdatePostInput, type UpdateProductAttributeInput, type UpdateProductCategoryInput, type UpdateProductInput, type UpdateProductReviewInput, type UpdateProductTagInput, type UpdateShippingClassInput, type UpdateShippingZoneInput, type UpdateShippingZoneMethodInput, type UpdateTagInput, type UpdateTaxRateInput, type UpdateWebhookInput, type UploadMediaInput, WCAddress, type WCAttributeTerm, type WCContinent, type WCCountry, type WCCoupon, WCCreateOrderInput, type WCCreateOrderNoteInput, type WCCreateOrderRefundInput, type WCCurrency, WCCustomer, type WCProductAttribute as WCGlobalProductAttribute, WCImage, WCOrder, type WCOrderNote, type WCOrderRefund, type WCPaymentGateway, type WCPaymentGatewaySetting, WCProduct, type WCProductCategory, WCProductFilterParams, type WCProductReview, type WCProductReviewFilterParams, type WCProductStatus, type WCProductTag, WCProductVariation, type WCProductVariationWithOmnibus, type WCProductWithOmnibus, type WCRefundLineItem, type WCReviewStatus, type WCSalesReport, type WCSalesReportParams, type WCSettingGroup, type WCSettingOption, type WCShippingClass, type WCShippingMethod, type WCShippingZone, type WCShippingZoneLocation, type WCShippingZoneMethod, type WCStatusCount, type WCSystemStatus, type WCSystemStatusTool, type WCTaxClass, type WCTaxRate, type WCTopSeller, type WCTopSellersParams, type WCWebhook, type WCWebhookStatus, type WCWebhookTopic, WPEntity, WPGraphQLConfig, type WPGraphQLFetcher, WPULikeCheckParams, WPULikeCheckResponse, WPULikeStats, WPULikeStatsParams, WPULikeVoteParams, WPULikeVoteResponse, WooCommerceConfig, type WooCommerceFetcher, WooCommerceResponse, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { N as NextWordpressConfig, J as JwtAuthCredentials, r as JwtAuthResponse, a as WooCommerceConfig, d as WooCommerceResponse, W as WordPressResponse, T as Taxonomy, s as WPEntity, R as RenderedTitle, t as RenderedContent, P as Post, A as Author, F as FeaturedMedia, u as WCImage, v as WCProductVariation, b as WCProduct, g as WCCustomer, w as WCAddress, U as UpdateCustomerInput, e as WCCreateOrderInput, f as WCOrder, c as WCProductFilterParams, k as WPULikeStatsParams, l as WPULikeStats, o as WPULikeCheckParams, p as WPULikeCheckResponse, x as WPULikeVoteParams, n as WPULikeVoteResponse, q as CF7SubmissionResponse, h as WPGraphQLConfig, j as GQLConnection, i as GQLPostFilter, G as GQLPost } from './types-COJWPg77.js';
2
- export { y as AuthenticationError, B as BlockType, z as CF7SubmissionStatus, D as CF7ValidationError, C as CookieConsentCategories, E as CookieConsentConfig, H as EditorBlock, I as EmbeddedAuthor, K as EmbeddedTerm, L as ErrorCode, M as GQLError, O as GQLPageInfo, Q as MediaDetails, S as MediaSize, V as PostEmbedded, X as SearchResult, Y as TemplatePart, Z as WCDimensions, _ as WCOrderLineItem, $ as WCProductAttribute, a0 as WCProductDefaultAttribute, a1 as WCShippingLine, a2 as WPGraphQLError, a3 as WPULikeItemType, m as WPULikeStatus, a4 as WooCommerceError, a5 as WooCommercePaginationHeaders, a6 as WordPressAPIError, a7 as createCookieConsentHandler, a8 as defaultMessages, a9 as defaultMessagesPl, aa as parseCookieConsent, ab as resolveMessage } from './types-COJWPg77.js';
1
+ import { N as NextWordpressConfig, J as JwtAuthCredentials, t as JwtAuthResponse, W as WPGraphQLConfig, c as WooCommerceConfig, f as WooCommerceResponse, b as WordPressResponse, T as Taxonomy, u as WPEntity, R as RenderedTitle, v as RenderedContent, P as Post, A as Author, F as FeaturedMedia, w as WCImage, x as WCProductVariation, d as WCProduct, i as WCCustomer, y as WCAddress, U as UpdateCustomerInput, g as WCCreateOrderInput, h as WCOrder, e as WCProductFilterParams, m as WPULikeStatsParams, n as WPULikeStats, q as WPULikeCheckParams, r as WPULikeCheckResponse, z as WPULikeVoteParams, p as WPULikeVoteResponse, s as CF7SubmissionResponse, B as GQLSendPasswordResetEmailInput, G as GQLSendPasswordResetEmailResult, D as GQLResetUserPasswordInput, a as GQLResetUserPasswordResult, l as GQLConnection, k as GQLPostFilter, j as GQLPost } from './types-CvO7Ijbs.js';
2
+ export { E as AuthenticationError, H as BlockType, I as CF7Error, K as CF7SubmissionStatus, L as CF7ValidationError, C as CookieConsentCategories, M as CookieConsentConfig, O as EditorBlock, Q as EmbeddedAuthor, S as EmbeddedTerm, V as ErrorCode, X as GQLError, Y as GQLPageInfo, Z as MediaDetails, _ as MediaSize, $ as PostEmbedded, a0 as SearchResult, a1 as TemplatePart, a2 as WCDimensions, a3 as WCOrderLineItem, a4 as WCProductAttribute, a5 as WCProductDefaultAttribute, a6 as WCShippingLine, a7 as WPGraphQLError, a8 as WPULikeItemType, o as WPULikeStatus, a9 as WooCommerceError, aa as WooCommercePaginationHeaders, ab as WordPressAPIError, ac as createCookieConsentHandler, ad as defaultMessages, ae as defaultMessagesPl, af as parseCookieConsent, ag as resolveMessage } from './types-CvO7Ijbs.js';
3
3
 
4
4
  declare function createApplicationPasswordToken(username: string, appPassword: string): string;
5
5
 
@@ -8,6 +8,13 @@ declare function resolveBaseUrl(config: NextWordpressConfig): string;
8
8
  declare function authenticateJwt(config: NextWordpressConfig, credentials: JwtAuthCredentials): Promise<JwtAuthResponse>;
9
9
  declare function validateJwtToken(config: NextWordpressConfig, token: string): Promise<boolean>;
10
10
 
11
+ declare function createWPGraphQLFetcher(config: WPGraphQLConfig): {
12
+ gqlFetch: <TData>(document: string, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
13
+ gqlFetchGraceful: <TData>(document: string, fallback: TData, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
14
+ gqlMutate: <TData>(document: string, variables?: Record<string, unknown>, authToken?: string) => Promise<TData>;
15
+ };
16
+ type WPGraphQLFetcher = ReturnType<typeof createWPGraphQLFetcher>;
17
+
11
18
  declare function createWooCommerceFetcher(config: WooCommerceConfig): {
12
19
  wcFetch: <T>(path: string, query?: Record<string, unknown>, tags?: string[], options?: RequestInit) => Promise<T>;
13
20
  wcFetchGraceful: <T>(path: string, fallback: T, query?: Record<string, unknown>, tags?: string[]) => Promise<T>;
@@ -1252,13 +1259,6 @@ declare function createCF7Queries(config: NextWordpressConfig): {
1252
1259
  submitForm: (formId: number, data: Record<string, string>) => Promise<CF7SubmissionResponse>;
1253
1260
  };
1254
1261
 
1255
- declare function createWPGraphQLFetcher(config: WPGraphQLConfig): {
1256
- gqlFetch: <TData>(document: string, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
1257
- gqlFetchGraceful: <TData>(document: string, fallback: TData, variables?: Record<string, unknown>, tags?: string[]) => Promise<TData>;
1258
- gqlMutate: <TData>(document: string, variables?: Record<string, unknown>, authToken?: string) => Promise<TData>;
1259
- };
1260
- type WPGraphQLFetcher = ReturnType<typeof createWPGraphQLFetcher>;
1261
-
1262
1262
  interface GQLPage {
1263
1263
  id: string;
1264
1264
  databaseId: number;
@@ -1621,6 +1621,8 @@ interface GQLDeleteMediaItemResult {
1621
1621
  }
1622
1622
 
1623
1623
  declare function createWPGraphQLMutationsClient(config: WPGraphQLConfig): {
1624
+ sendPasswordResetEmail: (input: GQLSendPasswordResetEmailInput) => Promise<GQLSendPasswordResetEmailResult>;
1625
+ resetUserPassword: (input: GQLResetUserPasswordInput) => Promise<GQLResetUserPasswordResult>;
1624
1626
  createMediaItem: (input: GQLCreateMediaItemInput, authToken: string) => Promise<GQLMutatedMediaItem>;
1625
1627
  updateMediaItem: (input: GQLUpdateMediaItemInput, authToken: string) => Promise<GQLMutatedMediaItem>;
1626
1628
  deleteMediaItem: (id: string, authToken: string, forceDelete?: boolean) => Promise<GQLDeleteMediaItemResult>;
@@ -2006,4 +2008,4 @@ interface FaustPreviewDeps {
2006
2008
  declare function createFaustAuthHandler(config: FaustConfig): (request: Request, routePath: string) => Promise<Response>;
2007
2009
  declare function createPreviewHandler(config: FaustPreviewConfig, deps: FaustPreviewDeps): (request: Request) => Promise<Response>;
2008
2010
 
2009
- export { Author, CF7SubmissionResponse, type Category, type Comment, type CommentAuthorAvatar, type CreateAttributeTermInput, type CreateAuthorInput, type CreateCategoryInput, type CreateCommentInput, type CreateCouponInput, type CreateMenuInput, type CreateMenuItemInput, type CreatePageInput, type CreatePostInput, type CreateProductAttributeInput, type CreateProductCategoryInput, type CreateProductInput, type CreateProductReviewInput, type CreateProductTagInput, type CreateShippingClassInput, type CreateShippingZoneInput, type CreateShippingZoneMethodInput, type CreateTagInput, type CreateTaxClassInput, type CreateTaxRateInput, type CreateWebhookInput, type FaustConfig, type FaustPreviewConfig, type FaustPreviewDeps, FeaturedMedia, type GQLACFFieldGroup, type GQLAuthor, type GQLCPTNode, type GQLCategory, GQLConnection, type GQLCreateCommentInput, type GQLCreateCommentResult, type GQLCreatePostInput, type GQLCustomer, type GQLDeletePostResult, type GQLLineItem, type GQLMutatedComment, type GQLMutatedPost, type GQLOrder, type GQLOrderAddress, type GQLPage, type GQLPageWithSEO, GQLPost, GQLPostFilter, type GQLPostStatus, type GQLPostWithSEO, type GQLProduct, type GQLProductFilter, type GQLProductVariation, type GQLTag, type GQLUpdatePostInput, type GQLYoastSEO, JwtAuthCredentials, JwtAuthResponse, type Menu, type MenuItem, type MenuLocation, type MenuWithItems, NextWordpressConfig, type OmnibusPriceEntry, type OmnibusProductData, type Page, Post, RenderedContent, RenderedTitle, type RestPageStatus, type RestPostStatus, type RevalidationConfig, type RevalidationPayload, type RevalidationResult, type Tag, Taxonomy, type UpdateAttributeTermInput, type UpdateAuthorInput, type UpdateCategoryInput, type UpdateCommentInput, type UpdateCouponInput, UpdateCustomerInput, type UpdateMediaInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePageInput, type UpdatePostInput, type UpdateProductAttributeInput, type UpdateProductCategoryInput, type UpdateProductInput, type UpdateProductReviewInput, type UpdateProductTagInput, type UpdateShippingClassInput, type UpdateShippingZoneInput, type UpdateShippingZoneMethodInput, type UpdateTagInput, type UpdateTaxRateInput, type UpdateWebhookInput, type UploadMediaInput, WCAddress, type WCAttributeTerm, type WCContinent, type WCCountry, type WCCoupon, WCCreateOrderInput, type WCCreateOrderNoteInput, type WCCreateOrderRefundInput, type WCCurrency, WCCustomer, type WCProductAttribute as WCGlobalProductAttribute, WCImage, WCOrder, type WCOrderNote, type WCOrderRefund, type WCPaymentGateway, type WCPaymentGatewaySetting, WCProduct, type WCProductCategory, WCProductFilterParams, type WCProductReview, type WCProductReviewFilterParams, type WCProductStatus, type WCProductTag, WCProductVariation, type WCProductVariationWithOmnibus, type WCProductWithOmnibus, type WCRefundLineItem, type WCReviewStatus, type WCSalesReport, type WCSalesReportParams, type WCSettingGroup, type WCSettingOption, type WCShippingClass, type WCShippingMethod, type WCShippingZone, type WCShippingZoneLocation, type WCShippingZoneMethod, type WCStatusCount, type WCSystemStatus, type WCSystemStatusTool, type WCTaxClass, type WCTaxRate, type WCTopSeller, type WCTopSellersParams, type WCWebhook, type WCWebhookStatus, type WCWebhookTopic, WPEntity, WPGraphQLConfig, type WPGraphQLFetcher, WPULikeCheckParams, WPULikeCheckResponse, WPULikeStats, WPULikeStatsParams, WPULikeVoteParams, WPULikeVoteResponse, WooCommerceConfig, type WooCommerceFetcher, WooCommerceResponse, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation };
2011
+ export { Author, CF7SubmissionResponse, type Category, type Comment, type CommentAuthorAvatar, type CreateAttributeTermInput, type CreateAuthorInput, type CreateCategoryInput, type CreateCommentInput, type CreateCouponInput, type CreateMenuInput, type CreateMenuItemInput, type CreatePageInput, type CreatePostInput, type CreateProductAttributeInput, type CreateProductCategoryInput, type CreateProductInput, type CreateProductReviewInput, type CreateProductTagInput, type CreateShippingClassInput, type CreateShippingZoneInput, type CreateShippingZoneMethodInput, type CreateTagInput, type CreateTaxClassInput, type CreateTaxRateInput, type CreateWebhookInput, type FaustConfig, type FaustPreviewConfig, type FaustPreviewDeps, FeaturedMedia, type GQLACFFieldGroup, type GQLAuthor, type GQLCPTNode, type GQLCategory, GQLConnection, type GQLCreateCommentInput, type GQLCreateCommentResult, type GQLCreatePostInput, type GQLCustomer, type GQLDeletePostResult, type GQLLineItem, type GQLMutatedComment, type GQLMutatedPost, type GQLOrder, type GQLOrderAddress, type GQLPage, type GQLPageWithSEO, GQLPost, GQLPostFilter, type GQLPostStatus, type GQLPostWithSEO, type GQLProduct, type GQLProductFilter, type GQLProductVariation, GQLResetUserPasswordInput, GQLResetUserPasswordResult, GQLSendPasswordResetEmailInput, GQLSendPasswordResetEmailResult, type GQLTag, type GQLUpdatePostInput, type GQLYoastSEO, JwtAuthCredentials, JwtAuthResponse, type Menu, type MenuItem, type MenuLocation, type MenuWithItems, NextWordpressConfig, type OmnibusPriceEntry, type OmnibusProductData, type Page, Post, RenderedContent, RenderedTitle, type RestPageStatus, type RestPostStatus, type RevalidationConfig, type RevalidationPayload, type RevalidationResult, type Tag, Taxonomy, type UpdateAttributeTermInput, type UpdateAuthorInput, type UpdateCategoryInput, type UpdateCommentInput, type UpdateCouponInput, UpdateCustomerInput, type UpdateMediaInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdatePageInput, type UpdatePostInput, type UpdateProductAttributeInput, type UpdateProductCategoryInput, type UpdateProductInput, type UpdateProductReviewInput, type UpdateProductTagInput, type UpdateShippingClassInput, type UpdateShippingZoneInput, type UpdateShippingZoneMethodInput, type UpdateTagInput, type UpdateTaxRateInput, type UpdateWebhookInput, type UploadMediaInput, WCAddress, type WCAttributeTerm, type WCContinent, type WCCountry, type WCCoupon, WCCreateOrderInput, type WCCreateOrderNoteInput, type WCCreateOrderRefundInput, type WCCurrency, WCCustomer, type WCProductAttribute as WCGlobalProductAttribute, WCImage, WCOrder, type WCOrderNote, type WCOrderRefund, type WCPaymentGateway, type WCPaymentGatewaySetting, WCProduct, type WCProductCategory, WCProductFilterParams, type WCProductReview, type WCProductReviewFilterParams, type WCProductStatus, type WCProductTag, WCProductVariation, type WCProductVariationWithOmnibus, type WCProductWithOmnibus, type WCRefundLineItem, type WCReviewStatus, type WCSalesReport, type WCSalesReportParams, type WCSettingGroup, type WCSettingOption, type WCShippingClass, type WCShippingMethod, type WCShippingZone, type WCShippingZoneLocation, type WCShippingZoneMethod, type WCStatusCount, type WCSystemStatus, type WCSystemStatusTool, type WCTaxClass, type WCTaxRate, type WCTopSeller, type WCTopSellersParams, type WCWebhook, type WCWebhookStatus, type WCWebhookTopic, WPEntity, WPGraphQLConfig, type WPGraphQLFetcher, WPULikeCheckParams, WPULikeCheckResponse, WPULikeStats, WPULikeStatsParams, WPULikeVoteParams, WPULikeVoteResponse, WooCommerceConfig, type WooCommerceFetcher, WooCommerceResponse, authenticateJwt, buildACFFragment, buildPageWithACFQuery, buildPostWithACFQuery, buildPostsWithACFQuery, createApplicationPasswordToken, createAuthorsMutations, createCF7Queries, createCPTQueries, createCategoriesMutations, createCommentsMutations, createFaustAuthHandler, createMediaMutations, createMenusMutations, createPagesMutations, createPostsMutations, createPreviewHandler, createRevalidationHandler, createTagsMutations, createWPGraphQLCoreClient as createWPGraphQLClient, createWPGraphQLCoreClient, createWPGraphQLFetcher, createWPGraphQLMutationsClient, createWPGraphQLWooCommerceClient, createWPULikeClient, createWPULikeQueries, createWooCommerceClient, createWooCommerceFetcher, createWordPressClient, createWordPressMutationsClient, createYoastQueries, extractOmnibusData, resolveBaseUrl, validateJwtToken, withOmnibus, withOmnibusVariation };
package/dist/index.js CHANGED
@@ -37,6 +37,8 @@ var ErrorCode = {
37
37
  AUTH_JWT_FAILED: "AUTH_JWT_FAILED",
38
38
  AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID",
39
39
  AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID",
40
+ AUTH_PASSWORD_RESET_REQUESTED: "AUTH_PASSWORD_RESET_REQUESTED",
41
+ AUTH_PASSWORD_RESET_FAILED: "AUTH_PASSWORD_RESET_FAILED",
40
42
  // Contact Form 7
41
43
  CF7_MAIL_SENT: "CF7_MAIL_SENT",
42
44
  CF7_MAIL_FAILED: "CF7_MAIL_FAILED",
@@ -68,6 +70,8 @@ var defaultMessages = {
68
70
  AUTH_JWT_FAILED: "JWT authentication failed",
69
71
  AUTH_CREDENTIALS_INVALID: "Invalid credentials",
70
72
  AUTH_TOKEN_INVALID: "JWT token is invalid or expired",
73
+ AUTH_PASSWORD_RESET_REQUESTED: "Password reset email sent. Check your inbox.",
74
+ AUTH_PASSWORD_RESET_FAILED: "Password reset failed. The link may be invalid or expired.",
71
75
  CF7_MAIL_SENT: "Thank you for your message.",
72
76
  CF7_MAIL_FAILED: "There was an error trying to send your message.",
73
77
  CF7_VALIDATION_FAILED: "One or more fields have an error. Please check and try again.",
@@ -98,6 +102,8 @@ var defaultMessagesPl = {
98
102
  AUTH_JWT_FAILED: "B\u0142\u0105d uwierzytelnienia JWT",
99
103
  AUTH_CREDENTIALS_INVALID: "Nieprawid\u0142owe dane logowania",
100
104
  AUTH_TOKEN_INVALID: "Token JWT jest nieprawid\u0142owy lub wygas\u0142",
105
+ AUTH_PASSWORD_RESET_REQUESTED: "E-mail z resetowaniem has\u0142a zosta\u0142 wys\u0142any. Sprawd\u017A skrzynk\u0119.",
106
+ AUTH_PASSWORD_RESET_FAILED: "Resetowanie has\u0142a nie powiod\u0142o si\u0119. Link mo\u017Ce by\u0107 nieprawid\u0142owy lub wygas\u0142.",
101
107
  CF7_MAIL_SENT: "Dzi\u0119kujemy za wiadomo\u015B\u0107.",
102
108
  CF7_MAIL_FAILED: "Wyst\u0105pi\u0142 b\u0142\u0105d podczas wysy\u0142ania wiadomo\u015Bci.",
103
109
  CF7_VALIDATION_FAILED: "Jedno lub wi\u0119cej p\xF3l zawiera b\u0142\u0105d. Sprawd\u017A i spr\xF3buj ponownie.",
@@ -2133,7 +2139,25 @@ function createWPULikeClient(config) {
2133
2139
  return createWPULikeQueries(fetcher);
2134
2140
  }
2135
2141
 
2142
+ // src/integrations/restApi/contactForm7/types.ts
2143
+ var CF7Error = class extends Error {
2144
+ constructor(code, status, endpoint, message) {
2145
+ super(message);
2146
+ __publicField(this, "code", code);
2147
+ __publicField(this, "status", status);
2148
+ __publicField(this, "endpoint", endpoint);
2149
+ this.name = "CF7Error";
2150
+ }
2151
+ };
2152
+
2136
2153
  // src/integrations/restApi/contactForm7/queries.ts
2154
+ var statusToCode = {
2155
+ mail_sent: ErrorCode.CF7_MAIL_SENT,
2156
+ mail_failed: ErrorCode.CF7_MAIL_FAILED,
2157
+ validation_failed: ErrorCode.CF7_VALIDATION_FAILED,
2158
+ spam: ErrorCode.CF7_SPAM,
2159
+ aborted: ErrorCode.CF7_ABORTED
2160
+ };
2137
2161
  function createCF7Queries(config) {
2138
2162
  async function submitForm(formId, data) {
2139
2163
  const url = buildUrl(config, `/wp-json/contact-form-7/v1/contact-forms/${formId}/feedback`);
@@ -2142,7 +2166,17 @@ function createCF7Queries(config) {
2142
2166
  body.append(key, value);
2143
2167
  }
2144
2168
  const res = await fetch(url, { method: "POST", body, cache: "no-store" });
2145
- return res.json();
2169
+ if (!res.ok) {
2170
+ throw new CF7Error(
2171
+ ErrorCode.CF7_MAIL_FAILED,
2172
+ res.status,
2173
+ url,
2174
+ resolveMessage(ErrorCode.CF7_MAIL_FAILED, config.errorMessages)
2175
+ );
2176
+ }
2177
+ const result = await res.json();
2178
+ const code = statusToCode[result.status];
2179
+ return { ...result, message: resolveMessage(code, config.errorMessages) };
2146
2180
  }
2147
2181
  return { submitForm };
2148
2182
  }
@@ -3358,6 +3392,41 @@ function createMediaMutations2(fetcher) {
3358
3392
  return { createMediaItem, updateMediaItem, deleteMediaItem };
3359
3393
  }
3360
3394
 
3395
+ // src/integrations/wpGraphQL/core/mutations/passwordReset/mutations.ts
3396
+ var GQL_SEND_PASSWORD_RESET_EMAIL = `
3397
+ mutation SendPasswordResetEmail($input: SendPasswordResetEmailInput!) {
3398
+ sendPasswordResetEmail(input: $input) {
3399
+ success
3400
+ user {
3401
+ email
3402
+ }
3403
+ }
3404
+ }
3405
+ `;
3406
+ var GQL_RESET_USER_PASSWORD = `
3407
+ mutation ResetUserPassword($input: ResetUserPasswordInput!) {
3408
+ resetUserPassword(input: $input) {
3409
+ user {
3410
+ id
3411
+ databaseId
3412
+ email
3413
+ }
3414
+ }
3415
+ }
3416
+ `;
3417
+ function createPasswordResetMutations(fetcher) {
3418
+ const { gqlMutate } = fetcher;
3419
+ async function sendPasswordResetEmail(input) {
3420
+ const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
3421
+ return data.sendPasswordResetEmail;
3422
+ }
3423
+ async function resetUserPassword(input) {
3424
+ const data = await gqlMutate(GQL_RESET_USER_PASSWORD, { input });
3425
+ return data.resetUserPassword;
3426
+ }
3427
+ return { sendPasswordResetEmail, resetUserPassword };
3428
+ }
3429
+
3361
3430
  // src/integrations/wpGraphQL/core/mutations/index.ts
3362
3431
  function createWPGraphQLMutationsClient(config) {
3363
3432
  const fetcher = createWPGraphQLFetcher(config);
@@ -3368,7 +3437,8 @@ function createWPGraphQLMutationsClient(config) {
3368
3437
  ...createCategoriesMutations3(fetcher),
3369
3438
  ...createTagsMutations3(fetcher),
3370
3439
  ...createAuthorsMutations2(fetcher),
3371
- ...createMediaMutations2(fetcher)
3440
+ ...createMediaMutations2(fetcher),
3441
+ ...createPasswordResetMutations(fetcher)
3372
3442
  };
3373
3443
  }
3374
3444
 
@@ -4327,6 +4397,6 @@ async function validateJwtToken(config, token) {
4327
4397
  return response.ok;
4328
4398
  }
4329
4399
 
4330
- 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 };
4400
+ 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 };
4331
4401
  //# sourceMappingURL=index.js.map
4332
4402
  //# sourceMappingURL=index.js.map