@blazeo.com/calendar-client 1.0.14 → 1.0.15
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 +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2066,10 +2066,11 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
|
|
|
2066
2066
|
}
|
|
2067
2067
|
return null;
|
|
2068
2068
|
};
|
|
2069
|
-
LeadModel.getSources = async () => {
|
|
2069
|
+
LeadModel.getSources = async (companyKey) => {
|
|
2070
2070
|
var _a;
|
|
2071
|
+
if (!companyKey || String(companyKey).trim() === "") return [];
|
|
2071
2072
|
const { reqGet } = createRequestHelpersFromEnv(getConfig());
|
|
2072
|
-
const res = await reqGet("/lead/sources/get");
|
|
2073
|
+
const res = await reqGet("/lead/sources/get", { company_key: String(companyKey).trim() });
|
|
2073
2074
|
if (res.status === "success") {
|
|
2074
2075
|
const sources = Array.isArray(res.data) ? res.data : Array.isArray((_a = res.data) == null ? void 0 : _a.sources) ? res.data.sources : null;
|
|
2075
2076
|
if (sources) {
|
package/dist/index.mjs
CHANGED
|
@@ -2013,10 +2013,11 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
return null;
|
|
2015
2015
|
};
|
|
2016
|
-
LeadModel.getSources = async () => {
|
|
2016
|
+
LeadModel.getSources = async (companyKey) => {
|
|
2017
2017
|
var _a;
|
|
2018
|
+
if (!companyKey || String(companyKey).trim() === "") return [];
|
|
2018
2019
|
const { reqGet } = createRequestHelpersFromEnv(getConfig());
|
|
2019
|
-
const res = await reqGet("/lead/sources/get");
|
|
2020
|
+
const res = await reqGet("/lead/sources/get", { company_key: String(companyKey).trim() });
|
|
2020
2021
|
if (res.status === "success") {
|
|
2021
2022
|
const sources = Array.isArray(res.data) ? res.data : Array.isArray((_a = res.data) == null ? void 0 : _a.sources) ? res.data.sources : null;
|
|
2022
2023
|
if (sources) {
|