use-frontbacked 5.1.5 → 5.1.7

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.
Files changed (101) hide show
  1. package/dist/cjs/index.js +416 -210
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/DownloadType/index.d.ts +12 -12
  4. package/dist/cjs/types/components/Firebase/AccessTokenDoor.d.ts +12 -12
  5. package/dist/cjs/types/components/Firebase/AuthView.d.ts +15 -15
  6. package/dist/cjs/types/components/Firebase/SignInView.d.ts +11 -11
  7. package/dist/cjs/types/components/Firebase/SignUpView.d.ts +10 -10
  8. package/dist/cjs/types/components/Firebase/data.type.d.ts +23 -23
  9. package/dist/cjs/types/components/Firebase/index.d.ts +14 -14
  10. package/dist/cjs/types/components/FrontbackedProvider/index.d.ts +55 -55
  11. package/dist/cjs/types/components/hooks/useReferralId.d.ts +5 -5
  12. package/dist/cjs/types/components/hooks/useSdkConfig.d.ts +10 -10
  13. package/dist/cjs/types/components/hooks/useTools/index.d.ts +14 -14
  14. package/dist/cjs/types/components/hooks/useTools/types.d.ts +62 -62
  15. package/dist/cjs/types/components/hooks/useTools/utils.d.ts +23 -23
  16. package/dist/cjs/types/components/index.d.ts +2 -2
  17. package/dist/cjs/types/components/types.d.ts +214 -214
  18. package/dist/cjs/types/components/widgets/AppButton.d.ts +17 -17
  19. package/dist/cjs/types/components/widgets/CopyView.d.ts +24 -24
  20. package/dist/cjs/types/components/widgets/DrawerPop/index.d.ts +25 -25
  21. package/dist/cjs/types/components/widgets/InfoLabel.d.ts +11 -11
  22. package/dist/cjs/types/components/widgets/InputBox/index.d.ts +94 -94
  23. package/dist/cjs/types/components/widgets/InputBox/utils.d.ts +1 -1
  24. package/dist/cjs/types/components/widgets/Link.d.ts +9 -9
  25. package/dist/cjs/types/components/widgets/Loading.d.ts +27 -27
  26. package/dist/cjs/types/components/widgets/ModalPop/index.d.ts +26 -26
  27. package/dist/cjs/types/components/widgets/PleaseWaitForX.d.ts +3 -3
  28. package/dist/cjs/types/index.d.ts +1 -1
  29. package/dist/cjs/types/theme.d.ts +3 -3
  30. package/dist/cjs/types/theme.type.d.ts +19 -19
  31. package/dist/cjs/types/utils/CustomError.d.ts +5 -5
  32. package/dist/cjs/types/utils/base64Images.d.ts +4 -4
  33. package/dist/cjs/types/utils/c.d.ts +33 -33
  34. package/dist/cjs/types/utils/f.d.ts +23 -23
  35. package/dist/components/DownloadType/index.d.ts +12 -12
  36. package/dist/components/Firebase/AccessTokenDoor.d.ts +12 -12
  37. package/dist/components/Firebase/AuthView.d.ts +15 -15
  38. package/dist/components/Firebase/SignInView.d.ts +11 -11
  39. package/dist/components/Firebase/SignUpView.d.ts +10 -10
  40. package/dist/components/Firebase/data.type.d.ts +23 -23
  41. package/dist/components/Firebase/index.d.ts +14 -14
  42. package/dist/components/FrontbackedProvider/index.d.ts +55 -55
  43. package/dist/components/hooks/useReferralId.d.ts +5 -5
  44. package/dist/components/hooks/useSdkConfig.d.ts +10 -10
  45. package/dist/components/hooks/useTools/index.d.ts +14 -14
  46. package/dist/components/hooks/useTools/types.d.ts +62 -62
  47. package/dist/components/hooks/useTools/utils.d.ts +23 -23
  48. package/dist/components/index.d.ts +2 -2
  49. package/dist/components/types.d.ts +214 -214
  50. package/dist/components/widgets/AppButton.d.ts +17 -17
  51. package/dist/components/widgets/CopyView.d.ts +24 -24
  52. package/dist/components/widgets/DrawerPop/index.d.ts +25 -25
  53. package/dist/components/widgets/InfoLabel.d.ts +11 -11
  54. package/dist/components/widgets/InputBox/index.d.ts +94 -94
  55. package/dist/components/widgets/InputBox/utils.d.ts +1 -1
  56. package/dist/components/widgets/Link.d.ts +9 -9
  57. package/dist/components/widgets/Loading.d.ts +27 -27
  58. package/dist/components/widgets/ModalPop/index.d.ts +26 -26
  59. package/dist/components/widgets/PleaseWaitForX.d.ts +3 -3
  60. package/dist/esm/index.es.js +416 -210
  61. package/dist/esm/index.es.js.map +1 -1
  62. package/dist/esm/types/components/DownloadType/index.d.ts +12 -12
  63. package/dist/esm/types/components/Firebase/AccessTokenDoor.d.ts +12 -12
  64. package/dist/esm/types/components/Firebase/AuthView.d.ts +15 -15
  65. package/dist/esm/types/components/Firebase/SignInView.d.ts +11 -11
  66. package/dist/esm/types/components/Firebase/SignUpView.d.ts +10 -10
  67. package/dist/esm/types/components/Firebase/data.type.d.ts +23 -23
  68. package/dist/esm/types/components/Firebase/index.d.ts +14 -14
  69. package/dist/esm/types/components/FrontbackedProvider/index.d.ts +55 -55
  70. package/dist/esm/types/components/hooks/useReferralId.d.ts +5 -5
  71. package/dist/esm/types/components/hooks/useSdkConfig.d.ts +10 -10
  72. package/dist/esm/types/components/hooks/useTools/index.d.ts +14 -14
  73. package/dist/esm/types/components/hooks/useTools/types.d.ts +62 -62
  74. package/dist/esm/types/components/hooks/useTools/utils.d.ts +23 -23
  75. package/dist/esm/types/components/index.d.ts +2 -2
  76. package/dist/esm/types/components/types.d.ts +214 -214
  77. package/dist/esm/types/components/widgets/AppButton.d.ts +17 -17
  78. package/dist/esm/types/components/widgets/CopyView.d.ts +24 -24
  79. package/dist/esm/types/components/widgets/DrawerPop/index.d.ts +25 -25
  80. package/dist/esm/types/components/widgets/InfoLabel.d.ts +11 -11
  81. package/dist/esm/types/components/widgets/InputBox/index.d.ts +94 -94
  82. package/dist/esm/types/components/widgets/InputBox/utils.d.ts +1 -1
  83. package/dist/esm/types/components/widgets/Link.d.ts +9 -9
  84. package/dist/esm/types/components/widgets/Loading.d.ts +27 -27
  85. package/dist/esm/types/components/widgets/ModalPop/index.d.ts +26 -26
  86. package/dist/esm/types/components/widgets/PleaseWaitForX.d.ts +3 -3
  87. package/dist/esm/types/index.d.ts +1 -1
  88. package/dist/esm/types/theme.d.ts +3 -3
  89. package/dist/esm/types/theme.type.d.ts +19 -19
  90. package/dist/esm/types/utils/CustomError.d.ts +5 -5
  91. package/dist/esm/types/utils/base64Images.d.ts +4 -4
  92. package/dist/esm/types/utils/c.d.ts +33 -33
  93. package/dist/esm/types/utils/f.d.ts +23 -23
  94. package/dist/index.d.ts +1 -1
  95. package/dist/theme.d.ts +3 -3
  96. package/dist/theme.type.d.ts +19 -19
  97. package/dist/utils/CustomError.d.ts +5 -5
  98. package/dist/utils/base64Images.d.ts +4 -4
  99. package/dist/utils/c.d.ts +33 -33
  100. package/dist/utils/f.d.ts +23 -23
  101. package/package.json +84 -83
@@ -1,12 +1,12 @@
1
- import React from "react";
2
- import { DownloadTypeProps, DownloadTypeResult, Tool } from "../types";
3
- import { Config } from "../../theme.type";
4
- interface DownloadType extends DownloadTypeProps {
5
- config: Config;
6
- onSuccess: (result: DownloadTypeResult) => void;
7
- onError: (error: Error) => void;
8
- onGetTool: (id: string) => Tool | null;
9
- isDarkMode?: boolean;
10
- }
11
- declare const DownloadType: React.FC<DownloadType>;
12
- export default DownloadType;
1
+ import React from "react";
2
+ import { DownloadTypeProps, DownloadTypeResult, Tool } from "../types";
3
+ import { Config } from "../../theme.type";
4
+ interface DownloadType extends DownloadTypeProps {
5
+ config: Config;
6
+ onSuccess: (result: DownloadTypeResult) => void;
7
+ onError: (error: Error) => void;
8
+ onGetTool: (id: string) => Tool | null;
9
+ isDarkMode?: boolean;
10
+ }
11
+ declare const DownloadType: React.FC<DownloadType>;
12
+ export default DownloadType;
@@ -1,12 +1,12 @@
1
- import React from 'react';
2
- import { User } from 'firebase/auth';
3
- import { Config } from '../../theme.type';
4
- interface AccessTokenDoor {
5
- show: boolean;
6
- onSuccess: (accessToken: string, User: User) => void;
7
- onError: (error: any) => void;
8
- config: Config;
9
- isDarkMode?: boolean;
10
- }
11
- declare const AccessTokenDoor: React.FC<any>;
12
- export default AccessTokenDoor;
1
+ import React from 'react';
2
+ import { User } from 'firebase/auth';
3
+ import { Config } from '../../theme.type';
4
+ interface AccessTokenDoor {
5
+ show: boolean;
6
+ onSuccess: (accessToken: string, User: User) => void;
7
+ onError: (error: any) => void;
8
+ config: Config;
9
+ isDarkMode?: boolean;
10
+ }
11
+ declare const AccessTokenDoor: React.FC<any>;
12
+ export default AccessTokenDoor;
@@ -1,15 +1,15 @@
1
- import React from 'react';
2
- import { User } from 'firebase/auth';
3
- import { Config } from '../../theme.type';
4
- interface AuthView {
5
- show: boolean;
6
- setUser: (user: User) => void;
7
- signInTitle: string;
8
- signUpTitle: string;
9
- onSuccess: (user: User) => void;
10
- onError: (error: any) => void;
11
- config: Config;
12
- isDarkMode?: boolean;
13
- }
14
- declare const AuthView: React.FC<any>;
15
- export default AuthView;
1
+ import React from 'react';
2
+ import { User } from 'firebase/auth';
3
+ import { Config } from '../../theme.type';
4
+ interface AuthView {
5
+ show: boolean;
6
+ setUser: (user: User) => void;
7
+ signInTitle: string;
8
+ signUpTitle: string;
9
+ onSuccess: (user: User) => void;
10
+ onError: (error: any) => void;
11
+ config: Config;
12
+ isDarkMode?: boolean;
13
+ }
14
+ declare const AuthView: React.FC<any>;
15
+ export default AuthView;
@@ -1,11 +1,11 @@
1
- import React from "react";
2
- import { User } from "firebase/auth";
3
- import { Config } from "../../theme.type";
4
- export interface SignView {
5
- setUser: (user: User) => void;
6
- config: Config;
7
- onAuthDone?: (user: User) => void;
8
- [x: string]: any;
9
- }
10
- declare const SignInView: React.FC<SignView>;
11
- export default SignInView;
1
+ import React from "react";
2
+ import { User } from "firebase/auth";
3
+ import { Config } from "../../theme.type";
4
+ export interface SignView {
5
+ setUser: (user: User) => void;
6
+ config: Config;
7
+ onAuthDone?: (user: User) => void;
8
+ [x: string]: any;
9
+ }
10
+ declare const SignInView: React.FC<SignView>;
11
+ export default SignInView;
@@ -1,10 +1,10 @@
1
- import React from "react";
2
- import { User } from "firebase/auth";
3
- import { Config } from "../../theme.type";
4
- interface SignUpView {
5
- setUser: (user: User) => void;
6
- config: Config;
7
- onAuthDone?: (user: User) => void;
8
- }
9
- declare const SignUpView: React.FC<SignUpView>;
10
- export default SignUpView;
1
+ import React from "react";
2
+ import { User } from "firebase/auth";
3
+ import { Config } from "../../theme.type";
4
+ interface SignUpView {
5
+ setUser: (user: User) => void;
6
+ config: Config;
7
+ onAuthDone?: (user: User) => void;
8
+ }
9
+ declare const SignUpView: React.FC<SignUpView>;
10
+ export default SignUpView;
@@ -1,23 +1,23 @@
1
- import { Auth as A, User as U } from "firebase/auth";
2
- import { Firestore } from "firebase/firestore";
3
- export interface AdminInfo {
4
- uid: string;
5
- permissions: string[];
6
- }
7
- export interface User extends U {
8
- metadata: {
9
- [x: string]: any;
10
- };
11
- [x: string]: any;
12
- }
13
- export interface Auth extends A {
14
- [x: string]: any;
15
- }
16
- export interface AuthResource {
17
- uploadFile: (file: Blob | Uint8Array | ArrayBuffer, pathToFile: string) => Promise<string>;
18
- auth: Auth | null | undefined;
19
- user?: User | null | undefined;
20
- adminInfo?: AdminInfo | null;
21
- authLoading?: boolean;
22
- db?: Firestore | null;
23
- }
1
+ import { Auth as A, User as U } from "firebase/auth";
2
+ import { Firestore } from "firebase/firestore";
3
+ export interface AdminInfo {
4
+ uid: string;
5
+ permissions: string[];
6
+ }
7
+ export interface User extends U {
8
+ metadata: {
9
+ [x: string]: any;
10
+ };
11
+ [x: string]: any;
12
+ }
13
+ export interface Auth extends A {
14
+ [x: string]: any;
15
+ }
16
+ export interface AuthResource {
17
+ uploadFile: (file: Blob | Uint8Array | ArrayBuffer, pathToFile: string) => Promise<string>;
18
+ auth: Auth | null | undefined;
19
+ user?: User | null | undefined;
20
+ adminInfo?: AdminInfo | null;
21
+ authLoading?: boolean;
22
+ db?: Firestore | null;
23
+ }
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- import { Firestore } from "firebase/firestore";
3
- import { AdminInfo, Auth, User } from './data.type';
4
- import { Config } from '../../theme.type';
5
- declare const useFirebase: (config: Config) => {
6
- auth: Auth | null | undefined;
7
- db: Firestore | null | undefined;
8
- user: User | null | undefined;
9
- setUser: import("react").Dispatch<import("react").SetStateAction<User | null | undefined>>;
10
- adminInfo: AdminInfo | null | undefined;
11
- authLoading: boolean;
12
- uploadFile: (file: Blob | Uint8Array | ArrayBuffer, pathToFile: string) => Promise<string>;
13
- };
14
- export default useFirebase;
1
+ /// <reference types="react" />
2
+ import { Firestore } from "firebase/firestore";
3
+ import { AdminInfo, Auth, User } from './data.type';
4
+ import { Config } from '../../theme.type';
5
+ declare const useFirebase: (config: Config) => {
6
+ auth: Auth | null | undefined;
7
+ db: Firestore | null | undefined;
8
+ user: User | null | undefined;
9
+ setUser: import("react").Dispatch<import("react").SetStateAction<User | null | undefined>>;
10
+ adminInfo: AdminInfo | null | undefined;
11
+ authLoading: boolean;
12
+ uploadFile: (file: Blob | Uint8Array | ArrayBuffer, pathToFile: string) => Promise<string>;
13
+ };
14
+ export default useFirebase;
@@ -1,55 +1,55 @@
1
- import React from 'react';
2
- import { User } from 'firebase/auth';
3
- import { AuthResource } from '../Firebase/data.type';
4
- import { DownloadTypeProps, DownloadTypeResult, SaltBalanceConfirmation, SdkConfig } from '../types';
5
- import useSdkConfig from '../hooks/useSdkConfig';
6
- import { Config } from '../../theme.type';
7
- import useTools, { UseToolsResult } from '../hooks/useTools';
8
- import { StaticTool, DynamicTool, DynamicTemplate, ToolsData } from "../hooks/useTools/types";
9
- import { rmUpdates } from '../hooks/useTools/utils';
10
- import useReferralId from '../hooks/useReferralId';
11
- export { rmUpdates };
12
- export interface FrontbackedProviderProps {
13
- children: any;
14
- config: Config;
15
- enableLog?: boolean;
16
- isDarkMode?: boolean;
17
- disableBlockchainPoll?: boolean;
18
- }
19
- export type { StaticTool, DynamicTool, DynamicTemplate, ToolsData, UseToolsResult };
20
- interface DocSaveResult {
21
- docId: string;
22
- totalFieldsUpdated: number;
23
- }
24
- export interface SoftBakerResourceProps extends AuthResource {
25
- signIn: (signInTitle: string | null | undefined, signUpTitle: string | null | undefined) => Promise<User>;
26
- signOut: () => Promise<void>;
27
- createDoc: (documentId: string | null, document: {
28
- [x: string]: any;
29
- }, user?: User | null, staticToolCollection?: string | null, dynamicToolId?: string | null) => Promise<DocSaveResult>;
30
- updateDoc: (documentId: string | null, document: {
31
- [x: string]: any;
32
- }, staticToolCollection?: string | null, dynamicToolId?: string | null) => Promise<DocSaveResult>;
33
- deposit: (amount: number, signInTitle: string | null | undefined, signUpTitle: string | null | undefined) => Promise<SaltBalanceConfirmation>;
34
- showWallet: (depositAmount: number) => void;
35
- sdkConfig?: SdkConfig | null;
36
- contact_link: string | null | undefined;
37
- group_link: string | null | undefined;
38
- group_links: string[] | null | undefined;
39
- parent_site_home: string | null | undefined;
40
- aff_pct: number | null | undefined;
41
- balanceInUsd: 0;
42
- balancePendingInUsd: 0;
43
- unconfirmedDepositsCount: 0;
44
- downloadSvgAsImage: (svgString: string, format: 'png' | 'jpeg', fileName: string) => Promise<string>;
45
- getDownloadType: (downloadTypeProps: DownloadTypeProps) => Promise<DownloadTypeResult>;
46
- saveToStoreFrameCookie: (key: string, value: string) => Promise<void>;
47
- saveToStoreFrameLocalStorage: (key: string, value: string) => Promise<void>;
48
- saveToStoreFrameSessionStorage: (key: string, value: string) => Promise<void>;
49
- getFromStoreFrameCookie: (key: string) => Promise<any>;
50
- getFromStoreFrameLocalStorage: (key: string) => Promise<any>;
51
- getFromStoreFrameSessionStorage: (key: string) => Promise<any>;
52
- }
53
- declare const FrontbackedProvider: React.FC<FrontbackedProviderProps>;
54
- declare function useFrontbacked(): SoftBakerResourceProps;
55
- export { FrontbackedProvider, useFrontbacked, useSdkConfig, useTools, useReferralId };
1
+ import React from 'react';
2
+ import { User } from 'firebase/auth';
3
+ import { AuthResource } from '../Firebase/data.type';
4
+ import { DownloadTypeProps, DownloadTypeResult, SaltBalanceConfirmation, SdkConfig } from '../types';
5
+ import useSdkConfig from '../hooks/useSdkConfig';
6
+ import { Config } from '../../theme.type';
7
+ import useTools, { UseToolsResult } from '../hooks/useTools';
8
+ import { StaticTool, DynamicTool, DynamicTemplate, ToolsData } from "../hooks/useTools/types";
9
+ import { rmUpdates } from '../hooks/useTools/utils';
10
+ import useReferralId from '../hooks/useReferralId';
11
+ export { rmUpdates };
12
+ export interface FrontbackedProviderProps {
13
+ children: any;
14
+ config: Config;
15
+ enableLog?: boolean;
16
+ isDarkMode?: boolean;
17
+ disableBlockchainPoll?: boolean;
18
+ }
19
+ export type { StaticTool, DynamicTool, DynamicTemplate, ToolsData, UseToolsResult };
20
+ interface DocSaveResult {
21
+ docId: string;
22
+ totalFieldsUpdated: number;
23
+ }
24
+ export interface SoftBakerResourceProps extends AuthResource {
25
+ signIn: (signInTitle: string | null | undefined, signUpTitle: string | null | undefined) => Promise<User>;
26
+ signOut: () => Promise<void>;
27
+ createDoc: (documentId: string | null, document: {
28
+ [x: string]: any;
29
+ }, user?: User | null, staticToolCollection?: string | null, dynamicToolId?: string | null) => Promise<DocSaveResult>;
30
+ updateDoc: (documentId: string | null, document: {
31
+ [x: string]: any;
32
+ }, staticToolCollection?: string | null, dynamicToolId?: string | null) => Promise<DocSaveResult>;
33
+ deposit: (amount: number, signInTitle: string | null | undefined, signUpTitle: string | null | undefined) => Promise<SaltBalanceConfirmation>;
34
+ showWallet: (depositAmount: number) => void;
35
+ sdkConfig?: SdkConfig | null;
36
+ contact_link: string | null | undefined;
37
+ group_link: string | null | undefined;
38
+ group_links: string[] | null | undefined;
39
+ parent_site_home: string | null | undefined;
40
+ aff_pct: number | null | undefined;
41
+ balanceInUsd: 0;
42
+ balancePendingInUsd: 0;
43
+ unconfirmedDepositsCount: 0;
44
+ downloadSvgAsImage: (svgString: string, format: 'png' | 'jpeg', fileName: string) => Promise<string>;
45
+ getDownloadType: (downloadTypeProps: DownloadTypeProps) => Promise<DownloadTypeResult>;
46
+ saveToStoreFrameCookie: (key: string, value: string) => Promise<void>;
47
+ saveToStoreFrameLocalStorage: (key: string, value: string) => Promise<void>;
48
+ saveToStoreFrameSessionStorage: (key: string, value: string) => Promise<void>;
49
+ getFromStoreFrameCookie: (key: string) => Promise<any>;
50
+ getFromStoreFrameLocalStorage: (key: string) => Promise<any>;
51
+ getFromStoreFrameSessionStorage: (key: string) => Promise<any>;
52
+ }
53
+ declare const FrontbackedProvider: React.FC<FrontbackedProviderProps>;
54
+ declare function useFrontbacked(): SoftBakerResourceProps;
55
+ export { FrontbackedProvider, useFrontbacked, useSdkConfig, useTools, useReferralId };
@@ -1,5 +1,5 @@
1
- declare const useReferralId: () => {
2
- referralId: string | null | undefined;
3
- getReferralId: () => string | null;
4
- };
5
- export default useReferralId;
1
+ declare const useReferralId: () => {
2
+ referralId: string | null | undefined;
3
+ getReferralId: () => string | null;
4
+ };
5
+ export default useReferralId;
@@ -1,10 +1,10 @@
1
- import { SdkConfig } from '../types';
2
- import { Config } from '../../theme.type';
3
- declare global {
4
- interface Window {
5
- fetchPromise: Promise<SdkConfig | null> | null;
6
- sdkConfigCache: SdkConfig | null;
7
- }
8
- }
9
- declare const useSdkConfig: (appConfig: Config) => SdkConfig | null | undefined;
10
- export default useSdkConfig;
1
+ import { SdkConfig } from '../types';
2
+ import { Config } from '../../theme.type';
3
+ declare global {
4
+ interface Window {
5
+ fetchPromise: Promise<SdkConfig | null> | null;
6
+ sdkConfigCache: SdkConfig | null;
7
+ }
8
+ }
9
+ declare const useSdkConfig: (appConfig: Config) => SdkConfig | null | undefined;
10
+ export default useSdkConfig;
@@ -1,14 +1,14 @@
1
- import { ToolsData } from "./types";
2
- import { Config } from "../../../theme.type";
3
- declare global {
4
- interface Window {
5
- toolsFetchPromise: Promise<ToolsData | null> | null;
6
- toolsCache: ToolsData | null;
7
- }
8
- }
9
- export interface UseToolsResult extends ToolsData {
10
- loading: boolean;
11
- error: string | null;
12
- }
13
- declare const useTools: (config: Config) => UseToolsResult;
14
- export default useTools;
1
+ import { ToolsData } from "./types";
2
+ import { Config } from "../../../theme.type";
3
+ declare global {
4
+ interface Window {
5
+ toolsFetchPromise: Promise<ToolsData | null> | null;
6
+ toolsCache: ToolsData | null;
7
+ }
8
+ }
9
+ export interface UseToolsResult extends ToolsData {
10
+ loading: boolean;
11
+ error: string | null;
12
+ }
13
+ declare const useTools: (config: Config) => UseToolsResult;
14
+ export default useTools;
@@ -1,62 +1,62 @@
1
- import { Timestamp } from "firebase/firestore";
2
- export interface StaticTool {
3
- id: string;
4
- siteUrl: string;
5
- mobileVideoUrl?: string | null;
6
- is_static: true;
7
- desktopVideoUrl?: string | null;
8
- name: string;
9
- isActive: boolean;
10
- isHidden: boolean;
11
- create_price: number;
12
- create_price_discount: number;
13
- update_price: number;
14
- allow_freemium: boolean;
15
- create_price_is_monthly: boolean;
16
- yearly_price?: number;
17
- quarterly_price?: number;
18
- rank: number;
19
- siteLogoUrl?: string | null;
20
- icon?: string;
21
- }
22
- export interface DynamicTool {
23
- id: string;
24
- authorId: string;
25
- createdAt: Timestamp;
26
- icon: string;
27
- allow_freemium: boolean;
28
- update_price: number;
29
- is_static: boolean;
30
- isActive: boolean;
31
- is_freemium: boolean;
32
- name: string;
33
- description: string;
34
- create_price: number;
35
- isHidden: boolean;
36
- youtube: string;
37
- templates_url: string;
38
- updatedAt: Timestamp;
39
- templates: DynamicTemplate[];
40
- }
41
- export interface DynamicTemplate {
42
- id: string;
43
- name: string;
44
- logo: string;
45
- data_url: string;
46
- is_default?: boolean;
47
- split_on_download?: boolean;
48
- thumbnail: string;
49
- }
50
- export interface ToolsData {
51
- totalUpdates?: number;
52
- lastUpdatedOn?: string;
53
- previouslyUpdatedOn?: string;
54
- tools?: (StaticTool | DynamicTool)[];
55
- toolsById?: {
56
- [x: string]: DynamicTool;
57
- } | null;
58
- toolsByTemplatesUrl?: {
59
- [x: string]: DynamicTool;
60
- } | null;
61
- getTool: (toolId: string) => DynamicTool | null;
62
- }
1
+ import { Timestamp } from "firebase/firestore";
2
+ export interface StaticTool {
3
+ id: string;
4
+ siteUrl: string;
5
+ mobileVideoUrl?: string | null;
6
+ is_static: true;
7
+ desktopVideoUrl?: string | null;
8
+ name: string;
9
+ isActive: boolean;
10
+ isHidden: boolean;
11
+ create_price: number;
12
+ create_price_discount: number;
13
+ update_price: number;
14
+ allow_freemium: boolean;
15
+ create_price_is_monthly: boolean;
16
+ yearly_price?: number;
17
+ quarterly_price?: number;
18
+ rank: number;
19
+ siteLogoUrl?: string | null;
20
+ icon?: string;
21
+ }
22
+ export interface DynamicTool {
23
+ id: string;
24
+ authorId: string;
25
+ createdAt: Timestamp;
26
+ icon: string;
27
+ allow_freemium: boolean;
28
+ update_price: number;
29
+ is_static: boolean;
30
+ isActive: boolean;
31
+ is_freemium: boolean;
32
+ name: string;
33
+ description: string;
34
+ create_price: number;
35
+ isHidden: boolean;
36
+ youtube: string;
37
+ templates_url: string;
38
+ updatedAt: Timestamp;
39
+ templates: DynamicTemplate[];
40
+ }
41
+ export interface DynamicTemplate {
42
+ id: string;
43
+ name: string;
44
+ logo: string;
45
+ data_url: string;
46
+ is_default?: boolean;
47
+ split_on_download?: boolean;
48
+ thumbnail: string;
49
+ }
50
+ export interface ToolsData {
51
+ totalUpdates?: number;
52
+ lastUpdatedOn?: string;
53
+ previouslyUpdatedOn?: string;
54
+ tools?: (StaticTool | DynamicTool)[];
55
+ toolsById?: {
56
+ [x: string]: DynamicTool;
57
+ } | null;
58
+ toolsByTemplatesUrl?: {
59
+ [x: string]: DynamicTool;
60
+ } | null;
61
+ getTool: (toolId: string) => DynamicTool | null;
62
+ }
@@ -1,23 +1,23 @@
1
- /**
2
- * Removes a specific query string parameter from a URL.
3
- * @param {string} url - The original URL.
4
- * @param {string} queryString - The query string parameter to remove.
5
- * @returns {string} - The updated URL without the specified query string parameter.
6
- */
7
- export declare function removeQueryString(url: string, queryString: string): string;
8
- /**
9
- * Converts an array of objects to a map using a specified attribute as the key.
10
- *
11
- * @param {Array<Object>} arr - The array of objects to be converted.
12
- * @param {string} attr - The attribute to use as the key for the mapping.
13
- * @returns {Object} - An object mapping each unique attribute value to its corresponding item.
14
- */
15
- export declare function arrayToMap(attr: string, arr: {
16
- [x: string]: any;
17
- }[], keyParser?: (key: string) => string): {
18
- [x: string]: {
19
- [x: string]: any;
20
- };
21
- };
22
- export declare function removeUpdateQueryString(url: string): string;
23
- export declare const rmUpdates: (url: string) => any;
1
+ /**
2
+ * Removes a specific query string parameter from a URL.
3
+ * @param {string} url - The original URL.
4
+ * @param {string} queryString - The query string parameter to remove.
5
+ * @returns {string} - The updated URL without the specified query string parameter.
6
+ */
7
+ export declare function removeQueryString(url: string, queryString: string): string;
8
+ /**
9
+ * Converts an array of objects to a map using a specified attribute as the key.
10
+ *
11
+ * @param {Array<Object>} arr - The array of objects to be converted.
12
+ * @param {string} attr - The attribute to use as the key for the mapping.
13
+ * @returns {Object} - An object mapping each unique attribute value to its corresponding item.
14
+ */
15
+ export declare function arrayToMap(attr: string, arr: {
16
+ [x: string]: any;
17
+ }[], keyParser?: (key: string) => string): {
18
+ [x: string]: {
19
+ [x: string]: any;
20
+ };
21
+ };
22
+ export declare function removeUpdateQueryString(url: string): string;
23
+ export declare const rmUpdates: (url: string) => any;
@@ -1,2 +1,2 @@
1
- export { FrontbackedProvider, useFrontbacked, useTools, useSdkConfig, rmUpdates, useReferralId } from "./FrontbackedProvider";
2
- export type { StaticTool, DynamicTool, DynamicTemplate, ToolsData, UseToolsResult } from "./FrontbackedProvider";
1
+ export { FrontbackedProvider, useFrontbacked, useTools, useSdkConfig, rmUpdates, useReferralId } from "./FrontbackedProvider";
2
+ export type { StaticTool, DynamicTool, DynamicTemplate, ToolsData, UseToolsResult } from "./FrontbackedProvider";