@blazeo.com/calendar-client 1.0.52 → 1.0.54

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 CHANGED
@@ -412,6 +412,16 @@ export const LeadModel: {
412
412
  searchText?: string;
413
413
  search_text?: string;
414
414
  search?: string;
415
+ /** Multiple column filters, ANDed together (combined with the single searchColumn/searchText pair when both are set). */
416
+ filters?: Array<{
417
+ column?: string;
418
+ searchColumn?: string;
419
+ search_column?: string;
420
+ text?: string;
421
+ searchText?: string;
422
+ search_text?: string;
423
+ search?: string;
424
+ }>;
415
425
  page?: number;
416
426
  page_size?: number;
417
427
  }
@@ -469,6 +479,8 @@ export type ParticipantData = {
469
479
  createdOn?: string | null;
470
480
  modifiedOn?: string | null;
471
481
  isDeleted?: boolean;
482
+ /** Last stored authorization error; populated by Auth/IsAuthorized when not authorized. */
483
+ authorizationError?: string;
472
484
  };
473
485
 
474
486
  export const CALENDAR_AUTH_MESSAGE_TYPE: 'calendar-authorization';
package/dist/index.js CHANGED
@@ -1635,7 +1635,8 @@ function mapParticipantFromApi(d) {
1635
1635
  provider: n(pick2("provider", "Provider", "emailProvider", "EmailProvider", "email_provider")) ?? 0,
1636
1636
  createdOn: pick2("createdOn", "CreatedOn", "created_on") ?? null,
1637
1637
  modifiedOn: pick2("modifiedOn", "ModifiedOn", "modified_on") ?? null,
1638
- isDeleted: Boolean(pick2("isDeleted", "IsDeleted", "is_deleted"))
1638
+ isDeleted: Boolean(pick2("isDeleted", "IsDeleted", "is_deleted")),
1639
+ authorizationError: pick2("authorizationError", "AuthorizationError", "authorization_error") ?? ""
1639
1640
  };
1640
1641
  }
1641
1642
  function mapFromApi2(d) {
@@ -2857,10 +2858,23 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
2857
2858
  const u = String(sortOrderRaw).trim().toUpperCase();
2858
2859
  query.sort_dir = u.startsWith("DESC") ? "desc" : "asc";
2859
2860
  }
2861
+ const filterPairs = [];
2860
2862
  const searchColumn = opts.searchColumn ?? opts.search_column ?? opts.column;
2861
- if (searchColumn != null && String(searchColumn).trim() !== "") query.search_column = String(searchColumn).trim();
2862
2863
  const searchText = opts.searchText ?? opts.search_text ?? opts.search;
2863
- if (searchText != null && String(searchText).trim() !== "") query.search_text = String(searchText).trim();
2864
+ const singleColumn = searchColumn != null ? String(searchColumn).trim() : "";
2865
+ const singleText = searchText != null ? String(searchText).trim() : "";
2866
+ if (singleColumn && singleText) filterPairs.push({ column: singleColumn, text: singleText });
2867
+ if (Array.isArray(opts.filters)) {
2868
+ for (const f of opts.filters) {
2869
+ const column = String((f == null ? void 0 : f.column) ?? (f == null ? void 0 : f.searchColumn) ?? (f == null ? void 0 : f.search_column) ?? "").trim();
2870
+ const text = String((f == null ? void 0 : f.text) ?? (f == null ? void 0 : f.searchText) ?? (f == null ? void 0 : f.search_text) ?? (f == null ? void 0 : f.search) ?? "").trim();
2871
+ if (column && text) filterPairs.push({ column, text });
2872
+ }
2873
+ }
2874
+ if (filterPairs.length) {
2875
+ query.search_column = filterPairs.map((f) => f.column);
2876
+ query.search_text = filterPairs.map((f) => f.text);
2877
+ }
2864
2878
  if (opts.page != null) {
2865
2879
  query.page = opts.page;
2866
2880
  if (opts.page_size != null) query.page_size = opts.page_size;
package/dist/index.mjs CHANGED
@@ -1560,7 +1560,8 @@ function mapParticipantFromApi(d) {
1560
1560
  provider: n(pick2("provider", "Provider", "emailProvider", "EmailProvider", "email_provider")) ?? 0,
1561
1561
  createdOn: pick2("createdOn", "CreatedOn", "created_on") ?? null,
1562
1562
  modifiedOn: pick2("modifiedOn", "ModifiedOn", "modified_on") ?? null,
1563
- isDeleted: Boolean(pick2("isDeleted", "IsDeleted", "is_deleted"))
1563
+ isDeleted: Boolean(pick2("isDeleted", "IsDeleted", "is_deleted")),
1564
+ authorizationError: pick2("authorizationError", "AuthorizationError", "authorization_error") ?? ""
1564
1565
  };
1565
1566
  }
1566
1567
  function mapFromApi2(d) {
@@ -2782,10 +2783,23 @@ LeadModel.getByCompany = async (companyKey, opts = {}) => {
2782
2783
  const u = String(sortOrderRaw).trim().toUpperCase();
2783
2784
  query.sort_dir = u.startsWith("DESC") ? "desc" : "asc";
2784
2785
  }
2786
+ const filterPairs = [];
2785
2787
  const searchColumn = opts.searchColumn ?? opts.search_column ?? opts.column;
2786
- if (searchColumn != null && String(searchColumn).trim() !== "") query.search_column = String(searchColumn).trim();
2787
2788
  const searchText = opts.searchText ?? opts.search_text ?? opts.search;
2788
- if (searchText != null && String(searchText).trim() !== "") query.search_text = String(searchText).trim();
2789
+ const singleColumn = searchColumn != null ? String(searchColumn).trim() : "";
2790
+ const singleText = searchText != null ? String(searchText).trim() : "";
2791
+ if (singleColumn && singleText) filterPairs.push({ column: singleColumn, text: singleText });
2792
+ if (Array.isArray(opts.filters)) {
2793
+ for (const f of opts.filters) {
2794
+ const column = String((f == null ? void 0 : f.column) ?? (f == null ? void 0 : f.searchColumn) ?? (f == null ? void 0 : f.search_column) ?? "").trim();
2795
+ const text = String((f == null ? void 0 : f.text) ?? (f == null ? void 0 : f.searchText) ?? (f == null ? void 0 : f.search_text) ?? (f == null ? void 0 : f.search) ?? "").trim();
2796
+ if (column && text) filterPairs.push({ column, text });
2797
+ }
2798
+ }
2799
+ if (filterPairs.length) {
2800
+ query.search_column = filterPairs.map((f) => f.column);
2801
+ query.search_text = filterPairs.map((f) => f.text);
2802
+ }
2789
2803
  if (opts.page != null) {
2790
2804
  query.page = opts.page;
2791
2805
  if (opts.page_size != null) query.page_size = opts.page_size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazeo.com/calendar-client",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "Blazeo Calendar / Appointment API client with MobX State Tree models",
5
5
  "exports": {
6
6
  ".": {