@voyantjs/crm 0.26.2 → 0.26.4
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/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/routes/customer-signals.d.ts +281 -0
- package/dist/routes/customer-signals.d.ts.map +1 -0
- package/dist/routes/customer-signals.js +45 -0
- package/dist/routes/index.d.ts +450 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/routes/person-relationships.d.ts +189 -0
- package/dist/routes/person-relationships.d.ts.map +1 -0
- package/dist/routes/person-relationships.js +36 -0
- package/dist/schema-accounts.d.ts +237 -0
- package/dist/schema-accounts.d.ts.map +1 -1
- package/dist/schema-accounts.js +64 -1
- package/dist/schema-signals.d.ts +324 -0
- package/dist/schema-signals.d.ts.map +1 -0
- package/dist/schema-signals.js +80 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -0
- package/dist/service/customer-signals.d.ts +733 -0
- package/dist/service/customer-signals.d.ts.map +1 -0
- package/dist/service/customer-signals.js +112 -0
- package/dist/service/index.d.ts +1187 -0
- package/dist/service/index.d.ts.map +1 -1
- package/dist/service/index.js +6 -0
- package/dist/service/person-relationships.d.ts +502 -0
- package/dist/service/person-relationships.d.ts.map +1 -0
- package/dist/service/person-relationships.js +121 -0
- package/dist/validation.d.ts +246 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +98 -0
- package/package.json +6 -6
package/dist/routes/index.d.ts
CHANGED
|
@@ -1796,6 +1796,456 @@ export declare const crmRoutes: import("hono/hono-base").HonoBase<Env, import("h
|
|
|
1796
1796
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1797
1797
|
};
|
|
1798
1798
|
};
|
|
1799
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
1800
|
+
"/people/:id/relationships": {
|
|
1801
|
+
$get: {
|
|
1802
|
+
input: {
|
|
1803
|
+
param: {
|
|
1804
|
+
id: string;
|
|
1805
|
+
};
|
|
1806
|
+
};
|
|
1807
|
+
output: {
|
|
1808
|
+
data: {
|
|
1809
|
+
id: string;
|
|
1810
|
+
fromPersonId: string;
|
|
1811
|
+
toPersonId: string;
|
|
1812
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
1813
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
1814
|
+
startDate: string | null;
|
|
1815
|
+
endDate: string | null;
|
|
1816
|
+
isPrimary: boolean;
|
|
1817
|
+
notes: string | null;
|
|
1818
|
+
metadata: {
|
|
1819
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
1820
|
+
} | null;
|
|
1821
|
+
createdAt: string;
|
|
1822
|
+
updatedAt: string;
|
|
1823
|
+
}[];
|
|
1824
|
+
};
|
|
1825
|
+
outputFormat: "json";
|
|
1826
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
} & {
|
|
1830
|
+
"/people/:id/relationships": {
|
|
1831
|
+
$post: {
|
|
1832
|
+
input: {
|
|
1833
|
+
param: {
|
|
1834
|
+
id: string;
|
|
1835
|
+
};
|
|
1836
|
+
};
|
|
1837
|
+
output: {
|
|
1838
|
+
error: string;
|
|
1839
|
+
};
|
|
1840
|
+
outputFormat: "json";
|
|
1841
|
+
status: 400;
|
|
1842
|
+
} | {
|
|
1843
|
+
input: {
|
|
1844
|
+
param: {
|
|
1845
|
+
id: string;
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
output: {
|
|
1849
|
+
data: {
|
|
1850
|
+
metadata: {
|
|
1851
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
1852
|
+
} | null;
|
|
1853
|
+
id: string;
|
|
1854
|
+
createdAt: string;
|
|
1855
|
+
updatedAt: string;
|
|
1856
|
+
startDate: string | null;
|
|
1857
|
+
endDate: string | null;
|
|
1858
|
+
notes: string | null;
|
|
1859
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
1860
|
+
isPrimary: boolean;
|
|
1861
|
+
fromPersonId: string;
|
|
1862
|
+
toPersonId: string;
|
|
1863
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
1864
|
+
};
|
|
1865
|
+
};
|
|
1866
|
+
outputFormat: "json";
|
|
1867
|
+
status: 201;
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
} & {
|
|
1871
|
+
"/person-relationships/:id": {
|
|
1872
|
+
$get: {
|
|
1873
|
+
input: {
|
|
1874
|
+
param: {
|
|
1875
|
+
id: string;
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
output: {
|
|
1879
|
+
error: string;
|
|
1880
|
+
};
|
|
1881
|
+
outputFormat: "json";
|
|
1882
|
+
status: 404;
|
|
1883
|
+
} | {
|
|
1884
|
+
input: {
|
|
1885
|
+
param: {
|
|
1886
|
+
id: string;
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
output: {
|
|
1890
|
+
data: {
|
|
1891
|
+
id: string;
|
|
1892
|
+
fromPersonId: string;
|
|
1893
|
+
toPersonId: string;
|
|
1894
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
1895
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
1896
|
+
startDate: string | null;
|
|
1897
|
+
endDate: string | null;
|
|
1898
|
+
isPrimary: boolean;
|
|
1899
|
+
notes: string | null;
|
|
1900
|
+
metadata: {
|
|
1901
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
1902
|
+
} | null;
|
|
1903
|
+
createdAt: string;
|
|
1904
|
+
updatedAt: string;
|
|
1905
|
+
};
|
|
1906
|
+
};
|
|
1907
|
+
outputFormat: "json";
|
|
1908
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1909
|
+
};
|
|
1910
|
+
};
|
|
1911
|
+
} & {
|
|
1912
|
+
"/person-relationships/:id": {
|
|
1913
|
+
$patch: {
|
|
1914
|
+
input: {
|
|
1915
|
+
param: {
|
|
1916
|
+
id: string;
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
output: {
|
|
1920
|
+
error: string;
|
|
1921
|
+
};
|
|
1922
|
+
outputFormat: "json";
|
|
1923
|
+
status: 404;
|
|
1924
|
+
} | {
|
|
1925
|
+
input: {
|
|
1926
|
+
param: {
|
|
1927
|
+
id: string;
|
|
1928
|
+
};
|
|
1929
|
+
};
|
|
1930
|
+
output: {
|
|
1931
|
+
data: {
|
|
1932
|
+
id: string;
|
|
1933
|
+
fromPersonId: string;
|
|
1934
|
+
toPersonId: string;
|
|
1935
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
1936
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
1937
|
+
startDate: string | null;
|
|
1938
|
+
endDate: string | null;
|
|
1939
|
+
isPrimary: boolean;
|
|
1940
|
+
notes: string | null;
|
|
1941
|
+
metadata: {
|
|
1942
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
1943
|
+
} | null;
|
|
1944
|
+
createdAt: string;
|
|
1945
|
+
updatedAt: string;
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
outputFormat: "json";
|
|
1949
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1950
|
+
};
|
|
1951
|
+
};
|
|
1952
|
+
} & {
|
|
1953
|
+
"/person-relationships/:id": {
|
|
1954
|
+
$delete: {
|
|
1955
|
+
input: {
|
|
1956
|
+
param: {
|
|
1957
|
+
id: string;
|
|
1958
|
+
};
|
|
1959
|
+
};
|
|
1960
|
+
output: {
|
|
1961
|
+
error: string;
|
|
1962
|
+
};
|
|
1963
|
+
outputFormat: "json";
|
|
1964
|
+
status: 404;
|
|
1965
|
+
} | {
|
|
1966
|
+
input: {
|
|
1967
|
+
param: {
|
|
1968
|
+
id: string;
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1971
|
+
output: {
|
|
1972
|
+
success: true;
|
|
1973
|
+
};
|
|
1974
|
+
outputFormat: "json";
|
|
1975
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
1979
|
+
"/customer-signals": {
|
|
1980
|
+
$get: {
|
|
1981
|
+
input: {};
|
|
1982
|
+
output: {
|
|
1983
|
+
data: {
|
|
1984
|
+
id: string;
|
|
1985
|
+
personId: string;
|
|
1986
|
+
productId: string | null;
|
|
1987
|
+
optionUnitId: string | null;
|
|
1988
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
1989
|
+
source: "admin" | "form" | "phone" | "website" | "abandoned_cart" | "booking";
|
|
1990
|
+
status: "lost" | "expired" | "new" | "contacted" | "qualified" | "converted";
|
|
1991
|
+
priority: string;
|
|
1992
|
+
notes: string | null;
|
|
1993
|
+
tags: string[];
|
|
1994
|
+
assignedToUserId: string | null;
|
|
1995
|
+
followUpAt: string | null;
|
|
1996
|
+
resolvedBookingId: string | null;
|
|
1997
|
+
sourceSubmissionId: string | null;
|
|
1998
|
+
metadata: {
|
|
1999
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2000
|
+
} | null;
|
|
2001
|
+
createdAt: string;
|
|
2002
|
+
updatedAt: string;
|
|
2003
|
+
}[];
|
|
2004
|
+
total: number;
|
|
2005
|
+
limit: number;
|
|
2006
|
+
offset: number;
|
|
2007
|
+
};
|
|
2008
|
+
outputFormat: "json";
|
|
2009
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
} & {
|
|
2013
|
+
"/customer-signals": {
|
|
2014
|
+
$post: {
|
|
2015
|
+
input: {};
|
|
2016
|
+
output: {
|
|
2017
|
+
error: string;
|
|
2018
|
+
};
|
|
2019
|
+
outputFormat: "json";
|
|
2020
|
+
status: 404;
|
|
2021
|
+
} | {
|
|
2022
|
+
input: {};
|
|
2023
|
+
output: {
|
|
2024
|
+
data: {
|
|
2025
|
+
source: "admin" | "form" | "phone" | "website" | "abandoned_cart" | "booking";
|
|
2026
|
+
metadata: {
|
|
2027
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2028
|
+
} | null;
|
|
2029
|
+
id: string;
|
|
2030
|
+
createdAt: string;
|
|
2031
|
+
updatedAt: string;
|
|
2032
|
+
status: "lost" | "expired" | "new" | "contacted" | "qualified" | "converted";
|
|
2033
|
+
notes: string | null;
|
|
2034
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
2035
|
+
tags: string[];
|
|
2036
|
+
personId: string;
|
|
2037
|
+
productId: string | null;
|
|
2038
|
+
optionUnitId: string | null;
|
|
2039
|
+
priority: string;
|
|
2040
|
+
assignedToUserId: string | null;
|
|
2041
|
+
followUpAt: string | null;
|
|
2042
|
+
resolvedBookingId: string | null;
|
|
2043
|
+
sourceSubmissionId: string | null;
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
outputFormat: "json";
|
|
2047
|
+
status: 201;
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
} & {
|
|
2051
|
+
"/customer-signals/:id": {
|
|
2052
|
+
$get: {
|
|
2053
|
+
input: {
|
|
2054
|
+
param: {
|
|
2055
|
+
id: string;
|
|
2056
|
+
};
|
|
2057
|
+
};
|
|
2058
|
+
output: {
|
|
2059
|
+
error: string;
|
|
2060
|
+
};
|
|
2061
|
+
outputFormat: "json";
|
|
2062
|
+
status: 404;
|
|
2063
|
+
} | {
|
|
2064
|
+
input: {
|
|
2065
|
+
param: {
|
|
2066
|
+
id: string;
|
|
2067
|
+
};
|
|
2068
|
+
};
|
|
2069
|
+
output: {
|
|
2070
|
+
data: {
|
|
2071
|
+
id: string;
|
|
2072
|
+
personId: string;
|
|
2073
|
+
productId: string | null;
|
|
2074
|
+
optionUnitId: string | null;
|
|
2075
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
2076
|
+
source: "admin" | "form" | "phone" | "website" | "abandoned_cart" | "booking";
|
|
2077
|
+
status: "lost" | "expired" | "new" | "contacted" | "qualified" | "converted";
|
|
2078
|
+
priority: string;
|
|
2079
|
+
notes: string | null;
|
|
2080
|
+
tags: string[];
|
|
2081
|
+
assignedToUserId: string | null;
|
|
2082
|
+
followUpAt: string | null;
|
|
2083
|
+
resolvedBookingId: string | null;
|
|
2084
|
+
sourceSubmissionId: string | null;
|
|
2085
|
+
metadata: {
|
|
2086
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2087
|
+
} | null;
|
|
2088
|
+
createdAt: string;
|
|
2089
|
+
updatedAt: string;
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
outputFormat: "json";
|
|
2093
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
} & {
|
|
2097
|
+
"/customer-signals/:id": {
|
|
2098
|
+
$patch: {
|
|
2099
|
+
input: {
|
|
2100
|
+
param: {
|
|
2101
|
+
id: string;
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
2104
|
+
output: {
|
|
2105
|
+
error: string;
|
|
2106
|
+
};
|
|
2107
|
+
outputFormat: "json";
|
|
2108
|
+
status: 404;
|
|
2109
|
+
} | {
|
|
2110
|
+
input: {
|
|
2111
|
+
param: {
|
|
2112
|
+
id: string;
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
output: {
|
|
2116
|
+
data: {
|
|
2117
|
+
id: string;
|
|
2118
|
+
personId: string;
|
|
2119
|
+
productId: string | null;
|
|
2120
|
+
optionUnitId: string | null;
|
|
2121
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
2122
|
+
source: "admin" | "form" | "phone" | "website" | "abandoned_cart" | "booking";
|
|
2123
|
+
status: "lost" | "expired" | "new" | "contacted" | "qualified" | "converted";
|
|
2124
|
+
priority: string;
|
|
2125
|
+
notes: string | null;
|
|
2126
|
+
tags: string[];
|
|
2127
|
+
assignedToUserId: string | null;
|
|
2128
|
+
followUpAt: string | null;
|
|
2129
|
+
resolvedBookingId: string | null;
|
|
2130
|
+
sourceSubmissionId: string | null;
|
|
2131
|
+
metadata: {
|
|
2132
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2133
|
+
} | null;
|
|
2134
|
+
createdAt: string;
|
|
2135
|
+
updatedAt: string;
|
|
2136
|
+
};
|
|
2137
|
+
};
|
|
2138
|
+
outputFormat: "json";
|
|
2139
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
} & {
|
|
2143
|
+
"/customer-signals/:id": {
|
|
2144
|
+
$delete: {
|
|
2145
|
+
input: {
|
|
2146
|
+
param: {
|
|
2147
|
+
id: string;
|
|
2148
|
+
};
|
|
2149
|
+
};
|
|
2150
|
+
output: {
|
|
2151
|
+
error: string;
|
|
2152
|
+
};
|
|
2153
|
+
outputFormat: "json";
|
|
2154
|
+
status: 404;
|
|
2155
|
+
} | {
|
|
2156
|
+
input: {
|
|
2157
|
+
param: {
|
|
2158
|
+
id: string;
|
|
2159
|
+
};
|
|
2160
|
+
};
|
|
2161
|
+
output: {
|
|
2162
|
+
success: true;
|
|
2163
|
+
};
|
|
2164
|
+
outputFormat: "json";
|
|
2165
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
2168
|
+
} & {
|
|
2169
|
+
"/customer-signals/:id/resolve": {
|
|
2170
|
+
$post: {
|
|
2171
|
+
input: {
|
|
2172
|
+
param: {
|
|
2173
|
+
id: string;
|
|
2174
|
+
};
|
|
2175
|
+
};
|
|
2176
|
+
output: {
|
|
2177
|
+
error: string;
|
|
2178
|
+
};
|
|
2179
|
+
outputFormat: "json";
|
|
2180
|
+
status: 404;
|
|
2181
|
+
} | {
|
|
2182
|
+
input: {
|
|
2183
|
+
param: {
|
|
2184
|
+
id: string;
|
|
2185
|
+
};
|
|
2186
|
+
};
|
|
2187
|
+
output: {
|
|
2188
|
+
data: {
|
|
2189
|
+
id: string;
|
|
2190
|
+
personId: string;
|
|
2191
|
+
productId: string | null;
|
|
2192
|
+
optionUnitId: string | null;
|
|
2193
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
2194
|
+
source: "admin" | "form" | "phone" | "website" | "abandoned_cart" | "booking";
|
|
2195
|
+
status: "lost" | "expired" | "new" | "contacted" | "qualified" | "converted";
|
|
2196
|
+
priority: string;
|
|
2197
|
+
notes: string | null;
|
|
2198
|
+
tags: string[];
|
|
2199
|
+
assignedToUserId: string | null;
|
|
2200
|
+
followUpAt: string | null;
|
|
2201
|
+
resolvedBookingId: string | null;
|
|
2202
|
+
sourceSubmissionId: string | null;
|
|
2203
|
+
metadata: {
|
|
2204
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2205
|
+
} | null;
|
|
2206
|
+
createdAt: string;
|
|
2207
|
+
updatedAt: string;
|
|
2208
|
+
};
|
|
2209
|
+
};
|
|
2210
|
+
outputFormat: "json";
|
|
2211
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
2212
|
+
};
|
|
2213
|
+
};
|
|
2214
|
+
} & {
|
|
2215
|
+
"/people/:id/signals": {
|
|
2216
|
+
$get: {
|
|
2217
|
+
input: {
|
|
2218
|
+
param: {
|
|
2219
|
+
id: string;
|
|
2220
|
+
};
|
|
2221
|
+
};
|
|
2222
|
+
output: {
|
|
2223
|
+
data: {
|
|
2224
|
+
id: string;
|
|
2225
|
+
personId: string;
|
|
2226
|
+
productId: string | null;
|
|
2227
|
+
optionUnitId: string | null;
|
|
2228
|
+
kind: "wishlist" | "notify" | "inquiry" | "request_offer" | "referral";
|
|
2229
|
+
source: "admin" | "form" | "phone" | "website" | "abandoned_cart" | "booking";
|
|
2230
|
+
status: "lost" | "expired" | "new" | "contacted" | "qualified" | "converted";
|
|
2231
|
+
priority: string;
|
|
2232
|
+
notes: string | null;
|
|
2233
|
+
tags: string[];
|
|
2234
|
+
assignedToUserId: string | null;
|
|
2235
|
+
followUpAt: string | null;
|
|
2236
|
+
resolvedBookingId: string | null;
|
|
2237
|
+
sourceSubmissionId: string | null;
|
|
2238
|
+
metadata: {
|
|
2239
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
2240
|
+
} | null;
|
|
2241
|
+
createdAt: string;
|
|
2242
|
+
updatedAt: string;
|
|
2243
|
+
}[];
|
|
2244
|
+
};
|
|
2245
|
+
outputFormat: "json";
|
|
2246
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
1799
2249
|
}, "/"> | import("hono/types").MergeSchemaPath<{
|
|
1800
2250
|
"/pipelines": {
|
|
1801
2251
|
$get: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASU,CAAA;AAEhC,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAA"}
|
package/dist/routes/index.js
CHANGED
|
@@ -2,13 +2,17 @@ import { Hono } from "hono";
|
|
|
2
2
|
import { accountRoutes } from "./accounts.js";
|
|
3
3
|
import { activityRoutes } from "./activities.js";
|
|
4
4
|
import { customFieldRoutes } from "./custom-fields.js";
|
|
5
|
+
import { customerSignalRoutes } from "./customer-signals.js";
|
|
5
6
|
import { opportunityRoutes } from "./opportunities.js";
|
|
6
7
|
import { personDocumentRoutes } from "./person-documents.js";
|
|
8
|
+
import { personRelationshipRoutes } from "./person-relationships.js";
|
|
7
9
|
import { pipelineRoutes } from "./pipelines.js";
|
|
8
10
|
import { quoteRoutes } from "./quotes.js";
|
|
9
11
|
export const crmRoutes = new Hono()
|
|
10
12
|
.route("/", accountRoutes)
|
|
11
13
|
.route("/", personDocumentRoutes)
|
|
14
|
+
.route("/", personRelationshipRoutes)
|
|
15
|
+
.route("/", customerSignalRoutes)
|
|
12
16
|
.route("/", pipelineRoutes)
|
|
13
17
|
.route("/", opportunityRoutes)
|
|
14
18
|
.route("/", quoteRoutes)
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
+
type Env = {
|
|
3
|
+
Variables: {
|
|
4
|
+
db: PostgresJsDatabase;
|
|
5
|
+
userId?: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare const personRelationshipRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
9
|
+
"/people/:id/relationships": {
|
|
10
|
+
$get: {
|
|
11
|
+
input: {
|
|
12
|
+
param: {
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
output: {
|
|
17
|
+
data: {
|
|
18
|
+
id: string;
|
|
19
|
+
fromPersonId: string;
|
|
20
|
+
toPersonId: string;
|
|
21
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
22
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
23
|
+
startDate: string | null;
|
|
24
|
+
endDate: string | null;
|
|
25
|
+
isPrimary: boolean;
|
|
26
|
+
notes: string | null;
|
|
27
|
+
metadata: {
|
|
28
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
29
|
+
} | null;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
outputFormat: "json";
|
|
35
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
} & {
|
|
39
|
+
"/people/:id/relationships": {
|
|
40
|
+
$post: {
|
|
41
|
+
input: {
|
|
42
|
+
param: {
|
|
43
|
+
id: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
output: {
|
|
47
|
+
error: string;
|
|
48
|
+
};
|
|
49
|
+
outputFormat: "json";
|
|
50
|
+
status: 400;
|
|
51
|
+
} | {
|
|
52
|
+
input: {
|
|
53
|
+
param: {
|
|
54
|
+
id: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
output: {
|
|
58
|
+
data: {
|
|
59
|
+
metadata: {
|
|
60
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
61
|
+
} | null;
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
startDate: string | null;
|
|
66
|
+
endDate: string | null;
|
|
67
|
+
notes: string | null;
|
|
68
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
69
|
+
isPrimary: boolean;
|
|
70
|
+
fromPersonId: string;
|
|
71
|
+
toPersonId: string;
|
|
72
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
outputFormat: "json";
|
|
76
|
+
status: 201;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
} & {
|
|
80
|
+
"/person-relationships/:id": {
|
|
81
|
+
$get: {
|
|
82
|
+
input: {
|
|
83
|
+
param: {
|
|
84
|
+
id: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
output: {
|
|
88
|
+
error: string;
|
|
89
|
+
};
|
|
90
|
+
outputFormat: "json";
|
|
91
|
+
status: 404;
|
|
92
|
+
} | {
|
|
93
|
+
input: {
|
|
94
|
+
param: {
|
|
95
|
+
id: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
output: {
|
|
99
|
+
data: {
|
|
100
|
+
id: string;
|
|
101
|
+
fromPersonId: string;
|
|
102
|
+
toPersonId: string;
|
|
103
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
104
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
105
|
+
startDate: string | null;
|
|
106
|
+
endDate: string | null;
|
|
107
|
+
isPrimary: boolean;
|
|
108
|
+
notes: string | null;
|
|
109
|
+
metadata: {
|
|
110
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
111
|
+
} | null;
|
|
112
|
+
createdAt: string;
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
outputFormat: "json";
|
|
117
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
} & {
|
|
121
|
+
"/person-relationships/:id": {
|
|
122
|
+
$patch: {
|
|
123
|
+
input: {
|
|
124
|
+
param: {
|
|
125
|
+
id: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
output: {
|
|
129
|
+
error: string;
|
|
130
|
+
};
|
|
131
|
+
outputFormat: "json";
|
|
132
|
+
status: 404;
|
|
133
|
+
} | {
|
|
134
|
+
input: {
|
|
135
|
+
param: {
|
|
136
|
+
id: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
output: {
|
|
140
|
+
data: {
|
|
141
|
+
id: string;
|
|
142
|
+
fromPersonId: string;
|
|
143
|
+
toPersonId: string;
|
|
144
|
+
kind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion";
|
|
145
|
+
inverseKind: "partner" | "other" | "spouse" | "parent" | "child" | "sibling" | "guardian" | "ward" | "emergency_contact" | "friend" | "travel_companion" | null;
|
|
146
|
+
startDate: string | null;
|
|
147
|
+
endDate: string | null;
|
|
148
|
+
isPrimary: boolean;
|
|
149
|
+
notes: string | null;
|
|
150
|
+
metadata: {
|
|
151
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
152
|
+
} | null;
|
|
153
|
+
createdAt: string;
|
|
154
|
+
updatedAt: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
outputFormat: "json";
|
|
158
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
} & {
|
|
162
|
+
"/person-relationships/:id": {
|
|
163
|
+
$delete: {
|
|
164
|
+
input: {
|
|
165
|
+
param: {
|
|
166
|
+
id: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
output: {
|
|
170
|
+
error: string;
|
|
171
|
+
};
|
|
172
|
+
outputFormat: "json";
|
|
173
|
+
status: 404;
|
|
174
|
+
} | {
|
|
175
|
+
input: {
|
|
176
|
+
param: {
|
|
177
|
+
id: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
output: {
|
|
181
|
+
success: true;
|
|
182
|
+
};
|
|
183
|
+
outputFormat: "json";
|
|
184
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}, "/", "/person-relationships/:id">;
|
|
188
|
+
export {};
|
|
189
|
+
//# sourceMappingURL=person-relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-relationships.d.ts","sourceRoot":"","sources":["../../src/routes/person-relationships.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAUjE,KAAK,GAAG,GAAG;IACT,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAoCjC,CAAA"}
|