@opendoor/partner-sdk-server-js-core 1.0.4 → 1.0.5-beta.54.1
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,
|
|
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"}
|
package/dist/answerKeyMapping.js
CHANGED
|
@@ -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
|
-
|
|
81
|
-
|
|
82
|
-
offerInput['homeHoaTypeGatedCommunity'] =
|
|
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
|