@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.
@@ -22,6 +22,8 @@ declare const ErrorCode: {
22
22
  readonly AUTH_JWT_FAILED: "AUTH_JWT_FAILED";
23
23
  readonly AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID";
24
24
  readonly AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID";
25
+ readonly AUTH_PASSWORD_RESET_REQUESTED: "AUTH_PASSWORD_RESET_REQUESTED";
26
+ readonly AUTH_PASSWORD_RESET_FAILED: "AUTH_PASSWORD_RESET_FAILED";
25
27
  readonly CF7_MAIL_SENT: "CF7_MAIL_SENT";
26
28
  readonly CF7_MAIL_FAILED: "CF7_MAIL_FAILED";
27
29
  readonly CF7_VALIDATION_FAILED: "CF7_VALIDATION_FAILED";
@@ -89,6 +91,55 @@ declare class AuthenticationError extends Error {
89
91
  constructor(code: ErrorCode, status: number, message: string, detail?: string);
90
92
  }
91
93
 
94
+ type WPGraphQLConfig = NextWordpressConfig;
95
+ interface GQLPageInfo {
96
+ hasNextPage: boolean;
97
+ hasPreviousPage: boolean;
98
+ startCursor?: string;
99
+ endCursor?: string;
100
+ }
101
+ interface GQLConnection<T> {
102
+ nodes: T[];
103
+ pageInfo: GQLPageInfo;
104
+ }
105
+ interface GQLError {
106
+ message: string;
107
+ locations?: Array<{
108
+ line: number;
109
+ column: number;
110
+ }>;
111
+ path?: string[];
112
+ }
113
+ declare class WPGraphQLError extends Error {
114
+ readonly code: ErrorCode;
115
+ readonly status: number;
116
+ readonly endpoint: string;
117
+ readonly gqlErrors?: GQLError[] | undefined;
118
+ constructor(code: ErrorCode, status: number, endpoint: string, message: string, gqlErrors?: GQLError[] | undefined);
119
+ }
120
+
121
+ interface GQLSendPasswordResetEmailInput {
122
+ username: string;
123
+ }
124
+ interface GQLSendPasswordResetEmailResult {
125
+ success?: boolean;
126
+ user?: {
127
+ email: string;
128
+ } | null;
129
+ }
130
+ interface GQLResetUserPasswordInput {
131
+ key: string;
132
+ login: string;
133
+ password: string;
134
+ }
135
+ interface GQLResetUserPasswordResult {
136
+ user: {
137
+ id: string;
138
+ databaseId: number;
139
+ email: string;
140
+ } | null;
141
+ }
142
+
92
143
  interface CookieConsentCategories {
93
144
  necessary: true;
94
145
  analytics: boolean;
@@ -586,33 +637,6 @@ interface UpdateCustomerInput {
586
637
  }[];
587
638
  }
588
639
 
589
- type WPGraphQLConfig = NextWordpressConfig;
590
- interface GQLPageInfo {
591
- hasNextPage: boolean;
592
- hasPreviousPage: boolean;
593
- startCursor?: string;
594
- endCursor?: string;
595
- }
596
- interface GQLConnection<T> {
597
- nodes: T[];
598
- pageInfo: GQLPageInfo;
599
- }
600
- interface GQLError {
601
- message: string;
602
- locations?: Array<{
603
- line: number;
604
- column: number;
605
- }>;
606
- path?: string[];
607
- }
608
- declare class WPGraphQLError extends Error {
609
- readonly code: ErrorCode;
610
- readonly status: number;
611
- readonly endpoint: string;
612
- readonly gqlErrors?: GQLError[] | undefined;
613
- constructor(code: ErrorCode, status: number, endpoint: string, message: string, gqlErrors?: GQLError[] | undefined);
614
- }
615
-
616
640
  interface GQLPostFilter {
617
641
  authorName?: string;
618
642
  categoryName?: string;
@@ -710,5 +734,11 @@ interface CF7SubmissionResponse {
710
734
  message: string;
711
735
  invalid_fields?: CF7ValidationError[];
712
736
  }
737
+ declare class CF7Error extends Error {
738
+ readonly code: ErrorCode;
739
+ readonly status: number;
740
+ readonly endpoint: string;
741
+ constructor(code: ErrorCode, status: number, endpoint: string, message: string);
742
+ }
713
743
 
714
- export { type WCProductAttribute as $, type Author as A, type BlockType as B, type CookieConsentCategories as C, type CF7ValidationError as D, type CookieConsentConfig as E, type FeaturedMedia as F, type GQLPost as G, type EditorBlock as H, type EmbeddedAuthor as I, type JwtAuthCredentials as J, type EmbeddedTerm as K, ErrorCode as L, type GQLError as M, type NextWordpressConfig as N, type GQLPageInfo as O, type Post as P, type MediaDetails as Q, type RenderedTitle as R, type MediaSize as S, type Taxonomy as T, type UpdateCustomerInput as U, type PostEmbedded as V, type WordPressResponse as W, type SearchResult as X, type TemplatePart as Y, type WCDimensions as Z, type WCOrderLineItem as _, type WooCommerceConfig as a, type WCProductDefaultAttribute as a0, type WCShippingLine as a1, WPGraphQLError as a2, type WPULikeItemType as a3, WooCommerceError as a4, type WooCommercePaginationHeaders as a5, WordPressAPIError as a6, createCookieConsentHandler as a7, defaultMessages as a8, defaultMessagesPl as a9, parseCookieConsent as aa, resolveMessage as ab, type WCProduct as b, type WCProductFilterParams as c, type WooCommerceResponse as d, type WCCreateOrderInput as e, type WCOrder as f, type WCCustomer as g, type WPGraphQLConfig as h, type GQLPostFilter as i, type GQLConnection as j, type WPULikeStatsParams as k, type WPULikeStats as l, type WPULikeStatus as m, type WPULikeVoteResponse as n, type WPULikeCheckParams as o, type WPULikeCheckResponse as p, type CF7SubmissionResponse as q, type JwtAuthResponse as r, type WPEntity as s, type RenderedContent as t, type WCImage as u, type WCProductVariation as v, type WCAddress as w, type WPULikeVoteParams as x, AuthenticationError as y, type CF7SubmissionStatus as z };
744
+ export { type PostEmbedded as $, type Author as A, type GQLSendPasswordResetEmailInput as B, type CookieConsentCategories as C, type GQLResetUserPasswordInput as D, AuthenticationError as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type BlockType as H, CF7Error as I, type JwtAuthCredentials as J, type CF7SubmissionStatus as K, type CF7ValidationError as L, type CookieConsentConfig as M, type NextWordpressConfig as N, type EditorBlock as O, type Post as P, type EmbeddedAuthor as Q, type RenderedTitle as R, type EmbeddedTerm as S, type Taxonomy as T, type UpdateCustomerInput as U, ErrorCode as V, type WPGraphQLConfig as W, type GQLError as X, type GQLPageInfo as Y, type MediaDetails as Z, type MediaSize as _, type GQLResetUserPasswordResult as a, type SearchResult as a0, type TemplatePart as a1, type WCDimensions as a2, type WCOrderLineItem as a3, type WCProductAttribute as a4, type WCProductDefaultAttribute as a5, type WCShippingLine as a6, WPGraphQLError as a7, type WPULikeItemType as a8, WooCommerceError as a9, type WooCommercePaginationHeaders as aa, WordPressAPIError as ab, createCookieConsentHandler as ac, defaultMessages as ad, defaultMessagesPl as ae, parseCookieConsent as af, resolveMessage as ag, type WordPressResponse as b, type WooCommerceConfig as c, type WCProduct as d, type WCProductFilterParams as e, type WooCommerceResponse as f, type WCCreateOrderInput as g, type WCOrder as h, type WCCustomer as i, type GQLPost as j, type GQLPostFilter as k, type GQLConnection as l, type WPULikeStatsParams as m, type WPULikeStats as n, type WPULikeStatus as o, type WPULikeVoteResponse as p, type WPULikeCheckParams as q, type WPULikeCheckResponse as r, type CF7SubmissionResponse as s, type JwtAuthResponse as t, type WPEntity as u, type RenderedContent as v, type WCImage as w, type WCProductVariation as x, type WCAddress as y, type WPULikeVoteParams as z };
@@ -22,6 +22,8 @@ declare const ErrorCode: {
22
22
  readonly AUTH_JWT_FAILED: "AUTH_JWT_FAILED";
23
23
  readonly AUTH_CREDENTIALS_INVALID: "AUTH_CREDENTIALS_INVALID";
24
24
  readonly AUTH_TOKEN_INVALID: "AUTH_TOKEN_INVALID";
25
+ readonly AUTH_PASSWORD_RESET_REQUESTED: "AUTH_PASSWORD_RESET_REQUESTED";
26
+ readonly AUTH_PASSWORD_RESET_FAILED: "AUTH_PASSWORD_RESET_FAILED";
25
27
  readonly CF7_MAIL_SENT: "CF7_MAIL_SENT";
26
28
  readonly CF7_MAIL_FAILED: "CF7_MAIL_FAILED";
27
29
  readonly CF7_VALIDATION_FAILED: "CF7_VALIDATION_FAILED";
@@ -89,6 +91,55 @@ declare class AuthenticationError extends Error {
89
91
  constructor(code: ErrorCode, status: number, message: string, detail?: string);
90
92
  }
91
93
 
94
+ type WPGraphQLConfig = NextWordpressConfig;
95
+ interface GQLPageInfo {
96
+ hasNextPage: boolean;
97
+ hasPreviousPage: boolean;
98
+ startCursor?: string;
99
+ endCursor?: string;
100
+ }
101
+ interface GQLConnection<T> {
102
+ nodes: T[];
103
+ pageInfo: GQLPageInfo;
104
+ }
105
+ interface GQLError {
106
+ message: string;
107
+ locations?: Array<{
108
+ line: number;
109
+ column: number;
110
+ }>;
111
+ path?: string[];
112
+ }
113
+ declare class WPGraphQLError extends Error {
114
+ readonly code: ErrorCode;
115
+ readonly status: number;
116
+ readonly endpoint: string;
117
+ readonly gqlErrors?: GQLError[] | undefined;
118
+ constructor(code: ErrorCode, status: number, endpoint: string, message: string, gqlErrors?: GQLError[] | undefined);
119
+ }
120
+
121
+ interface GQLSendPasswordResetEmailInput {
122
+ username: string;
123
+ }
124
+ interface GQLSendPasswordResetEmailResult {
125
+ success?: boolean;
126
+ user?: {
127
+ email: string;
128
+ } | null;
129
+ }
130
+ interface GQLResetUserPasswordInput {
131
+ key: string;
132
+ login: string;
133
+ password: string;
134
+ }
135
+ interface GQLResetUserPasswordResult {
136
+ user: {
137
+ id: string;
138
+ databaseId: number;
139
+ email: string;
140
+ } | null;
141
+ }
142
+
92
143
  interface CookieConsentCategories {
93
144
  necessary: true;
94
145
  analytics: boolean;
@@ -586,33 +637,6 @@ interface UpdateCustomerInput {
586
637
  }[];
587
638
  }
588
639
 
589
- type WPGraphQLConfig = NextWordpressConfig;
590
- interface GQLPageInfo {
591
- hasNextPage: boolean;
592
- hasPreviousPage: boolean;
593
- startCursor?: string;
594
- endCursor?: string;
595
- }
596
- interface GQLConnection<T> {
597
- nodes: T[];
598
- pageInfo: GQLPageInfo;
599
- }
600
- interface GQLError {
601
- message: string;
602
- locations?: Array<{
603
- line: number;
604
- column: number;
605
- }>;
606
- path?: string[];
607
- }
608
- declare class WPGraphQLError extends Error {
609
- readonly code: ErrorCode;
610
- readonly status: number;
611
- readonly endpoint: string;
612
- readonly gqlErrors?: GQLError[] | undefined;
613
- constructor(code: ErrorCode, status: number, endpoint: string, message: string, gqlErrors?: GQLError[] | undefined);
614
- }
615
-
616
640
  interface GQLPostFilter {
617
641
  authorName?: string;
618
642
  categoryName?: string;
@@ -710,5 +734,11 @@ interface CF7SubmissionResponse {
710
734
  message: string;
711
735
  invalid_fields?: CF7ValidationError[];
712
736
  }
737
+ declare class CF7Error extends Error {
738
+ readonly code: ErrorCode;
739
+ readonly status: number;
740
+ readonly endpoint: string;
741
+ constructor(code: ErrorCode, status: number, endpoint: string, message: string);
742
+ }
713
743
 
714
- export { type WCProductAttribute as $, type Author as A, type BlockType as B, type CookieConsentCategories as C, type CF7ValidationError as D, type CookieConsentConfig as E, type FeaturedMedia as F, type GQLPost as G, type EditorBlock as H, type EmbeddedAuthor as I, type JwtAuthCredentials as J, type EmbeddedTerm as K, ErrorCode as L, type GQLError as M, type NextWordpressConfig as N, type GQLPageInfo as O, type Post as P, type MediaDetails as Q, type RenderedTitle as R, type MediaSize as S, type Taxonomy as T, type UpdateCustomerInput as U, type PostEmbedded as V, type WordPressResponse as W, type SearchResult as X, type TemplatePart as Y, type WCDimensions as Z, type WCOrderLineItem as _, type WooCommerceConfig as a, type WCProductDefaultAttribute as a0, type WCShippingLine as a1, WPGraphQLError as a2, type WPULikeItemType as a3, WooCommerceError as a4, type WooCommercePaginationHeaders as a5, WordPressAPIError as a6, createCookieConsentHandler as a7, defaultMessages as a8, defaultMessagesPl as a9, parseCookieConsent as aa, resolveMessage as ab, type WCProduct as b, type WCProductFilterParams as c, type WooCommerceResponse as d, type WCCreateOrderInput as e, type WCOrder as f, type WCCustomer as g, type WPGraphQLConfig as h, type GQLPostFilter as i, type GQLConnection as j, type WPULikeStatsParams as k, type WPULikeStats as l, type WPULikeStatus as m, type WPULikeVoteResponse as n, type WPULikeCheckParams as o, type WPULikeCheckResponse as p, type CF7SubmissionResponse as q, type JwtAuthResponse as r, type WPEntity as s, type RenderedContent as t, type WCImage as u, type WCProductVariation as v, type WCAddress as w, type WPULikeVoteParams as x, AuthenticationError as y, type CF7SubmissionStatus as z };
744
+ export { type PostEmbedded as $, type Author as A, type GQLSendPasswordResetEmailInput as B, type CookieConsentCategories as C, type GQLResetUserPasswordInput as D, AuthenticationError as E, type FeaturedMedia as F, type GQLSendPasswordResetEmailResult as G, type BlockType as H, CF7Error as I, type JwtAuthCredentials as J, type CF7SubmissionStatus as K, type CF7ValidationError as L, type CookieConsentConfig as M, type NextWordpressConfig as N, type EditorBlock as O, type Post as P, type EmbeddedAuthor as Q, type RenderedTitle as R, type EmbeddedTerm as S, type Taxonomy as T, type UpdateCustomerInput as U, ErrorCode as V, type WPGraphQLConfig as W, type GQLError as X, type GQLPageInfo as Y, type MediaDetails as Z, type MediaSize as _, type GQLResetUserPasswordResult as a, type SearchResult as a0, type TemplatePart as a1, type WCDimensions as a2, type WCOrderLineItem as a3, type WCProductAttribute as a4, type WCProductDefaultAttribute as a5, type WCShippingLine as a6, WPGraphQLError as a7, type WPULikeItemType as a8, WooCommerceError as a9, type WooCommercePaginationHeaders as aa, WordPressAPIError as ab, createCookieConsentHandler as ac, defaultMessages as ad, defaultMessagesPl as ae, parseCookieConsent as af, resolveMessage as ag, type WordPressResponse as b, type WooCommerceConfig as c, type WCProduct as d, type WCProductFilterParams as e, type WooCommerceResponse as f, type WCCreateOrderInput as g, type WCOrder as h, type WCCustomer as i, type GQLPost as j, type GQLPostFilter as k, type GQLConnection as l, type WPULikeStatsParams as m, type WPULikeStats as n, type WPULikeStatus as o, type WPULikeVoteResponse as p, type WPULikeCheckParams as q, type WPULikeCheckResponse as r, type CF7SubmissionResponse as s, type JwtAuthResponse as t, type WPEntity as u, type RenderedContent as v, type WCImage as w, type WCProductVariation as x, type WCAddress as y, type WPULikeVoteParams as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@szymonpiatek/nextwordpress",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Szymon Piątek - Next.js WordPress client (types, queries, fetcher)",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,