@szymonpiatek/nextwordpress 0.0.12 → 0.0.14

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,11 @@ 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 CF7_MAIL_SENT: "CF7_MAIL_SENT";
26
+ readonly CF7_MAIL_FAILED: "CF7_MAIL_FAILED";
27
+ readonly CF7_VALIDATION_FAILED: "CF7_VALIDATION_FAILED";
28
+ readonly CF7_SPAM: "CF7_SPAM";
29
+ readonly CF7_ABORTED: "CF7_ABORTED";
25
30
  };
26
31
  type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
27
32
  declare const defaultMessages: Record<ErrorCode, string>;
@@ -84,6 +89,18 @@ declare class AuthenticationError extends Error {
84
89
  constructor(code: ErrorCode, status: number, message: string, detail?: string);
85
90
  }
86
91
 
92
+ interface CookieConsentCategories {
93
+ necessary: true;
94
+ analytics: boolean;
95
+ marketing: boolean;
96
+ }
97
+ interface CookieConsentConfig {
98
+ cookieName?: string;
99
+ maxAge?: number;
100
+ }
101
+ declare function createCookieConsentHandler(config?: CookieConsentConfig): (request: Request) => Promise<Response>;
102
+ declare function parseCookieConsent(request: Request, cookieName?: string): CookieConsentCategories | null;
103
+
87
104
  interface MediaSize {
88
105
  file: string;
89
106
  width: number;
@@ -682,4 +699,16 @@ interface WPULikeCheckResponse {
682
699
  status: WPULikeStatus | null;
683
700
  }
684
701
 
685
- export { WooCommerceError as $, type Author as A, type BlockType as B, ErrorCode as C, type GQLError as D, type EditorBlock as E, type FeaturedMedia as F, type GQLPost as G, type GQLPageInfo as H, type MediaSize as I, type JwtAuthCredentials as J, type PostEmbedded as K, type TemplatePart as L, type MediaDetails as M, type NextWordpressConfig as N, type WCDimensions as O, type Post as P, type WCOrderLineItem as Q, type RenderedTitle as R, type SearchResult as S, type Taxonomy as T, type UpdateCustomerInput as U, type WCProductAttribute as V, type WordPressResponse as W, type WCProductDefaultAttribute as X, type WCShippingLine as Y, WPGraphQLError as Z, type WPULikeItemType as _, type WooCommerceConfig as a, type WooCommercePaginationHeaders as a0, WordPressAPIError as a1, defaultMessages as a2, defaultMessagesPl as a3, resolveMessage as a4, 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 JwtAuthResponse as q, type WPEntity as r, type RenderedContent as s, type WCImage as t, type WCProductVariation as u, type WCAddress as v, type WPULikeVoteParams as w, AuthenticationError as x, type EmbeddedAuthor as y, type EmbeddedTerm as z };
702
+ type CF7SubmissionStatus = 'mail_sent' | 'mail_failed' | 'validation_failed' | 'spam' | 'aborted';
703
+ interface CF7ValidationError {
704
+ field: string;
705
+ message: string;
706
+ idref: string | null;
707
+ }
708
+ interface CF7SubmissionResponse {
709
+ status: CF7SubmissionStatus;
710
+ message: string;
711
+ invalid_fields?: CF7ValidationError[];
712
+ }
713
+
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 };
@@ -22,6 +22,11 @@ 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 CF7_MAIL_SENT: "CF7_MAIL_SENT";
26
+ readonly CF7_MAIL_FAILED: "CF7_MAIL_FAILED";
27
+ readonly CF7_VALIDATION_FAILED: "CF7_VALIDATION_FAILED";
28
+ readonly CF7_SPAM: "CF7_SPAM";
29
+ readonly CF7_ABORTED: "CF7_ABORTED";
25
30
  };
26
31
  type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
27
32
  declare const defaultMessages: Record<ErrorCode, string>;
@@ -84,6 +89,18 @@ declare class AuthenticationError extends Error {
84
89
  constructor(code: ErrorCode, status: number, message: string, detail?: string);
85
90
  }
86
91
 
92
+ interface CookieConsentCategories {
93
+ necessary: true;
94
+ analytics: boolean;
95
+ marketing: boolean;
96
+ }
97
+ interface CookieConsentConfig {
98
+ cookieName?: string;
99
+ maxAge?: number;
100
+ }
101
+ declare function createCookieConsentHandler(config?: CookieConsentConfig): (request: Request) => Promise<Response>;
102
+ declare function parseCookieConsent(request: Request, cookieName?: string): CookieConsentCategories | null;
103
+
87
104
  interface MediaSize {
88
105
  file: string;
89
106
  width: number;
@@ -682,4 +699,16 @@ interface WPULikeCheckResponse {
682
699
  status: WPULikeStatus | null;
683
700
  }
684
701
 
685
- export { WooCommerceError as $, type Author as A, type BlockType as B, ErrorCode as C, type GQLError as D, type EditorBlock as E, type FeaturedMedia as F, type GQLPost as G, type GQLPageInfo as H, type MediaSize as I, type JwtAuthCredentials as J, type PostEmbedded as K, type TemplatePart as L, type MediaDetails as M, type NextWordpressConfig as N, type WCDimensions as O, type Post as P, type WCOrderLineItem as Q, type RenderedTitle as R, type SearchResult as S, type Taxonomy as T, type UpdateCustomerInput as U, type WCProductAttribute as V, type WordPressResponse as W, type WCProductDefaultAttribute as X, type WCShippingLine as Y, WPGraphQLError as Z, type WPULikeItemType as _, type WooCommerceConfig as a, type WooCommercePaginationHeaders as a0, WordPressAPIError as a1, defaultMessages as a2, defaultMessagesPl as a3, resolveMessage as a4, 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 JwtAuthResponse as q, type WPEntity as r, type RenderedContent as s, type WCImage as t, type WCProductVariation as u, type WCAddress as v, type WPULikeVoteParams as w, AuthenticationError as x, type EmbeddedAuthor as y, type EmbeddedTerm as z };
702
+ type CF7SubmissionStatus = 'mail_sent' | 'mail_failed' | 'validation_failed' | 'spam' | 'aborted';
703
+ interface CF7ValidationError {
704
+ field: string;
705
+ message: string;
706
+ idref: string | null;
707
+ }
708
+ interface CF7SubmissionResponse {
709
+ status: CF7SubmissionStatus;
710
+ message: string;
711
+ invalid_fields?: CF7ValidationError[];
712
+ }
713
+
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@szymonpiatek/nextwordpress",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Szymon Piątek - Next.js WordPress client (types, queries, fetcher)",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,