@opendoor/partner-sdk-server-js-core 1.0.4 → 1.0.5

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 +1 @@
1
- {"version":3,"file":"answerKeyMapping.d.ts","sourceRoot":"","sources":["../src/answerKeyMapping.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqEH;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgEzB"}
1
+ {"version":3,"file":"answerKeyMapping.d.ts","sourceRoot":"","sources":["../src/answerKeyMapping.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqEH;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoEzB"}
@@ -76,10 +76,12 @@ export function transformAnswersToOfferInput(answers) {
76
76
  continue;
77
77
  // Special case: home.hoa_type fans out to separate boolean fields
78
78
  // GraphQL has homeHoaTypeAgeRestrictedCommunity and homeHoaTypeGatedCommunity as booleans
79
+ // Value can be a string (legacy single-select) or string[] (multi-select checkboxes)
79
80
  if (key === 'home.hoa_type') {
80
- offerInput['homeHoaTypeAgeRestrictedCommunity'] =
81
- value === 'age_restricted_community';
82
- offerInput['homeHoaTypeGatedCommunity'] = value === 'gated_community';
81
+ const values = Array.isArray(value) ? value : [value];
82
+ offerInput['homeHoaTypeAgeRestrictedCommunity'] = values.includes('age_restricted_community');
83
+ offerInput['homeHoaTypeGatedCommunity'] =
84
+ values.includes('gated_community');
83
85
  continue;
84
86
  }
85
87
  // Special case: home.hoa_type.guarded_gated_community → boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendoor/partner-sdk-server-js-core",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Server-side SDK for Opendoor partner integrations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",