@szymonpiatek/nextwordpress 0.0.15 → 0.0.17
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 +182 -118
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +180 -118
- package/dist/client/index.js.map +1 -1
- package/dist/hooks/index.cjs +182 -118
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +15 -3
- package/dist/hooks/index.d.ts +15 -3
- package/dist/hooks/index.js +180 -118
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +44 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +44 -1
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +44 -1
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +44 -1
- package/dist/server/index.js.map +1 -1
- package/dist/{types-D6rih4G8.d.cts → types-DVzJO3P-.d.cts} +49 -28
- package/dist/{types-D6rih4G8.d.ts → types-DVzJO3P-.d.ts} +49 -28
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NextWordpressConfig, J as JwtAuthCredentials,
|
|
2
|
-
export {
|
|
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-DVzJO3P-.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-DVzJO3P-.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,
|
|
2
|
-
export {
|
|
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-DVzJO3P-.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-DVzJO3P-.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.",
|
|
@@ -3386,6 +3392,42 @@ function createMediaMutations2(fetcher) {
|
|
|
3386
3392
|
return { createMediaItem, updateMediaItem, deleteMediaItem };
|
|
3387
3393
|
}
|
|
3388
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
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
`;
|
|
3403
|
+
var GQL_RESET_USER_PASSWORD = `
|
|
3404
|
+
mutation ResetUserPassword($input: ResetUserPasswordInput!) {
|
|
3405
|
+
resetUserPassword(input: $input) {
|
|
3406
|
+
user {
|
|
3407
|
+
id
|
|
3408
|
+
databaseId
|
|
3409
|
+
email
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
`;
|
|
3414
|
+
function createPasswordResetMutations(fetcher) {
|
|
3415
|
+
const { gqlMutate } = fetcher;
|
|
3416
|
+
async function sendPasswordResetEmail(input) {
|
|
3417
|
+
const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
|
|
3418
|
+
const result = data.sendPasswordResetEmail;
|
|
3419
|
+
if (!result.success) {
|
|
3420
|
+
throw new WPGraphQLError(ErrorCode.GQL_ERRORS_IN_RESPONSE, 200, "sendPasswordResetEmail", "User not found");
|
|
3421
|
+
}
|
|
3422
|
+
return result;
|
|
3423
|
+
}
|
|
3424
|
+
async function resetUserPassword(input) {
|
|
3425
|
+
const data = await gqlMutate(GQL_RESET_USER_PASSWORD, { input });
|
|
3426
|
+
return data.resetUserPassword;
|
|
3427
|
+
}
|
|
3428
|
+
return { sendPasswordResetEmail, resetUserPassword };
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3389
3431
|
// src/integrations/wpGraphQL/core/mutations/index.ts
|
|
3390
3432
|
function createWPGraphQLMutationsClient(config) {
|
|
3391
3433
|
const fetcher = createWPGraphQLFetcher(config);
|
|
@@ -3396,7 +3438,8 @@ function createWPGraphQLMutationsClient(config) {
|
|
|
3396
3438
|
...createCategoriesMutations3(fetcher),
|
|
3397
3439
|
...createTagsMutations3(fetcher),
|
|
3398
3440
|
...createAuthorsMutations2(fetcher),
|
|
3399
|
-
...createMediaMutations2(fetcher)
|
|
3441
|
+
...createMediaMutations2(fetcher),
|
|
3442
|
+
...createPasswordResetMutations(fetcher)
|
|
3400
3443
|
};
|
|
3401
3444
|
}
|
|
3402
3445
|
|