@blazeo.com/calendar-client 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -0
- package/dist/index.mjs +16 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2046,6 +2046,10 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
|
|
|
2046
2046
|
const u = String(sortOrderRaw).trim().toUpperCase();
|
|
2047
2047
|
query.sort_dir = u.startsWith("DESC") ? "desc" : "asc";
|
|
2048
2048
|
}
|
|
2049
|
+
const searchColumn = opts.searchColumn ?? opts.search_column ?? opts.column;
|
|
2050
|
+
if (searchColumn != null && String(searchColumn).trim() !== "") query.search_column = String(searchColumn).trim();
|
|
2051
|
+
const searchText = opts.searchText ?? opts.search_text ?? opts.search;
|
|
2052
|
+
if (searchText != null && String(searchText).trim() !== "") query.search_text = String(searchText).trim();
|
|
2049
2053
|
if (opts.page != null) {
|
|
2050
2054
|
query.page = opts.page;
|
|
2051
2055
|
if (opts.page_size != null) query.page_size = opts.page_size;
|
|
@@ -2062,6 +2066,18 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
|
|
|
2062
2066
|
}
|
|
2063
2067
|
return null;
|
|
2064
2068
|
};
|
|
2069
|
+
LeadModel.getSources = async () => {
|
|
2070
|
+
var _a;
|
|
2071
|
+
const { reqGet } = createRequestHelpersFromEnv(getConfig());
|
|
2072
|
+
const res = await reqGet("/lead/sources/get");
|
|
2073
|
+
if (res.status === "success") {
|
|
2074
|
+
const sources = Array.isArray(res.data) ? res.data : Array.isArray((_a = res.data) == null ? void 0 : _a.sources) ? res.data.sources : null;
|
|
2075
|
+
if (sources) {
|
|
2076
|
+
return [...new Set(sources.map((s) => String(s ?? "").trim()).filter(Boolean))];
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
return [];
|
|
2080
|
+
};
|
|
2065
2081
|
var Lead_default = LeadModel;
|
|
2066
2082
|
|
|
2067
2083
|
// src/models/appointment/index.js
|
package/dist/index.mjs
CHANGED
|
@@ -1993,6 +1993,10 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
|
|
|
1993
1993
|
const u = String(sortOrderRaw).trim().toUpperCase();
|
|
1994
1994
|
query.sort_dir = u.startsWith("DESC") ? "desc" : "asc";
|
|
1995
1995
|
}
|
|
1996
|
+
const searchColumn = opts.searchColumn ?? opts.search_column ?? opts.column;
|
|
1997
|
+
if (searchColumn != null && String(searchColumn).trim() !== "") query.search_column = String(searchColumn).trim();
|
|
1998
|
+
const searchText = opts.searchText ?? opts.search_text ?? opts.search;
|
|
1999
|
+
if (searchText != null && String(searchText).trim() !== "") query.search_text = String(searchText).trim();
|
|
1996
2000
|
if (opts.page != null) {
|
|
1997
2001
|
query.page = opts.page;
|
|
1998
2002
|
if (opts.page_size != null) query.page_size = opts.page_size;
|
|
@@ -2009,6 +2013,18 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
|
|
|
2009
2013
|
}
|
|
2010
2014
|
return null;
|
|
2011
2015
|
};
|
|
2016
|
+
LeadModel.getSources = async () => {
|
|
2017
|
+
var _a;
|
|
2018
|
+
const { reqGet } = createRequestHelpersFromEnv(getConfig());
|
|
2019
|
+
const res = await reqGet("/lead/sources/get");
|
|
2020
|
+
if (res.status === "success") {
|
|
2021
|
+
const sources = Array.isArray(res.data) ? res.data : Array.isArray((_a = res.data) == null ? void 0 : _a.sources) ? res.data.sources : null;
|
|
2022
|
+
if (sources) {
|
|
2023
|
+
return [...new Set(sources.map((s) => String(s ?? "").trim()).filter(Boolean))];
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
return [];
|
|
2027
|
+
};
|
|
2012
2028
|
var Lead_default = LeadModel;
|
|
2013
2029
|
|
|
2014
2030
|
// src/models/appointment/index.js
|