@authhero/kysely-adapter 10.11.0 → 10.13.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.
@@ -1681,608 +1681,967 @@ declare const customDomainWithTenantIdSchema: z.ZodObject<{
1681
1681
  } | undefined;
1682
1682
  }>;
1683
1683
  export type CustomDomainWithTenantId = z.infer<typeof customDomainWithTenantIdSchema>;
1684
- declare enum FormFieldType {
1685
- TEXT = "text",
1686
- EMAIL = "email",
1687
- PASSWORD = "password",
1688
- NUMBER = "number",
1689
- PHONE = "phone",
1690
- DATE = "date",
1691
- CHECKBOX = "checkbox",
1692
- RADIO = "radio",
1693
- SELECT = "select",
1694
- HIDDEN = "hidden"
1695
- }
1696
- declare enum ValidationErrorType {
1697
- REQUIRED = "required",
1698
- FORMAT = "format",
1699
- MIN_LENGTH = "min_length",
1700
- MAX_LENGTH = "max_length",
1701
- MIN = "min",
1702
- MAX = "max",
1703
- MATCHING_PATTERN = "matching_pattern"
1704
- }
1705
- declare enum FormType {
1706
- LOGIN = "login",
1707
- SIGNUP = "signup",
1708
- RESET_PASSWORD = "reset-password",
1709
- MFA = "mfa",
1710
- MFA_ENROLLMENT = "mfa-enrollment",
1711
- VERIFICATION_CODE = "verification-code",
1712
- INVITATION = "invitation",
1713
- CUSTOM = "custom"
1714
- }
1715
1684
  declare const formInsertSchema: z.ZodObject<{
1716
1685
  name: z.ZodString;
1717
- type: z.ZodNativeEnum<typeof FormType>;
1718
- client_id: z.ZodOptional<z.ZodString>;
1719
- fields: z.ZodArray<z.ZodObject<{
1720
- id: z.ZodString;
1721
- name: z.ZodString;
1722
- type: z.ZodNativeEnum<typeof FormFieldType>;
1723
- label: z.ZodString;
1724
- placeholder: z.ZodOptional<z.ZodString>;
1725
- required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1726
- disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1727
- readOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1728
- defaultValue: z.ZodOptional<z.ZodUnion<[
1729
- z.ZodString,
1730
- z.ZodNumber,
1731
- z.ZodBoolean
1732
- ]>>;
1733
- validations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1734
- type: z.ZodNativeEnum<typeof ValidationErrorType>;
1735
- message: z.ZodString;
1736
- min_length: z.ZodOptional<z.ZodNumber>;
1737
- max_length: z.ZodOptional<z.ZodNumber>;
1738
- min: z.ZodOptional<z.ZodNumber>;
1739
- max: z.ZodOptional<z.ZodNumber>;
1740
- pattern: z.ZodOptional<z.ZodString>;
1741
- format: z.ZodOptional<z.ZodString>;
1686
+ messages: z.ZodOptional<z.ZodObject<{
1687
+ errors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1688
+ custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1689
+ }, "strip", z.ZodTypeAny, {
1690
+ custom?: Record<string, any> | undefined;
1691
+ errors?: Record<string, any> | undefined;
1692
+ }, {
1693
+ custom?: Record<string, any> | undefined;
1694
+ errors?: Record<string, any> | undefined;
1695
+ }>>;
1696
+ languages: z.ZodOptional<z.ZodObject<{
1697
+ primary: z.ZodOptional<z.ZodString>;
1698
+ default: z.ZodOptional<z.ZodString>;
1699
+ }, "strip", z.ZodTypeAny, {
1700
+ default?: string | undefined;
1701
+ primary?: string | undefined;
1702
+ }, {
1703
+ default?: string | undefined;
1704
+ primary?: string | undefined;
1705
+ }>>;
1706
+ translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1707
+ nodes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [
1708
+ z.ZodObject<{
1709
+ id: z.ZodString;
1710
+ type: z.ZodLiteral<"FLOW">;
1711
+ coordinates: z.ZodObject<{
1712
+ x: z.ZodNumber;
1713
+ y: z.ZodNumber;
1714
+ }, "strip", z.ZodTypeAny, {
1715
+ x: number;
1716
+ y: number;
1717
+ }, {
1718
+ x: number;
1719
+ y: number;
1720
+ }>;
1721
+ alias: z.ZodOptional<z.ZodString>;
1722
+ config: z.ZodObject<{
1723
+ flow_id: z.ZodString;
1724
+ next_node: z.ZodString;
1725
+ }, "strip", z.ZodTypeAny, {
1726
+ next_node: string;
1727
+ flow_id: string;
1728
+ }, {
1729
+ next_node: string;
1730
+ flow_id: string;
1731
+ }>;
1742
1732
  }, "strip", z.ZodTypeAny, {
1743
- message: string;
1744
- type: ValidationErrorType;
1745
- format?: string | undefined;
1746
- pattern?: string | undefined;
1747
- min_length?: number | undefined;
1748
- max_length?: number | undefined;
1749
- min?: number | undefined;
1750
- max?: number | undefined;
1733
+ type: "FLOW";
1734
+ id: string;
1735
+ config: {
1736
+ next_node: string;
1737
+ flow_id: string;
1738
+ };
1739
+ coordinates: {
1740
+ x: number;
1741
+ y: number;
1742
+ };
1743
+ alias?: string | undefined;
1751
1744
  }, {
1752
- message: string;
1753
- type: ValidationErrorType;
1754
- format?: string | undefined;
1755
- pattern?: string | undefined;
1756
- min_length?: number | undefined;
1757
- max_length?: number | undefined;
1758
- min?: number | undefined;
1759
- max?: number | undefined;
1760
- }>, "many">>;
1761
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1762
- label: z.ZodString;
1745
+ type: "FLOW";
1746
+ id: string;
1747
+ config: {
1748
+ next_node: string;
1749
+ flow_id: string;
1750
+ };
1751
+ coordinates: {
1752
+ x: number;
1753
+ y: number;
1754
+ };
1755
+ alias?: string | undefined;
1756
+ }>,
1757
+ z.ZodObject<{
1758
+ id: z.ZodString;
1759
+ type: z.ZodLiteral<"ROUTER">;
1760
+ coordinates: z.ZodObject<{
1761
+ x: z.ZodNumber;
1762
+ y: z.ZodNumber;
1763
+ }, "strip", z.ZodTypeAny, {
1764
+ x: number;
1765
+ y: number;
1766
+ }, {
1767
+ x: number;
1768
+ y: number;
1769
+ }>;
1770
+ alias: z.ZodString;
1771
+ config: z.ZodObject<{
1772
+ rules: z.ZodArray<z.ZodObject<{
1773
+ id: z.ZodString;
1774
+ alias: z.ZodOptional<z.ZodString>;
1775
+ condition: z.ZodAny;
1776
+ next_node: z.ZodString;
1777
+ }, "strip", z.ZodTypeAny, {
1778
+ id: string;
1779
+ next_node: string;
1780
+ alias?: string | undefined;
1781
+ condition?: any;
1782
+ }, {
1783
+ id: string;
1784
+ next_node: string;
1785
+ alias?: string | undefined;
1786
+ condition?: any;
1787
+ }>, "many">;
1788
+ fallback: z.ZodArray<z.ZodString, "many">;
1789
+ }, "strip", z.ZodTypeAny, {
1790
+ rules: {
1791
+ id: string;
1792
+ next_node: string;
1793
+ alias?: string | undefined;
1794
+ condition?: any;
1795
+ }[];
1796
+ fallback: string[];
1797
+ }, {
1798
+ rules: {
1799
+ id: string;
1800
+ next_node: string;
1801
+ alias?: string | undefined;
1802
+ condition?: any;
1803
+ }[];
1804
+ fallback: string[];
1805
+ }>;
1806
+ }, "strip", z.ZodTypeAny, {
1807
+ type: "ROUTER";
1808
+ id: string;
1809
+ config: {
1810
+ rules: {
1811
+ id: string;
1812
+ next_node: string;
1813
+ alias?: string | undefined;
1814
+ condition?: any;
1815
+ }[];
1816
+ fallback: string[];
1817
+ };
1818
+ coordinates: {
1819
+ x: number;
1820
+ y: number;
1821
+ };
1822
+ alias: string;
1823
+ }, {
1824
+ type: "ROUTER";
1825
+ id: string;
1826
+ config: {
1827
+ rules: {
1828
+ id: string;
1829
+ next_node: string;
1830
+ alias?: string | undefined;
1831
+ condition?: any;
1832
+ }[];
1833
+ fallback: string[];
1834
+ };
1835
+ coordinates: {
1836
+ x: number;
1837
+ y: number;
1838
+ };
1839
+ alias: string;
1840
+ }>,
1841
+ z.ZodObject<{
1842
+ id: z.ZodString;
1843
+ type: z.ZodLiteral<"STEP">;
1844
+ coordinates: z.ZodObject<{
1845
+ x: z.ZodNumber;
1846
+ y: z.ZodNumber;
1847
+ }, "strip", z.ZodTypeAny, {
1848
+ x: number;
1849
+ y: number;
1850
+ }, {
1851
+ x: number;
1852
+ y: number;
1853
+ }>;
1854
+ alias: z.ZodOptional<z.ZodString>;
1855
+ config: z.ZodObject<{
1856
+ components: z.ZodArray<z.ZodAny, "many">;
1857
+ next_node: z.ZodString;
1858
+ }, "strip", z.ZodTypeAny, {
1859
+ components: any[];
1860
+ next_node: string;
1861
+ }, {
1862
+ components: any[];
1863
+ next_node: string;
1864
+ }>;
1865
+ }, "strip", z.ZodTypeAny, {
1866
+ type: "STEP";
1867
+ id: string;
1868
+ config: {
1869
+ components: any[];
1870
+ next_node: string;
1871
+ };
1872
+ coordinates: {
1873
+ x: number;
1874
+ y: number;
1875
+ };
1876
+ alias?: string | undefined;
1877
+ }, {
1878
+ type: "STEP";
1879
+ id: string;
1880
+ config: {
1881
+ components: any[];
1882
+ next_node: string;
1883
+ };
1884
+ coordinates: {
1885
+ x: number;
1886
+ y: number;
1887
+ };
1888
+ alias?: string | undefined;
1889
+ }>
1890
+ ]>, "many">>;
1891
+ start: z.ZodOptional<z.ZodObject<{
1892
+ hidden_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1893
+ key: z.ZodString;
1763
1894
  value: z.ZodString;
1764
- checked: z.ZodOptional<z.ZodBoolean>;
1765
1895
  }, "strip", z.ZodTypeAny, {
1766
1896
  value: string;
1767
- label: string;
1768
- checked?: boolean | undefined;
1897
+ key: string;
1769
1898
  }, {
1770
1899
  value: string;
1771
- label: string;
1772
- checked?: boolean | undefined;
1900
+ key: string;
1773
1901
  }>, "many">>;
1774
- description: z.ZodOptional<z.ZodString>;
1775
- order: z.ZodOptional<z.ZodNumber>;
1776
- visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1777
- customizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1902
+ next_node: z.ZodOptional<z.ZodString>;
1903
+ coordinates: z.ZodOptional<z.ZodObject<{
1904
+ x: z.ZodNumber;
1905
+ y: z.ZodNumber;
1906
+ }, "strip", z.ZodTypeAny, {
1907
+ x: number;
1908
+ y: number;
1909
+ }, {
1910
+ x: number;
1911
+ y: number;
1912
+ }>>;
1778
1913
  }, "strip", z.ZodTypeAny, {
1779
- type: FormFieldType;
1780
- readOnly: boolean;
1781
- required: boolean;
1782
- name: string;
1783
- id: string;
1784
- disabled: boolean;
1785
- label: string;
1786
- visible: boolean;
1787
- options?: {
1914
+ coordinates?: {
1915
+ x: number;
1916
+ y: number;
1917
+ } | undefined;
1918
+ next_node?: string | undefined;
1919
+ hidden_fields?: {
1788
1920
  value: string;
1789
- label: string;
1790
- checked?: boolean | undefined;
1791
- }[] | undefined;
1792
- description?: string | undefined;
1793
- placeholder?: string | undefined;
1794
- defaultValue?: string | number | boolean | undefined;
1795
- validations?: {
1796
- message: string;
1797
- type: ValidationErrorType;
1798
- format?: string | undefined;
1799
- pattern?: string | undefined;
1800
- min_length?: number | undefined;
1801
- max_length?: number | undefined;
1802
- min?: number | undefined;
1803
- max?: number | undefined;
1921
+ key: string;
1804
1922
  }[] | undefined;
1805
- order?: number | undefined;
1806
- customizations?: Record<string, any> | undefined;
1807
1923
  }, {
1808
- type: FormFieldType;
1809
- name: string;
1810
- id: string;
1811
- label: string;
1812
- options?: {
1924
+ coordinates?: {
1925
+ x: number;
1926
+ y: number;
1927
+ } | undefined;
1928
+ next_node?: string | undefined;
1929
+ hidden_fields?: {
1813
1930
  value: string;
1814
- label: string;
1815
- checked?: boolean | undefined;
1931
+ key: string;
1816
1932
  }[] | undefined;
1817
- readOnly?: boolean | undefined;
1818
- description?: string | undefined;
1819
- required?: boolean | undefined;
1820
- disabled?: boolean | undefined;
1821
- placeholder?: string | undefined;
1822
- defaultValue?: string | number | boolean | undefined;
1823
- validations?: {
1824
- message: string;
1825
- type: ValidationErrorType;
1826
- format?: string | undefined;
1827
- pattern?: string | undefined;
1828
- min_length?: number | undefined;
1829
- max_length?: number | undefined;
1830
- min?: number | undefined;
1831
- max?: number | undefined;
1832
- }[] | undefined;
1833
- order?: number | undefined;
1834
- visible?: boolean | undefined;
1835
- customizations?: Record<string, any> | undefined;
1836
- }>, "many">;
1837
- controls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1838
- id: z.ZodString;
1839
- type: z.ZodLiteral<"submit">;
1840
- label: z.ZodString;
1841
- className: z.ZodOptional<z.ZodString>;
1842
- disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1843
- order: z.ZodOptional<z.ZodNumber>;
1844
- visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1845
- customizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1933
+ }>>;
1934
+ ending: z.ZodOptional<z.ZodObject<{
1935
+ redirection: z.ZodOptional<z.ZodObject<{
1936
+ delay: z.ZodOptional<z.ZodNumber>;
1937
+ target: z.ZodOptional<z.ZodString>;
1938
+ }, "strip", z.ZodTypeAny, {
1939
+ delay?: number | undefined;
1940
+ target?: string | undefined;
1941
+ }, {
1942
+ delay?: number | undefined;
1943
+ target?: string | undefined;
1944
+ }>>;
1945
+ after_submit: z.ZodOptional<z.ZodObject<{
1946
+ flow_id: z.ZodOptional<z.ZodString>;
1947
+ }, "strip", z.ZodTypeAny, {
1948
+ flow_id?: string | undefined;
1949
+ }, {
1950
+ flow_id?: string | undefined;
1951
+ }>>;
1952
+ coordinates: z.ZodOptional<z.ZodObject<{
1953
+ x: z.ZodNumber;
1954
+ y: z.ZodNumber;
1955
+ }, "strip", z.ZodTypeAny, {
1956
+ x: number;
1957
+ y: number;
1958
+ }, {
1959
+ x: number;
1960
+ y: number;
1961
+ }>>;
1962
+ resume_flow: z.ZodOptional<z.ZodBoolean>;
1846
1963
  }, "strip", z.ZodTypeAny, {
1847
- type: "submit";
1848
- id: string;
1849
- disabled: boolean;
1850
- label: string;
1851
- visible: boolean;
1852
- order?: number | undefined;
1853
- customizations?: Record<string, any> | undefined;
1854
- className?: string | undefined;
1964
+ coordinates?: {
1965
+ x: number;
1966
+ y: number;
1967
+ } | undefined;
1968
+ resume_flow?: boolean | undefined;
1969
+ redirection?: {
1970
+ delay?: number | undefined;
1971
+ target?: string | undefined;
1972
+ } | undefined;
1973
+ after_submit?: {
1974
+ flow_id?: string | undefined;
1975
+ } | undefined;
1855
1976
  }, {
1856
- type: "submit";
1857
- id: string;
1858
- label: string;
1859
- disabled?: boolean | undefined;
1860
- order?: number | undefined;
1861
- visible?: boolean | undefined;
1862
- customizations?: Record<string, any> | undefined;
1863
- className?: string | undefined;
1864
- }>, "many">>;
1865
- redirect_uri: z.ZodOptional<z.ZodString>;
1866
- post_submit_action: z.ZodOptional<z.ZodEnum<[
1867
- "redirect",
1868
- "message"
1869
- ]>>;
1870
- success_message: z.ZodOptional<z.ZodString>;
1871
- language: z.ZodOptional<z.ZodString>;
1872
- active: z.ZodDefault<z.ZodBoolean>;
1873
- layout: z.ZodOptional<z.ZodObject<{
1874
- columns: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1875
- template: z.ZodOptional<z.ZodString>;
1977
+ coordinates?: {
1978
+ x: number;
1979
+ y: number;
1980
+ } | undefined;
1981
+ resume_flow?: boolean | undefined;
1982
+ redirection?: {
1983
+ delay?: number | undefined;
1984
+ target?: string | undefined;
1985
+ } | undefined;
1986
+ after_submit?: {
1987
+ flow_id?: string | undefined;
1988
+ } | undefined;
1989
+ }>>;
1990
+ style: z.ZodOptional<z.ZodObject<{
1991
+ css: z.ZodOptional<z.ZodString>;
1876
1992
  }, "strip", z.ZodTypeAny, {
1877
- columns: number;
1878
- template?: string | undefined;
1993
+ css?: string | undefined;
1879
1994
  }, {
1880
- columns?: number | undefined;
1881
- template?: string | undefined;
1995
+ css?: string | undefined;
1882
1996
  }>>;
1883
- css: z.ZodOptional<z.ZodString>;
1884
- javascript: z.ZodOptional<z.ZodString>;
1885
1997
  }, "strip", z.ZodTypeAny, {
1886
- type: FormType;
1887
1998
  name: string;
1888
- fields: {
1889
- type: FormFieldType;
1890
- readOnly: boolean;
1891
- required: boolean;
1892
- name: string;
1893
- id: string;
1894
- disabled: boolean;
1895
- label: string;
1896
- visible: boolean;
1897
- options?: {
1999
+ start?: {
2000
+ coordinates?: {
2001
+ x: number;
2002
+ y: number;
2003
+ } | undefined;
2004
+ next_node?: string | undefined;
2005
+ hidden_fields?: {
1898
2006
  value: string;
1899
- label: string;
1900
- checked?: boolean | undefined;
1901
- }[] | undefined;
1902
- description?: string | undefined;
1903
- placeholder?: string | undefined;
1904
- defaultValue?: string | number | boolean | undefined;
1905
- validations?: {
1906
- message: string;
1907
- type: ValidationErrorType;
1908
- format?: string | undefined;
1909
- pattern?: string | undefined;
1910
- min_length?: number | undefined;
1911
- max_length?: number | undefined;
1912
- min?: number | undefined;
1913
- max?: number | undefined;
2007
+ key: string;
1914
2008
  }[] | undefined;
1915
- order?: number | undefined;
1916
- customizations?: Record<string, any> | undefined;
1917
- }[];
1918
- active: boolean;
1919
- client_id?: string | undefined;
1920
- redirect_uri?: string | undefined;
1921
- language?: string | undefined;
1922
- controls?: {
1923
- type: "submit";
2009
+ } | undefined;
2010
+ style?: {
2011
+ css?: string | undefined;
2012
+ } | undefined;
2013
+ languages?: {
2014
+ default?: string | undefined;
2015
+ primary?: string | undefined;
2016
+ } | undefined;
2017
+ nodes?: ({
2018
+ type: "FLOW";
1924
2019
  id: string;
1925
- disabled: boolean;
1926
- label: string;
1927
- visible: boolean;
1928
- order?: number | undefined;
1929
- customizations?: Record<string, any> | undefined;
1930
- className?: string | undefined;
1931
- }[] | undefined;
1932
- post_submit_action?: "message" | "redirect" | undefined;
1933
- success_message?: string | undefined;
1934
- layout?: {
1935
- columns: number;
1936
- template?: string | undefined;
2020
+ config: {
2021
+ next_node: string;
2022
+ flow_id: string;
2023
+ };
2024
+ coordinates: {
2025
+ x: number;
2026
+ y: number;
2027
+ };
2028
+ alias?: string | undefined;
2029
+ } | {
2030
+ type: "ROUTER";
2031
+ id: string;
2032
+ config: {
2033
+ rules: {
2034
+ id: string;
2035
+ next_node: string;
2036
+ alias?: string | undefined;
2037
+ condition?: any;
2038
+ }[];
2039
+ fallback: string[];
2040
+ };
2041
+ coordinates: {
2042
+ x: number;
2043
+ y: number;
2044
+ };
2045
+ alias: string;
2046
+ } | {
2047
+ type: "STEP";
2048
+ id: string;
2049
+ config: {
2050
+ components: any[];
2051
+ next_node: string;
2052
+ };
2053
+ coordinates: {
2054
+ x: number;
2055
+ y: number;
2056
+ };
2057
+ alias?: string | undefined;
2058
+ })[] | undefined;
2059
+ ending?: {
2060
+ coordinates?: {
2061
+ x: number;
2062
+ y: number;
2063
+ } | undefined;
2064
+ resume_flow?: boolean | undefined;
2065
+ redirection?: {
2066
+ delay?: number | undefined;
2067
+ target?: string | undefined;
2068
+ } | undefined;
2069
+ after_submit?: {
2070
+ flow_id?: string | undefined;
2071
+ } | undefined;
1937
2072
  } | undefined;
1938
- css?: string | undefined;
1939
- javascript?: string | undefined;
2073
+ messages?: {
2074
+ custom?: Record<string, any> | undefined;
2075
+ errors?: Record<string, any> | undefined;
2076
+ } | undefined;
2077
+ translations?: Record<string, any> | undefined;
1940
2078
  }, {
1941
- type: FormType;
1942
2079
  name: string;
1943
- fields: {
1944
- type: FormFieldType;
1945
- name: string;
1946
- id: string;
1947
- label: string;
1948
- options?: {
2080
+ start?: {
2081
+ coordinates?: {
2082
+ x: number;
2083
+ y: number;
2084
+ } | undefined;
2085
+ next_node?: string | undefined;
2086
+ hidden_fields?: {
1949
2087
  value: string;
1950
- label: string;
1951
- checked?: boolean | undefined;
1952
- }[] | undefined;
1953
- readOnly?: boolean | undefined;
1954
- description?: string | undefined;
1955
- required?: boolean | undefined;
1956
- disabled?: boolean | undefined;
1957
- placeholder?: string | undefined;
1958
- defaultValue?: string | number | boolean | undefined;
1959
- validations?: {
1960
- message: string;
1961
- type: ValidationErrorType;
1962
- format?: string | undefined;
1963
- pattern?: string | undefined;
1964
- min_length?: number | undefined;
1965
- max_length?: number | undefined;
1966
- min?: number | undefined;
1967
- max?: number | undefined;
2088
+ key: string;
1968
2089
  }[] | undefined;
1969
- order?: number | undefined;
1970
- visible?: boolean | undefined;
1971
- customizations?: Record<string, any> | undefined;
1972
- }[];
1973
- client_id?: string | undefined;
1974
- redirect_uri?: string | undefined;
1975
- language?: string | undefined;
1976
- controls?: {
1977
- type: "submit";
2090
+ } | undefined;
2091
+ style?: {
2092
+ css?: string | undefined;
2093
+ } | undefined;
2094
+ languages?: {
2095
+ default?: string | undefined;
2096
+ primary?: string | undefined;
2097
+ } | undefined;
2098
+ nodes?: ({
2099
+ type: "FLOW";
1978
2100
  id: string;
1979
- label: string;
1980
- disabled?: boolean | undefined;
1981
- order?: number | undefined;
1982
- visible?: boolean | undefined;
1983
- customizations?: Record<string, any> | undefined;
1984
- className?: string | undefined;
1985
- }[] | undefined;
1986
- post_submit_action?: "message" | "redirect" | undefined;
1987
- success_message?: string | undefined;
1988
- active?: boolean | undefined;
1989
- layout?: {
1990
- columns?: number | undefined;
1991
- template?: string | undefined;
2101
+ config: {
2102
+ next_node: string;
2103
+ flow_id: string;
2104
+ };
2105
+ coordinates: {
2106
+ x: number;
2107
+ y: number;
2108
+ };
2109
+ alias?: string | undefined;
2110
+ } | {
2111
+ type: "ROUTER";
2112
+ id: string;
2113
+ config: {
2114
+ rules: {
2115
+ id: string;
2116
+ next_node: string;
2117
+ alias?: string | undefined;
2118
+ condition?: any;
2119
+ }[];
2120
+ fallback: string[];
2121
+ };
2122
+ coordinates: {
2123
+ x: number;
2124
+ y: number;
2125
+ };
2126
+ alias: string;
2127
+ } | {
2128
+ type: "STEP";
2129
+ id: string;
2130
+ config: {
2131
+ components: any[];
2132
+ next_node: string;
2133
+ };
2134
+ coordinates: {
2135
+ x: number;
2136
+ y: number;
2137
+ };
2138
+ alias?: string | undefined;
2139
+ })[] | undefined;
2140
+ ending?: {
2141
+ coordinates?: {
2142
+ x: number;
2143
+ y: number;
2144
+ } | undefined;
2145
+ resume_flow?: boolean | undefined;
2146
+ redirection?: {
2147
+ delay?: number | undefined;
2148
+ target?: string | undefined;
2149
+ } | undefined;
2150
+ after_submit?: {
2151
+ flow_id?: string | undefined;
2152
+ } | undefined;
1992
2153
  } | undefined;
1993
- css?: string | undefined;
1994
- javascript?: string | undefined;
2154
+ messages?: {
2155
+ custom?: Record<string, any> | undefined;
2156
+ errors?: Record<string, any> | undefined;
2157
+ } | undefined;
2158
+ translations?: Record<string, any> | undefined;
1995
2159
  }>;
1996
2160
  export type FormInsert = z.input<typeof formInsertSchema>;
1997
2161
  declare const formSchema: z.ZodObject<{
1998
2162
  id: z.ZodString;
1999
2163
  name: z.ZodString;
2000
- type: z.ZodNativeEnum<typeof FormType>;
2001
- client_id: z.ZodOptional<z.ZodString>;
2002
- fields: z.ZodArray<z.ZodObject<{
2003
- id: z.ZodString;
2004
- name: z.ZodString;
2005
- type: z.ZodNativeEnum<typeof FormFieldType>;
2006
- label: z.ZodString;
2007
- placeholder: z.ZodOptional<z.ZodString>;
2008
- required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2009
- disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2010
- readOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2011
- defaultValue: z.ZodOptional<z.ZodUnion<[
2012
- z.ZodString,
2013
- z.ZodNumber,
2014
- z.ZodBoolean
2015
- ]>>;
2016
- validations: z.ZodOptional<z.ZodArray<z.ZodObject<{
2017
- type: z.ZodNativeEnum<typeof ValidationErrorType>;
2018
- message: z.ZodString;
2019
- min_length: z.ZodOptional<z.ZodNumber>;
2020
- max_length: z.ZodOptional<z.ZodNumber>;
2021
- min: z.ZodOptional<z.ZodNumber>;
2022
- max: z.ZodOptional<z.ZodNumber>;
2023
- pattern: z.ZodOptional<z.ZodString>;
2024
- format: z.ZodOptional<z.ZodString>;
2164
+ messages: z.ZodOptional<z.ZodObject<{
2165
+ errors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2166
+ custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2167
+ }, "strip", z.ZodTypeAny, {
2168
+ custom?: Record<string, any> | undefined;
2169
+ errors?: Record<string, any> | undefined;
2170
+ }, {
2171
+ custom?: Record<string, any> | undefined;
2172
+ errors?: Record<string, any> | undefined;
2173
+ }>>;
2174
+ languages: z.ZodOptional<z.ZodObject<{
2175
+ primary: z.ZodOptional<z.ZodString>;
2176
+ default: z.ZodOptional<z.ZodString>;
2177
+ }, "strip", z.ZodTypeAny, {
2178
+ default?: string | undefined;
2179
+ primary?: string | undefined;
2180
+ }, {
2181
+ default?: string | undefined;
2182
+ primary?: string | undefined;
2183
+ }>>;
2184
+ translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2185
+ nodes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [
2186
+ z.ZodObject<{
2187
+ id: z.ZodString;
2188
+ type: z.ZodLiteral<"FLOW">;
2189
+ coordinates: z.ZodObject<{
2190
+ x: z.ZodNumber;
2191
+ y: z.ZodNumber;
2192
+ }, "strip", z.ZodTypeAny, {
2193
+ x: number;
2194
+ y: number;
2195
+ }, {
2196
+ x: number;
2197
+ y: number;
2198
+ }>;
2199
+ alias: z.ZodOptional<z.ZodString>;
2200
+ config: z.ZodObject<{
2201
+ flow_id: z.ZodString;
2202
+ next_node: z.ZodString;
2203
+ }, "strip", z.ZodTypeAny, {
2204
+ next_node: string;
2205
+ flow_id: string;
2206
+ }, {
2207
+ next_node: string;
2208
+ flow_id: string;
2209
+ }>;
2025
2210
  }, "strip", z.ZodTypeAny, {
2026
- message: string;
2027
- type: ValidationErrorType;
2028
- format?: string | undefined;
2029
- pattern?: string | undefined;
2030
- min_length?: number | undefined;
2031
- max_length?: number | undefined;
2032
- min?: number | undefined;
2033
- max?: number | undefined;
2211
+ type: "FLOW";
2212
+ id: string;
2213
+ config: {
2214
+ next_node: string;
2215
+ flow_id: string;
2216
+ };
2217
+ coordinates: {
2218
+ x: number;
2219
+ y: number;
2220
+ };
2221
+ alias?: string | undefined;
2034
2222
  }, {
2035
- message: string;
2036
- type: ValidationErrorType;
2037
- format?: string | undefined;
2038
- pattern?: string | undefined;
2039
- min_length?: number | undefined;
2040
- max_length?: number | undefined;
2041
- min?: number | undefined;
2042
- max?: number | undefined;
2043
- }>, "many">>;
2044
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2045
- label: z.ZodString;
2223
+ type: "FLOW";
2224
+ id: string;
2225
+ config: {
2226
+ next_node: string;
2227
+ flow_id: string;
2228
+ };
2229
+ coordinates: {
2230
+ x: number;
2231
+ y: number;
2232
+ };
2233
+ alias?: string | undefined;
2234
+ }>,
2235
+ z.ZodObject<{
2236
+ id: z.ZodString;
2237
+ type: z.ZodLiteral<"ROUTER">;
2238
+ coordinates: z.ZodObject<{
2239
+ x: z.ZodNumber;
2240
+ y: z.ZodNumber;
2241
+ }, "strip", z.ZodTypeAny, {
2242
+ x: number;
2243
+ y: number;
2244
+ }, {
2245
+ x: number;
2246
+ y: number;
2247
+ }>;
2248
+ alias: z.ZodString;
2249
+ config: z.ZodObject<{
2250
+ rules: z.ZodArray<z.ZodObject<{
2251
+ id: z.ZodString;
2252
+ alias: z.ZodOptional<z.ZodString>;
2253
+ condition: z.ZodAny;
2254
+ next_node: z.ZodString;
2255
+ }, "strip", z.ZodTypeAny, {
2256
+ id: string;
2257
+ next_node: string;
2258
+ alias?: string | undefined;
2259
+ condition?: any;
2260
+ }, {
2261
+ id: string;
2262
+ next_node: string;
2263
+ alias?: string | undefined;
2264
+ condition?: any;
2265
+ }>, "many">;
2266
+ fallback: z.ZodArray<z.ZodString, "many">;
2267
+ }, "strip", z.ZodTypeAny, {
2268
+ rules: {
2269
+ id: string;
2270
+ next_node: string;
2271
+ alias?: string | undefined;
2272
+ condition?: any;
2273
+ }[];
2274
+ fallback: string[];
2275
+ }, {
2276
+ rules: {
2277
+ id: string;
2278
+ next_node: string;
2279
+ alias?: string | undefined;
2280
+ condition?: any;
2281
+ }[];
2282
+ fallback: string[];
2283
+ }>;
2284
+ }, "strip", z.ZodTypeAny, {
2285
+ type: "ROUTER";
2286
+ id: string;
2287
+ config: {
2288
+ rules: {
2289
+ id: string;
2290
+ next_node: string;
2291
+ alias?: string | undefined;
2292
+ condition?: any;
2293
+ }[];
2294
+ fallback: string[];
2295
+ };
2296
+ coordinates: {
2297
+ x: number;
2298
+ y: number;
2299
+ };
2300
+ alias: string;
2301
+ }, {
2302
+ type: "ROUTER";
2303
+ id: string;
2304
+ config: {
2305
+ rules: {
2306
+ id: string;
2307
+ next_node: string;
2308
+ alias?: string | undefined;
2309
+ condition?: any;
2310
+ }[];
2311
+ fallback: string[];
2312
+ };
2313
+ coordinates: {
2314
+ x: number;
2315
+ y: number;
2316
+ };
2317
+ alias: string;
2318
+ }>,
2319
+ z.ZodObject<{
2320
+ id: z.ZodString;
2321
+ type: z.ZodLiteral<"STEP">;
2322
+ coordinates: z.ZodObject<{
2323
+ x: z.ZodNumber;
2324
+ y: z.ZodNumber;
2325
+ }, "strip", z.ZodTypeAny, {
2326
+ x: number;
2327
+ y: number;
2328
+ }, {
2329
+ x: number;
2330
+ y: number;
2331
+ }>;
2332
+ alias: z.ZodOptional<z.ZodString>;
2333
+ config: z.ZodObject<{
2334
+ components: z.ZodArray<z.ZodAny, "many">;
2335
+ next_node: z.ZodString;
2336
+ }, "strip", z.ZodTypeAny, {
2337
+ components: any[];
2338
+ next_node: string;
2339
+ }, {
2340
+ components: any[];
2341
+ next_node: string;
2342
+ }>;
2343
+ }, "strip", z.ZodTypeAny, {
2344
+ type: "STEP";
2345
+ id: string;
2346
+ config: {
2347
+ components: any[];
2348
+ next_node: string;
2349
+ };
2350
+ coordinates: {
2351
+ x: number;
2352
+ y: number;
2353
+ };
2354
+ alias?: string | undefined;
2355
+ }, {
2356
+ type: "STEP";
2357
+ id: string;
2358
+ config: {
2359
+ components: any[];
2360
+ next_node: string;
2361
+ };
2362
+ coordinates: {
2363
+ x: number;
2364
+ y: number;
2365
+ };
2366
+ alias?: string | undefined;
2367
+ }>
2368
+ ]>, "many">>;
2369
+ start: z.ZodOptional<z.ZodObject<{
2370
+ hidden_fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2371
+ key: z.ZodString;
2046
2372
  value: z.ZodString;
2047
- checked: z.ZodOptional<z.ZodBoolean>;
2048
2373
  }, "strip", z.ZodTypeAny, {
2049
2374
  value: string;
2050
- label: string;
2051
- checked?: boolean | undefined;
2375
+ key: string;
2052
2376
  }, {
2053
2377
  value: string;
2054
- label: string;
2055
- checked?: boolean | undefined;
2378
+ key: string;
2056
2379
  }>, "many">>;
2057
- description: z.ZodOptional<z.ZodString>;
2058
- order: z.ZodOptional<z.ZodNumber>;
2059
- visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2060
- customizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2380
+ next_node: z.ZodOptional<z.ZodString>;
2381
+ coordinates: z.ZodOptional<z.ZodObject<{
2382
+ x: z.ZodNumber;
2383
+ y: z.ZodNumber;
2384
+ }, "strip", z.ZodTypeAny, {
2385
+ x: number;
2386
+ y: number;
2387
+ }, {
2388
+ x: number;
2389
+ y: number;
2390
+ }>>;
2061
2391
  }, "strip", z.ZodTypeAny, {
2062
- type: FormFieldType;
2063
- readOnly: boolean;
2064
- required: boolean;
2065
- name: string;
2066
- id: string;
2067
- disabled: boolean;
2068
- label: string;
2069
- visible: boolean;
2070
- options?: {
2392
+ coordinates?: {
2393
+ x: number;
2394
+ y: number;
2395
+ } | undefined;
2396
+ next_node?: string | undefined;
2397
+ hidden_fields?: {
2071
2398
  value: string;
2072
- label: string;
2073
- checked?: boolean | undefined;
2074
- }[] | undefined;
2075
- description?: string | undefined;
2076
- placeholder?: string | undefined;
2077
- defaultValue?: string | number | boolean | undefined;
2078
- validations?: {
2079
- message: string;
2080
- type: ValidationErrorType;
2081
- format?: string | undefined;
2082
- pattern?: string | undefined;
2083
- min_length?: number | undefined;
2084
- max_length?: number | undefined;
2085
- min?: number | undefined;
2086
- max?: number | undefined;
2399
+ key: string;
2087
2400
  }[] | undefined;
2088
- order?: number | undefined;
2089
- customizations?: Record<string, any> | undefined;
2090
2401
  }, {
2091
- type: FormFieldType;
2092
- name: string;
2093
- id: string;
2094
- label: string;
2095
- options?: {
2402
+ coordinates?: {
2403
+ x: number;
2404
+ y: number;
2405
+ } | undefined;
2406
+ next_node?: string | undefined;
2407
+ hidden_fields?: {
2096
2408
  value: string;
2097
- label: string;
2098
- checked?: boolean | undefined;
2409
+ key: string;
2099
2410
  }[] | undefined;
2100
- readOnly?: boolean | undefined;
2101
- description?: string | undefined;
2102
- required?: boolean | undefined;
2103
- disabled?: boolean | undefined;
2104
- placeholder?: string | undefined;
2105
- defaultValue?: string | number | boolean | undefined;
2106
- validations?: {
2107
- message: string;
2108
- type: ValidationErrorType;
2109
- format?: string | undefined;
2110
- pattern?: string | undefined;
2111
- min_length?: number | undefined;
2112
- max_length?: number | undefined;
2113
- min?: number | undefined;
2114
- max?: number | undefined;
2115
- }[] | undefined;
2116
- order?: number | undefined;
2117
- visible?: boolean | undefined;
2118
- customizations?: Record<string, any> | undefined;
2119
- }>, "many">;
2120
- controls: z.ZodOptional<z.ZodArray<z.ZodObject<{
2121
- id: z.ZodString;
2122
- type: z.ZodLiteral<"submit">;
2123
- label: z.ZodString;
2124
- className: z.ZodOptional<z.ZodString>;
2125
- disabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2126
- order: z.ZodOptional<z.ZodNumber>;
2127
- visible: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2128
- customizations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2411
+ }>>;
2412
+ ending: z.ZodOptional<z.ZodObject<{
2413
+ redirection: z.ZodOptional<z.ZodObject<{
2414
+ delay: z.ZodOptional<z.ZodNumber>;
2415
+ target: z.ZodOptional<z.ZodString>;
2416
+ }, "strip", z.ZodTypeAny, {
2417
+ delay?: number | undefined;
2418
+ target?: string | undefined;
2419
+ }, {
2420
+ delay?: number | undefined;
2421
+ target?: string | undefined;
2422
+ }>>;
2423
+ after_submit: z.ZodOptional<z.ZodObject<{
2424
+ flow_id: z.ZodOptional<z.ZodString>;
2425
+ }, "strip", z.ZodTypeAny, {
2426
+ flow_id?: string | undefined;
2427
+ }, {
2428
+ flow_id?: string | undefined;
2429
+ }>>;
2430
+ coordinates: z.ZodOptional<z.ZodObject<{
2431
+ x: z.ZodNumber;
2432
+ y: z.ZodNumber;
2433
+ }, "strip", z.ZodTypeAny, {
2434
+ x: number;
2435
+ y: number;
2436
+ }, {
2437
+ x: number;
2438
+ y: number;
2439
+ }>>;
2440
+ resume_flow: z.ZodOptional<z.ZodBoolean>;
2129
2441
  }, "strip", z.ZodTypeAny, {
2130
- type: "submit";
2131
- id: string;
2132
- disabled: boolean;
2133
- label: string;
2134
- visible: boolean;
2135
- order?: number | undefined;
2136
- customizations?: Record<string, any> | undefined;
2137
- className?: string | undefined;
2442
+ coordinates?: {
2443
+ x: number;
2444
+ y: number;
2445
+ } | undefined;
2446
+ resume_flow?: boolean | undefined;
2447
+ redirection?: {
2448
+ delay?: number | undefined;
2449
+ target?: string | undefined;
2450
+ } | undefined;
2451
+ after_submit?: {
2452
+ flow_id?: string | undefined;
2453
+ } | undefined;
2138
2454
  }, {
2139
- type: "submit";
2140
- id: string;
2141
- label: string;
2142
- disabled?: boolean | undefined;
2143
- order?: number | undefined;
2144
- visible?: boolean | undefined;
2145
- customizations?: Record<string, any> | undefined;
2146
- className?: string | undefined;
2147
- }>, "many">>;
2148
- redirect_uri: z.ZodOptional<z.ZodString>;
2149
- post_submit_action: z.ZodOptional<z.ZodEnum<[
2150
- "redirect",
2151
- "message"
2152
- ]>>;
2153
- success_message: z.ZodOptional<z.ZodString>;
2154
- language: z.ZodOptional<z.ZodString>;
2155
- active: z.ZodDefault<z.ZodBoolean>;
2156
- layout: z.ZodOptional<z.ZodObject<{
2157
- columns: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2158
- template: z.ZodOptional<z.ZodString>;
2455
+ coordinates?: {
2456
+ x: number;
2457
+ y: number;
2458
+ } | undefined;
2459
+ resume_flow?: boolean | undefined;
2460
+ redirection?: {
2461
+ delay?: number | undefined;
2462
+ target?: string | undefined;
2463
+ } | undefined;
2464
+ after_submit?: {
2465
+ flow_id?: string | undefined;
2466
+ } | undefined;
2467
+ }>>;
2468
+ style: z.ZodOptional<z.ZodObject<{
2469
+ css: z.ZodOptional<z.ZodString>;
2159
2470
  }, "strip", z.ZodTypeAny, {
2160
- columns: number;
2161
- template?: string | undefined;
2471
+ css?: string | undefined;
2162
2472
  }, {
2163
- columns?: number | undefined;
2164
- template?: string | undefined;
2473
+ css?: string | undefined;
2165
2474
  }>>;
2166
- css: z.ZodOptional<z.ZodString>;
2167
- javascript: z.ZodOptional<z.ZodString>;
2168
2475
  created_at: z.ZodString;
2169
2476
  updated_at: z.ZodString;
2170
2477
  }, "strip", z.ZodTypeAny, {
2171
- type: FormType;
2172
2478
  created_at: string;
2173
2479
  updated_at: string;
2174
2480
  name: string;
2175
2481
  id: string;
2176
- fields: {
2177
- type: FormFieldType;
2178
- readOnly: boolean;
2179
- required: boolean;
2180
- name: string;
2181
- id: string;
2182
- disabled: boolean;
2183
- label: string;
2184
- visible: boolean;
2185
- options?: {
2482
+ start?: {
2483
+ coordinates?: {
2484
+ x: number;
2485
+ y: number;
2486
+ } | undefined;
2487
+ next_node?: string | undefined;
2488
+ hidden_fields?: {
2186
2489
  value: string;
2187
- label: string;
2188
- checked?: boolean | undefined;
2189
- }[] | undefined;
2190
- description?: string | undefined;
2191
- placeholder?: string | undefined;
2192
- defaultValue?: string | number | boolean | undefined;
2193
- validations?: {
2194
- message: string;
2195
- type: ValidationErrorType;
2196
- format?: string | undefined;
2197
- pattern?: string | undefined;
2198
- min_length?: number | undefined;
2199
- max_length?: number | undefined;
2200
- min?: number | undefined;
2201
- max?: number | undefined;
2490
+ key: string;
2202
2491
  }[] | undefined;
2203
- order?: number | undefined;
2204
- customizations?: Record<string, any> | undefined;
2205
- }[];
2206
- active: boolean;
2207
- client_id?: string | undefined;
2208
- redirect_uri?: string | undefined;
2209
- language?: string | undefined;
2210
- controls?: {
2211
- type: "submit";
2492
+ } | undefined;
2493
+ style?: {
2494
+ css?: string | undefined;
2495
+ } | undefined;
2496
+ languages?: {
2497
+ default?: string | undefined;
2498
+ primary?: string | undefined;
2499
+ } | undefined;
2500
+ nodes?: ({
2501
+ type: "FLOW";
2212
2502
  id: string;
2213
- disabled: boolean;
2214
- label: string;
2215
- visible: boolean;
2216
- order?: number | undefined;
2217
- customizations?: Record<string, any> | undefined;
2218
- className?: string | undefined;
2219
- }[] | undefined;
2220
- post_submit_action?: "message" | "redirect" | undefined;
2221
- success_message?: string | undefined;
2222
- layout?: {
2223
- columns: number;
2224
- template?: string | undefined;
2503
+ config: {
2504
+ next_node: string;
2505
+ flow_id: string;
2506
+ };
2507
+ coordinates: {
2508
+ x: number;
2509
+ y: number;
2510
+ };
2511
+ alias?: string | undefined;
2512
+ } | {
2513
+ type: "ROUTER";
2514
+ id: string;
2515
+ config: {
2516
+ rules: {
2517
+ id: string;
2518
+ next_node: string;
2519
+ alias?: string | undefined;
2520
+ condition?: any;
2521
+ }[];
2522
+ fallback: string[];
2523
+ };
2524
+ coordinates: {
2525
+ x: number;
2526
+ y: number;
2527
+ };
2528
+ alias: string;
2529
+ } | {
2530
+ type: "STEP";
2531
+ id: string;
2532
+ config: {
2533
+ components: any[];
2534
+ next_node: string;
2535
+ };
2536
+ coordinates: {
2537
+ x: number;
2538
+ y: number;
2539
+ };
2540
+ alias?: string | undefined;
2541
+ })[] | undefined;
2542
+ ending?: {
2543
+ coordinates?: {
2544
+ x: number;
2545
+ y: number;
2546
+ } | undefined;
2547
+ resume_flow?: boolean | undefined;
2548
+ redirection?: {
2549
+ delay?: number | undefined;
2550
+ target?: string | undefined;
2551
+ } | undefined;
2552
+ after_submit?: {
2553
+ flow_id?: string | undefined;
2554
+ } | undefined;
2555
+ } | undefined;
2556
+ messages?: {
2557
+ custom?: Record<string, any> | undefined;
2558
+ errors?: Record<string, any> | undefined;
2225
2559
  } | undefined;
2226
- css?: string | undefined;
2227
- javascript?: string | undefined;
2560
+ translations?: Record<string, any> | undefined;
2228
2561
  }, {
2229
- type: FormType;
2230
2562
  created_at: string;
2231
2563
  updated_at: string;
2232
2564
  name: string;
2233
2565
  id: string;
2234
- fields: {
2235
- type: FormFieldType;
2236
- name: string;
2237
- id: string;
2238
- label: string;
2239
- options?: {
2566
+ start?: {
2567
+ coordinates?: {
2568
+ x: number;
2569
+ y: number;
2570
+ } | undefined;
2571
+ next_node?: string | undefined;
2572
+ hidden_fields?: {
2240
2573
  value: string;
2241
- label: string;
2242
- checked?: boolean | undefined;
2243
- }[] | undefined;
2244
- readOnly?: boolean | undefined;
2245
- description?: string | undefined;
2246
- required?: boolean | undefined;
2247
- disabled?: boolean | undefined;
2248
- placeholder?: string | undefined;
2249
- defaultValue?: string | number | boolean | undefined;
2250
- validations?: {
2251
- message: string;
2252
- type: ValidationErrorType;
2253
- format?: string | undefined;
2254
- pattern?: string | undefined;
2255
- min_length?: number | undefined;
2256
- max_length?: number | undefined;
2257
- min?: number | undefined;
2258
- max?: number | undefined;
2574
+ key: string;
2259
2575
  }[] | undefined;
2260
- order?: number | undefined;
2261
- visible?: boolean | undefined;
2262
- customizations?: Record<string, any> | undefined;
2263
- }[];
2264
- client_id?: string | undefined;
2265
- redirect_uri?: string | undefined;
2266
- language?: string | undefined;
2267
- controls?: {
2268
- type: "submit";
2576
+ } | undefined;
2577
+ style?: {
2578
+ css?: string | undefined;
2579
+ } | undefined;
2580
+ languages?: {
2581
+ default?: string | undefined;
2582
+ primary?: string | undefined;
2583
+ } | undefined;
2584
+ nodes?: ({
2585
+ type: "FLOW";
2269
2586
  id: string;
2270
- label: string;
2271
- disabled?: boolean | undefined;
2272
- order?: number | undefined;
2273
- visible?: boolean | undefined;
2274
- customizations?: Record<string, any> | undefined;
2275
- className?: string | undefined;
2276
- }[] | undefined;
2277
- post_submit_action?: "message" | "redirect" | undefined;
2278
- success_message?: string | undefined;
2279
- active?: boolean | undefined;
2280
- layout?: {
2281
- columns?: number | undefined;
2282
- template?: string | undefined;
2587
+ config: {
2588
+ next_node: string;
2589
+ flow_id: string;
2590
+ };
2591
+ coordinates: {
2592
+ x: number;
2593
+ y: number;
2594
+ };
2595
+ alias?: string | undefined;
2596
+ } | {
2597
+ type: "ROUTER";
2598
+ id: string;
2599
+ config: {
2600
+ rules: {
2601
+ id: string;
2602
+ next_node: string;
2603
+ alias?: string | undefined;
2604
+ condition?: any;
2605
+ }[];
2606
+ fallback: string[];
2607
+ };
2608
+ coordinates: {
2609
+ x: number;
2610
+ y: number;
2611
+ };
2612
+ alias: string;
2613
+ } | {
2614
+ type: "STEP";
2615
+ id: string;
2616
+ config: {
2617
+ components: any[];
2618
+ next_node: string;
2619
+ };
2620
+ coordinates: {
2621
+ x: number;
2622
+ y: number;
2623
+ };
2624
+ alias?: string | undefined;
2625
+ })[] | undefined;
2626
+ ending?: {
2627
+ coordinates?: {
2628
+ x: number;
2629
+ y: number;
2630
+ } | undefined;
2631
+ resume_flow?: boolean | undefined;
2632
+ redirection?: {
2633
+ delay?: number | undefined;
2634
+ target?: string | undefined;
2635
+ } | undefined;
2636
+ after_submit?: {
2637
+ flow_id?: string | undefined;
2638
+ } | undefined;
2639
+ } | undefined;
2640
+ messages?: {
2641
+ custom?: Record<string, any> | undefined;
2642
+ errors?: Record<string, any> | undefined;
2283
2643
  } | undefined;
2284
- css?: string | undefined;
2285
- javascript?: string | undefined;
2644
+ translations?: Record<string, any> | undefined;
2286
2645
  }>;
2287
2646
  export type Form = z.infer<typeof formSchema>;
2288
2647
  declare const hookInsertSchema: z.ZodObject<{
@@ -4913,61 +5272,83 @@ declare const sqlCustomDomainSchema: z.ZodObject<{
4913
5272
  }>;
4914
5273
  declare const sqlFormSchema: z.ZodObject<{
4915
5274
  tenant_id: z.ZodString;
4916
- fields: z.ZodString;
4917
- controls: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4918
- layout: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4919
- active: z.ZodNumber;
5275
+ nodes: z.ZodDefault<z.ZodOptional<z.ZodString>>;
5276
+ start: z.ZodDefault<z.ZodOptional<z.ZodString>>;
5277
+ ending: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4920
5278
  id: z.ZodString;
4921
5279
  name: z.ZodString;
4922
- type: z.ZodNativeEnum<typeof FormType>;
4923
- client_id: z.ZodOptional<z.ZodString>;
4924
- redirect_uri: z.ZodOptional<z.ZodString>;
4925
- post_submit_action: z.ZodOptional<z.ZodEnum<[
4926
- "redirect",
4927
- "message"
4928
- ]>>;
4929
- success_message: z.ZodOptional<z.ZodString>;
4930
- language: z.ZodOptional<z.ZodString>;
4931
- css: z.ZodOptional<z.ZodString>;
4932
- javascript: z.ZodOptional<z.ZodString>;
5280
+ messages: z.ZodOptional<z.ZodObject<{
5281
+ errors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5282
+ custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5283
+ }, "strip", z.ZodTypeAny, {
5284
+ custom?: Record<string, any> | undefined;
5285
+ errors?: Record<string, any> | undefined;
5286
+ }, {
5287
+ custom?: Record<string, any> | undefined;
5288
+ errors?: Record<string, any> | undefined;
5289
+ }>>;
5290
+ languages: z.ZodOptional<z.ZodObject<{
5291
+ primary: z.ZodOptional<z.ZodString>;
5292
+ default: z.ZodOptional<z.ZodString>;
5293
+ }, "strip", z.ZodTypeAny, {
5294
+ default?: string | undefined;
5295
+ primary?: string | undefined;
5296
+ }, {
5297
+ default?: string | undefined;
5298
+ primary?: string | undefined;
5299
+ }>>;
5300
+ translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
5301
+ style: z.ZodOptional<z.ZodObject<{
5302
+ css: z.ZodOptional<z.ZodString>;
5303
+ }, "strip", z.ZodTypeAny, {
5304
+ css?: string | undefined;
5305
+ }, {
5306
+ css?: string | undefined;
5307
+ }>>;
4933
5308
  created_at: z.ZodString;
4934
5309
  updated_at: z.ZodString;
4935
5310
  }, "strip", z.ZodTypeAny, {
4936
- type: FormType;
4937
5311
  tenant_id: string;
4938
5312
  id: string;
4939
5313
  name: string;
4940
5314
  created_at: string;
4941
5315
  updated_at: string;
4942
- fields: string;
4943
- controls: string;
4944
- layout: string;
4945
- active: number;
4946
- client_id?: string | undefined;
4947
- redirect_uri?: string | undefined;
4948
- post_submit_action?: "message" | "redirect" | undefined;
4949
- success_message?: string | undefined;
4950
- language?: string | undefined;
4951
- css?: string | undefined;
4952
- javascript?: string | undefined;
5316
+ nodes: string;
5317
+ start: string;
5318
+ ending: string;
5319
+ messages?: {
5320
+ custom?: Record<string, any> | undefined;
5321
+ errors?: Record<string, any> | undefined;
5322
+ } | undefined;
5323
+ languages?: {
5324
+ default?: string | undefined;
5325
+ primary?: string | undefined;
5326
+ } | undefined;
5327
+ translations?: Record<string, any> | undefined;
5328
+ style?: {
5329
+ css?: string | undefined;
5330
+ } | undefined;
4953
5331
  }, {
4954
- type: FormType;
4955
5332
  tenant_id: string;
4956
5333
  id: string;
4957
5334
  name: string;
4958
5335
  created_at: string;
4959
5336
  updated_at: string;
4960
- fields: string;
4961
- active: number;
4962
- client_id?: string | undefined;
4963
- controls?: string | undefined;
4964
- layout?: string | undefined;
4965
- redirect_uri?: string | undefined;
4966
- post_submit_action?: "message" | "redirect" | undefined;
4967
- success_message?: string | undefined;
4968
- language?: string | undefined;
4969
- css?: string | undefined;
4970
- javascript?: string | undefined;
5337
+ nodes?: string | undefined;
5338
+ start?: string | undefined;
5339
+ ending?: string | undefined;
5340
+ messages?: {
5341
+ custom?: Record<string, any> | undefined;
5342
+ errors?: Record<string, any> | undefined;
5343
+ } | undefined;
5344
+ languages?: {
5345
+ default?: string | undefined;
5346
+ primary?: string | undefined;
5347
+ } | undefined;
5348
+ translations?: Record<string, any> | undefined;
5349
+ style?: {
5350
+ css?: string | undefined;
5351
+ } | undefined;
4971
5352
  }>;
4972
5353
  export interface Database {
4973
5354
  applications: z.infer<typeof sqlApplicationSchema>;