fireberry-api-client 1.0.2-beta.2.2 → 1.0.2-beta.2.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.
@@ -1,7 +1,7 @@
1
1
  export { C as ConditionBuilder, D as DateConditionBuilder, E as EXCLUDED_FIELDS_FOR_STAR_QUERY, l as FIELD_TYPE_IDS, m as FIELD_TYPE_MAPPINGS, O as OBJECT_ID_MAP, n as OBJECT_NAME_MAP, Q as QueryBuilder, r as addDays, e as escapeQueryValue, x as getExcludedFieldsForStarQuery, p as getNameFieldByObjectType, o as getObjectIdFieldName, v as getStartOfMonth, u as getStartOfWeek, t as getToday, w as isExcludedFromStarQuery, q as isPureDate, s as sanitizeQuery } from '../excludedFields-Dk-ILROQ.cjs';
2
2
  import { F as FireberryClient } from '../relatedFieldMapping-BvTlofIU.cjs';
3
3
  export { d as FieldMetadataMap, I as ID_FIELD_TO_OBJECT_TYPE, b as RelatedFieldInfo, c as RelatedFieldResolution, R as RelatedFieldResolver, e as expandRelatedFields, a2 as getCodeFieldFromLabel, a3 as getLabelFieldFromCode, a as getObjectTypeFromReferenceField, g as getRelatedFieldInfo, a1 as isCodeField, a4 as isDropdownFieldByMetadata, p as parseRelatedField, r as resolveRelatedField } from '../relatedFieldMapping-BvTlofIU.cjs';
4
- export { f as getFieldTypeName, g as getLabelFieldForField, e as isDateField, i as isDropdownField, b as isDropdownOrLookupField, a as isLookupField, d as isNumericField, c as isTextField } from '../fieldTypes-BLzJTzpI.cjs';
4
+ export { f as filterLabelOnlyFields, j as getFieldTypeName, g as getLabelFieldForField, h as isDateField, a as isDropdownField, c as isDropdownOrLookupField, i as isLabelOnlyField, b as isLookupField, e as isNumericField, d as isTextField } from '../fieldTypes-DZpAev83.cjs';
5
5
 
6
6
  /**
7
7
  * Waits for the specified number of milliseconds
@@ -1,7 +1,7 @@
1
1
  export { C as ConditionBuilder, D as DateConditionBuilder, E as EXCLUDED_FIELDS_FOR_STAR_QUERY, l as FIELD_TYPE_IDS, m as FIELD_TYPE_MAPPINGS, O as OBJECT_ID_MAP, n as OBJECT_NAME_MAP, Q as QueryBuilder, r as addDays, e as escapeQueryValue, x as getExcludedFieldsForStarQuery, p as getNameFieldByObjectType, o as getObjectIdFieldName, v as getStartOfMonth, u as getStartOfWeek, t as getToday, w as isExcludedFromStarQuery, q as isPureDate, s as sanitizeQuery } from '../excludedFields-Dk-ILROQ.js';
2
2
  import { F as FireberryClient } from '../relatedFieldMapping-D0fbCEeA.js';
3
3
  export { d as FieldMetadataMap, I as ID_FIELD_TO_OBJECT_TYPE, b as RelatedFieldInfo, c as RelatedFieldResolution, R as RelatedFieldResolver, e as expandRelatedFields, a2 as getCodeFieldFromLabel, a3 as getLabelFieldFromCode, a as getObjectTypeFromReferenceField, g as getRelatedFieldInfo, a1 as isCodeField, a4 as isDropdownFieldByMetadata, p as parseRelatedField, r as resolveRelatedField } from '../relatedFieldMapping-D0fbCEeA.js';
4
- export { f as getFieldTypeName, g as getLabelFieldForField, e as isDateField, i as isDropdownField, b as isDropdownOrLookupField, a as isLookupField, d as isNumericField, c as isTextField } from '../fieldTypes-BLzJTzpI.js';
4
+ export { f as filterLabelOnlyFields, j as getFieldTypeName, g as getLabelFieldForField, h as isDateField, a as isDropdownField, c as isDropdownOrLookupField, i as isLabelOnlyField, b as isLookupField, e as isNumericField, d as isTextField } from '../fieldTypes-DZpAev83.js';
5
5
 
6
6
  /**
7
7
  * Waits for the specified number of milliseconds
@@ -318,6 +318,10 @@ var FIELDS_WITHOUT_LABEL_FIELD = [
318
318
  // Object 7 - no name field exists
319
319
  ];
320
320
  var OBJECT_TYPE_OVERRIDES = {
321
+ // Account (1) - uses *codename pattern for some fields
322
+ 1: {
323
+ excludedCodeFields: ["actionstatuscode", "businesstypecode"]
324
+ },
321
325
  // CRM Orders (13) - uses *idname and *codename patterns
322
326
  13: {
323
327
  excludedIdFields: ["ownerid", "accountid", "printtemplateid", "pcfaccountid"],
@@ -441,6 +445,21 @@ var OBJECT_TYPE_OVERRIDES = {
441
445
  excludedIdFields: ["ownerid"]
442
446
  }
443
447
  };
448
+ function isLabelOnlyField(fieldName, allFieldNames, objectType) {
449
+ for (const otherField of allFieldNames) {
450
+ if (otherField === fieldName) continue;
451
+ const labelField = getLabelFieldForField(otherField, objectType);
452
+ if (labelField === fieldName) {
453
+ return true;
454
+ }
455
+ }
456
+ return false;
457
+ }
458
+ function filterLabelOnlyFields(fieldNames, objectType) {
459
+ return fieldNames.filter(
460
+ (fieldName) => !isLabelOnlyField(fieldName, fieldNames, objectType)
461
+ );
462
+ }
444
463
  function getLabelFieldForField(fieldName, objectType) {
445
464
  if (SPECIAL_LABEL_FIELD_MAPPINGS[fieldName]) {
446
465
  return SPECIAL_LABEL_FIELD_MAPPINGS[fieldName];
@@ -2120,6 +2139,6 @@ function getExcludedFieldsForStarQuery(objectType) {
2120
2139
  return EXCLUDED_FIELDS_FOR_STAR_QUERY[objectTypeStr] || [];
2121
2140
  }
2122
2141
 
2123
- export { ERDBuilder, EXCLUDED_FIELDS_FOR_STAR_QUERY, FIELD_TYPE_IDS, FIELD_TYPE_MAPPINGS, ID_FIELD_TO_OBJECT_TYPE, OBJECT_ID_MAP, OBJECT_NAME_MAP, QueryBuilder, RelatedFieldResolver, SchemaBuilder, addDays, chunkArray, deepClone, erdBuilder, escapeQueryValue, expandRelatedFields, generateFireberryERD, generateSchema, getCodeFieldFromLabel, getExcludedFieldsForStarQuery, getFieldTypeName, getLabelFieldForField, getLabelFieldFromCode, getNameFieldByObjectType, getObjectIdFieldName, getObjectTypeFromReferenceField, getRelatedFieldInfo, getStartOfMonth, getStartOfWeek, getToday, isCodeField, isDateField, isDropdownField, isDropdownFieldByMetadata, isDropdownOrLookupField, isExcludedFromStarQuery, isLookupField, isNumericField, isPlainObject, isPureDate, isSelectAll, isTextField, joinFields, normalizeFields, parseRelatedField, resolveRelatedField, safeStringValue, sanitizeQuery, schemaBuilder, wait };
2142
+ export { ERDBuilder, EXCLUDED_FIELDS_FOR_STAR_QUERY, FIELD_TYPE_IDS, FIELD_TYPE_MAPPINGS, ID_FIELD_TO_OBJECT_TYPE, OBJECT_ID_MAP, OBJECT_NAME_MAP, QueryBuilder, RelatedFieldResolver, SchemaBuilder, addDays, chunkArray, deepClone, erdBuilder, escapeQueryValue, expandRelatedFields, filterLabelOnlyFields, generateFireberryERD, generateSchema, getCodeFieldFromLabel, getExcludedFieldsForStarQuery, getFieldTypeName, getLabelFieldForField, getLabelFieldFromCode, getNameFieldByObjectType, getObjectIdFieldName, getObjectTypeFromReferenceField, getRelatedFieldInfo, getStartOfMonth, getStartOfWeek, getToday, isCodeField, isDateField, isDropdownField, isDropdownFieldByMetadata, isDropdownOrLookupField, isExcludedFromStarQuery, isLabelOnlyField, isLookupField, isNumericField, isPlainObject, isPureDate, isSelectAll, isTextField, joinFields, normalizeFields, parseRelatedField, resolveRelatedField, safeStringValue, sanitizeQuery, schemaBuilder, wait };
2124
2143
  //# sourceMappingURL=index.js.map
2125
2144
  //# sourceMappingURL=index.js.map