@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 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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazeo.com/calendar-client",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Blazeo Calendar / Appointment API client with MobX State Tree models",
5
5
  "exports": {
6
6
  ".": {