@billgangcom/theme-lib 1.27.0 → 1.28.0

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/App.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { IBlock, ISettings } from './abstractions';
1
+ import { IBlock } from './abstractions';
2
2
  import React from 'react';
3
3
  import './styles/main.scss';
4
4
  import '@billgangcom/frontend-lib/styles.css';
5
5
  interface AppProps {
6
6
  blocks: Record<string, any>;
7
- settings: ISettings;
7
+ settings: any;
8
8
  header: IBlock;
9
9
  footer: IBlock;
10
10
  }
@@ -4,8 +4,8 @@ export interface Product {
4
4
  id: number;
5
5
  uniquePath: string;
6
6
  name: string;
7
- shortDescription: string;
8
- description: string;
7
+ shortDescription?: string;
8
+ description?: string;
9
9
  images: Array<{
10
10
  id: number;
11
11
  cfId: string;
@@ -13,44 +13,44 @@ export interface Product {
13
13
  variants: Array<{
14
14
  id: number;
15
15
  name: string;
16
- description: string;
17
- shortDescription: string;
16
+ description?: string;
17
+ shortDescription?: string;
18
18
  price: {
19
19
  amount: number;
20
20
  currency: string;
21
21
  };
22
- compareAtPrice: {
22
+ compareAtPrice?: {
23
23
  amount: number;
24
24
  currency: string;
25
25
  };
26
26
  chargeTypes: Array<'ONE_TIME' | 'RECURRING'>;
27
- subscriptionSettings: {
27
+ subscriptionSettings?: {
28
28
  price: {
29
29
  amount: number;
30
30
  currency: string;
31
31
  };
32
- compareAtPrice: {
32
+ compareAtPrice?: {
33
33
  amount: number;
34
34
  currency: string;
35
35
  };
36
- recurringIntervalDays: number;
37
- entryFee: {
36
+ recurringIntervalDays?: number;
37
+ entryFee?: {
38
38
  amount: number;
39
39
  currency: string;
40
40
  };
41
41
  };
42
42
  quantity: {
43
- available: number;
44
- restrictions: {
43
+ available?: number;
44
+ restrictions?: {
45
45
  min: number;
46
46
  max: number;
47
47
  };
48
48
  };
49
- deliveryTime: number;
50
- terms: string;
49
+ deliveryTime?: number;
50
+ terms?: string;
51
51
  gateways: Array<{
52
52
  name: string;
53
- overrodePrice: {
53
+ overrodePrice?: {
54
54
  amount: number;
55
55
  currency: string;
56
56
  };
@@ -58,14 +58,14 @@ export interface Product {
58
58
  customFields: Array<{
59
59
  name: string;
60
60
  required: boolean;
61
- placeholder: string;
62
- defaultValue: string;
63
- regex: string;
61
+ placeholder?: string;
62
+ defaultValue?: string;
63
+ regex?: string;
64
64
  type: 'NUMBER' | 'TEXT' | 'SELECT';
65
65
  }>;
66
- warranty: {
66
+ warranty?: {
67
67
  text: string;
68
- durationMilliseconds: number;
68
+ durationMilliseconds?: number;
69
69
  };
70
70
  discordSettings: {
71
71
  isEnabled: boolean;
@@ -83,7 +83,7 @@ export interface Product {
83
83
  rating: number;
84
84
  createdAtIso: string;
85
85
  purchasedIso: string;
86
- storeReply: string;
86
+ storeReply?: string;
87
87
  }>;
88
88
  }
89
89
  export interface Faq {
@@ -0,0 +1,12 @@
1
+ interface Error {
2
+ message: string;
3
+ failedPagesIds: string[];
4
+ failedTheme: boolean;
5
+ failedSettings: boolean;
6
+ }
7
+ interface Options {
8
+ error: Error | null;
9
+ setError: (error: Error | null) => void;
10
+ }
11
+ export declare const useErrorStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
12
+ export {};
@@ -14,6 +14,10 @@ export declare const updateSettings: (method: Method, endpoint: string, data?: R
14
14
  data: any;
15
15
  status: number;
16
16
  }>;
17
+ export declare const resetSettings: () => Promise<{
18
+ data: any;
19
+ status: number;
20
+ }>;
17
21
  export declare const deletePage: (route: string) => Promise<{
18
22
  data: any;
19
23
  status: number;