@opendoor/partner-sdk-client-react 0.0.1-alpha.28.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.
- package/README.md +46 -0
- package/dist/OpendoorContext.d.ts +4 -0
- package/dist/OpendoorContext.d.ts.map +1 -0
- package/dist/components/AddressEntry/index.d.ts +45 -0
- package/dist/components/AddressEntry/index.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQContext.d.ts +30 -0
- package/dist/components/QualificationQuestions/QQContext.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQLayout.d.ts +12 -0
- package/dist/components/QualificationQuestions/QQLayout.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQNavigation.d.ts +4 -0
- package/dist/components/QualificationQuestions/QQNavigation.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQPage.d.ts +4 -0
- package/dist/components/QualificationQuestions/QQPage.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQProvider.d.ts +30 -0
- package/dist/components/QualificationQuestions/QQProvider.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQReviewCard.d.ts +11 -0
- package/dist/components/QualificationQuestions/QQReviewCard.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QQSidebar.d.ts +8 -0
- package/dist/components/QualificationQuestions/QQSidebar.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/QualificationQuestions.d.ts +35 -0
- package/dist/components/QualificationQuestions/QualificationQuestions.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/CardSelectField.d.ts +5 -0
- package/dist/components/QualificationQuestions/fields/CardSelectField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/CheckboxField.d.ts +5 -0
- package/dist/components/QualificationQuestions/fields/CheckboxField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/CurrencyField.d.ts +5 -0
- package/dist/components/QualificationQuestions/fields/CurrencyField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/DropdownField.d.ts +5 -0
- package/dist/components/QualificationQuestions/fields/DropdownField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/FieldRenderer.d.ts +6 -0
- package/dist/components/QualificationQuestions/fields/FieldRenderer.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/FieldWrapper.d.ts +10 -0
- package/dist/components/QualificationQuestions/fields/FieldWrapper.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/InputField.d.ts +5 -0
- package/dist/components/QualificationQuestions/fields/InputField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/RadioField.d.ts +5 -0
- package/dist/components/QualificationQuestions/fields/RadioField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/ToggleField.d.ts +6 -0
- package/dist/components/QualificationQuestions/fields/ToggleField.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/index.d.ts +11 -0
- package/dist/components/QualificationQuestions/fields/index.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/fields/types.d.ts +7 -0
- package/dist/components/QualificationQuestions/fields/types.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/icons.d.ts +7 -0
- package/dist/components/QualificationQuestions/icons.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/index.d.ts +3 -0
- package/dist/components/QualificationQuestions/index.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/pages/additionalDetailsPage.d.ts +4 -0
- package/dist/components/QualificationQuestions/pages/additionalDetailsPage.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/pages/conditionPage.d.ts +4 -0
- package/dist/components/QualificationQuestions/pages/conditionPage.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/pages/contactInfoPage.d.ts +4 -0
- package/dist/components/QualificationQuestions/pages/contactInfoPage.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/pages/featuresPage.d.ts +4 -0
- package/dist/components/QualificationQuestions/pages/featuresPage.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/pages/homeDetailsPage.d.ts +4 -0
- package/dist/components/QualificationQuestions/pages/homeDetailsPage.d.ts.map +1 -0
- package/dist/components/QualificationQuestions/pages/index.d.ts +6 -0
- package/dist/components/QualificationQuestions/pages/index.d.ts.map +1 -0
- package/dist/components/questionnaire/formLogic.d.ts +45 -0
- package/dist/components/questionnaire/formLogic.d.ts.map +1 -0
- package/dist/components/questionnaire/formatters.d.ts +11 -0
- package/dist/components/questionnaire/formatters.d.ts.map +1 -0
- package/dist/components/questionnaire/types.d.ts +240 -0
- package/dist/components/questionnaire/types.d.ts.map +1 -0
- package/dist/components/questionnaire/utils.d.ts +7 -0
- package/dist/components/questionnaire/utils.d.ts.map +1 -0
- package/dist/components/shared/PoweredByOpendoor.d.ts +12 -0
- package/dist/components/shared/PoweredByOpendoor.d.ts.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4620 -0
- package/dist/provider.d.ts +9 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/services/partnerApi.d.ts +96 -0
- package/dist/services/partnerApi.d.ts.map +1 -0
- package/dist/store/config.d.ts +15 -0
- package/dist/store/config.d.ts.map +1 -0
- package/dist/store/index.d.ts +133 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +121 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/questionnaire.d.ts +105 -0
- package/dist/types/questionnaire.d.ts.map +1 -0
- package/dist/useOpendoorClient.d.ts +4 -0
- package/dist/useOpendoorClient.d.ts.map +1 -0
- package/dist/utils/applyAppearance.d.ts +8 -0
- package/dist/utils/applyAppearance.d.ts.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AnswerValue } from '../../types/questionnaire';
|
|
3
|
+
|
|
4
|
+
export type { AnswerValue } from '../../types/questionnaire';
|
|
5
|
+
/**
|
|
6
|
+
* Checks a single field value against an operator.
|
|
7
|
+
* The `field` is a dot-notation store key (e.g. `"home.hoa"`).
|
|
8
|
+
*/
|
|
9
|
+
export interface FieldCondition {
|
|
10
|
+
/** Dot-notation store key to read */
|
|
11
|
+
field: string;
|
|
12
|
+
/** Comparison operator */
|
|
13
|
+
op: 'eq' | 'neq' | 'in' | 'notIn' | 'exists' | 'notExists' | 'contains';
|
|
14
|
+
/** Value(s) to compare against (unused for exists/notExists) */
|
|
15
|
+
value?: AnswerValue | AnswerValue[];
|
|
16
|
+
}
|
|
17
|
+
/** All child conditions must be true. */
|
|
18
|
+
export interface AndCondition {
|
|
19
|
+
and: Condition[];
|
|
20
|
+
}
|
|
21
|
+
/** At least one child condition must be true. */
|
|
22
|
+
export interface OrCondition {
|
|
23
|
+
or: Condition[];
|
|
24
|
+
}
|
|
25
|
+
/** True if any of the listed field keys hold a truthy value. */
|
|
26
|
+
export interface SomeTrueCondition {
|
|
27
|
+
someTrue: string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Declarative, JSON-serializable condition tree.
|
|
31
|
+
* Used by `showWhen`, `Effect.when`, and `DerivedAnswer.condition`.
|
|
32
|
+
*/
|
|
33
|
+
export type Condition = FieldCondition | AndCondition | OrCondition | SomeTrueCondition;
|
|
34
|
+
/**
|
|
35
|
+
* Side-effect rule attached to a question.
|
|
36
|
+
* When the `when` condition is met, `set` values are written to the store.
|
|
37
|
+
* When the condition is *not* met and `unset` is provided, those values are written instead.
|
|
38
|
+
*/
|
|
39
|
+
export interface Effect {
|
|
40
|
+
/** Condition that triggers this effect */
|
|
41
|
+
when: Condition;
|
|
42
|
+
/** Key-value pairs to write when the condition is true */
|
|
43
|
+
set: Record<string, AnswerValue>;
|
|
44
|
+
/** Key-value pairs to write when the condition is false (optional undo) */
|
|
45
|
+
unset?: Record<string, AnswerValue>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Computed boolean (or value) derived from other answers.
|
|
49
|
+
* Evaluated after every answer change; the result is written to `key`.
|
|
50
|
+
*/
|
|
51
|
+
export interface DerivedAnswer {
|
|
52
|
+
/** Store key to write the computed value to */
|
|
53
|
+
key: string;
|
|
54
|
+
/** Condition that evaluates to the derived value */
|
|
55
|
+
condition: Condition;
|
|
56
|
+
/** Value when condition is true (default: `true`) */
|
|
57
|
+
trueValue?: AnswerValue;
|
|
58
|
+
/** Value when condition is false (default: `false`) */
|
|
59
|
+
falseValue?: AnswerValue;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Configuration for a single option in dropdown, checkbox, radio, or card-select fields.
|
|
63
|
+
*/
|
|
64
|
+
export interface OptionConfig {
|
|
65
|
+
/** Display text for the option */
|
|
66
|
+
label: string;
|
|
67
|
+
/** Value stored when this option is selected */
|
|
68
|
+
value: string | number;
|
|
69
|
+
/** Optional description text (used in card-select style) */
|
|
70
|
+
description?: string;
|
|
71
|
+
/** Short label used in summary views like the ReviewCard sidebar */
|
|
72
|
+
shortLabel?: string;
|
|
73
|
+
/** When true, selecting this option deselects all others in the group (e.g., "None of these") */
|
|
74
|
+
exclusive?: boolean;
|
|
75
|
+
/** Optional image URL for card-select options (e.g., seller score photos) */
|
|
76
|
+
image?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Configuration for a single question in the questionnaire.
|
|
80
|
+
* `style` controls the UI presentation; `type` controls the data shape.
|
|
81
|
+
*/
|
|
82
|
+
export interface QuestionConfig {
|
|
83
|
+
/** Dot-notation store key (e.g., "home.bedrooms") */
|
|
84
|
+
key: string;
|
|
85
|
+
/** UI presentation style */
|
|
86
|
+
style: 'dropdown' | 'input' | 'checkbox' | 'radio' | 'card-select' | 'currency' | 'toggle';
|
|
87
|
+
/** Data shape for the answer value */
|
|
88
|
+
type: 'number' | 'string' | 'string[]' | 'boolean';
|
|
89
|
+
/** Label text displayed above the field */
|
|
90
|
+
question: string;
|
|
91
|
+
/** Short label used as a prefix in summary views like the ReviewCard sidebar */
|
|
92
|
+
shortLabel?: string;
|
|
93
|
+
/** Helper description text displayed below the label */
|
|
94
|
+
description?: string;
|
|
95
|
+
/** Available options for dropdown, checkbox, radio, card-select */
|
|
96
|
+
options?: OptionConfig[];
|
|
97
|
+
/** Placeholder text for input fields */
|
|
98
|
+
placeholder?: string;
|
|
99
|
+
/** Whether the field must have a value to proceed */
|
|
100
|
+
required?: boolean;
|
|
101
|
+
/** Default value written to the store when the answer is undefined on mount */
|
|
102
|
+
defaultValue?: AnswerValue;
|
|
103
|
+
/** Suffix text displayed inside input fields (e.g., "sq ft") */
|
|
104
|
+
suffix?: string;
|
|
105
|
+
/** Minimum numeric value (validated) */
|
|
106
|
+
min?: number;
|
|
107
|
+
/** Maximum numeric value (validated) */
|
|
108
|
+
max?: number;
|
|
109
|
+
/** Custom per-field validation function. Returns error string or undefined. */
|
|
110
|
+
validate?: (value: string | number | boolean | string[] | undefined) => string | undefined;
|
|
111
|
+
/** Show this question only when the condition evaluates to true.
|
|
112
|
+
* Hidden questions skip validation and their stored values are cleared. */
|
|
113
|
+
showWhen?: Condition;
|
|
114
|
+
/** Side effects: when conditions match, auto-set derived fields in the store. */
|
|
115
|
+
effects?: Effect[];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Configuration for a section within a page.
|
|
119
|
+
* Groups related questions together with an optional heading.
|
|
120
|
+
*/
|
|
121
|
+
export interface SectionConfig {
|
|
122
|
+
/** Unique section identifier */
|
|
123
|
+
id: string;
|
|
124
|
+
/** Optional section heading */
|
|
125
|
+
title?: string;
|
|
126
|
+
/** Optional icon displayed next to the section title */
|
|
127
|
+
icon?: ReactNode;
|
|
128
|
+
/** Questions within this section */
|
|
129
|
+
questions: QuestionConfig[];
|
|
130
|
+
/** Show this entire section only when the condition evaluates to true. */
|
|
131
|
+
showWhen?: Condition;
|
|
132
|
+
}
|
|
133
|
+
/** Page-level validation result returned by `PageConfig.validate` */
|
|
134
|
+
export interface PageValidationResult {
|
|
135
|
+
valid: boolean;
|
|
136
|
+
errors: {
|
|
137
|
+
fieldId: string;
|
|
138
|
+
message: string;
|
|
139
|
+
}[];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Configuration for a single page in the questionnaire flow.
|
|
143
|
+
* Pages contain sections, which contain questions.
|
|
144
|
+
*/
|
|
145
|
+
export interface PageConfig {
|
|
146
|
+
/** Unique page identifier */
|
|
147
|
+
id: string;
|
|
148
|
+
/** Page title displayed at the top */
|
|
149
|
+
title: string;
|
|
150
|
+
/** Optional subtitle displayed below the title */
|
|
151
|
+
subtitle?: string;
|
|
152
|
+
/** Stepper configuration — absent means no stepper shown on this page */
|
|
153
|
+
stepper?: {
|
|
154
|
+
label: string;
|
|
155
|
+
position: number;
|
|
156
|
+
};
|
|
157
|
+
/** Sections containing questions */
|
|
158
|
+
sections: SectionConfig[];
|
|
159
|
+
/** Optional page-level cross-field validation */
|
|
160
|
+
validate?: (answers: Record<string, string | number | boolean | string[] | undefined>) => PageValidationResult;
|
|
161
|
+
/** Computed answers derived from this page's questions. Evaluated after every answer change. */
|
|
162
|
+
derived?: DerivedAnswer[];
|
|
163
|
+
}
|
|
164
|
+
/** A step in the breadcrumb stepper */
|
|
165
|
+
export interface StepperStep {
|
|
166
|
+
/** Display label for this step */
|
|
167
|
+
label: string;
|
|
168
|
+
/** Position index (1-based) */
|
|
169
|
+
position: number;
|
|
170
|
+
/** Whether this step has been completed */
|
|
171
|
+
completed: boolean;
|
|
172
|
+
/** Whether this step is currently active */
|
|
173
|
+
active: boolean;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* CSS class name overrides for customizing questionnaire appearance.
|
|
177
|
+
* Partners pass a flat object; every component reads its keys from context.
|
|
178
|
+
*/
|
|
179
|
+
export interface QuestionnaireClassNameOverrides {
|
|
180
|
+
container?: string;
|
|
181
|
+
pageContainer?: string;
|
|
182
|
+
pageTitle?: string;
|
|
183
|
+
pageSubtitle?: string;
|
|
184
|
+
sectionTitle?: string;
|
|
185
|
+
navigationContainer?: string;
|
|
186
|
+
buttonPrimary?: string;
|
|
187
|
+
buttonSecondary?: string;
|
|
188
|
+
stepper?: string;
|
|
189
|
+
stepperStep?: string;
|
|
190
|
+
stepperStepActive?: string;
|
|
191
|
+
stepperStepCompleted?: string;
|
|
192
|
+
field?: string;
|
|
193
|
+
fieldLabel?: string;
|
|
194
|
+
fieldDescription?: string;
|
|
195
|
+
fieldError?: string;
|
|
196
|
+
dropdown?: string;
|
|
197
|
+
input?: string;
|
|
198
|
+
checkbox?: string;
|
|
199
|
+
checkboxOption?: string;
|
|
200
|
+
radio?: string;
|
|
201
|
+
radioOption?: string;
|
|
202
|
+
card?: string;
|
|
203
|
+
cardSelected?: string;
|
|
204
|
+
currencyInput?: string;
|
|
205
|
+
toggle?: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* CSS class name overrides for the ReviewCard component.
|
|
209
|
+
* Partners can pass these to restyle the summary sidebar.
|
|
210
|
+
*/
|
|
211
|
+
export interface ReviewCardClassNameOverrides {
|
|
212
|
+
card?: string;
|
|
213
|
+
mapArea?: string;
|
|
214
|
+
addressSection?: string;
|
|
215
|
+
addressStreet?: string;
|
|
216
|
+
addressCityState?: string;
|
|
217
|
+
editLink?: string;
|
|
218
|
+
statsGrid?: string;
|
|
219
|
+
statItem?: string;
|
|
220
|
+
statIcon?: string;
|
|
221
|
+
statValue?: string;
|
|
222
|
+
section?: string;
|
|
223
|
+
sectionHeader?: string;
|
|
224
|
+
sectionTitle?: string;
|
|
225
|
+
checkList?: string;
|
|
226
|
+
checkItem?: string;
|
|
227
|
+
checkIcon?: string;
|
|
228
|
+
moreLink?: string;
|
|
229
|
+
footer?: string;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* CSS class name overrides for the QuestionnaireLayout component.
|
|
233
|
+
* Partners can restyle the side-by-side layout wrapper.
|
|
234
|
+
*/
|
|
235
|
+
export interface QuestionnaireLayoutClassNameOverrides {
|
|
236
|
+
layoutContainer?: string;
|
|
237
|
+
sidebarContainer?: string;
|
|
238
|
+
mainContent?: string;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/questionnaire/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAM7D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,EAAE,EAAE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;IACxE,gEAAgE;IAChE,KAAK,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE,CAAC;CACrC;AAED,yCAAyC;AACzC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,SAAS,EAAE,CAAC;CAClB;AAED,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,SAAS,EAAE,CAAC;CACjB;AAED,gEAAgE;AAChE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,YAAY,GACZ,WAAW,GACX,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,0CAA0C;IAC1C,IAAI,EAAE,SAAS,CAAC;IAChB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACjC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IA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M,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qCAAqC;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnswerValue, QuestionConfig } from './types';
|
|
2
|
+
|
|
3
|
+
/** Merge a CSS-module class with an optional override string. */
|
|
4
|
+
export declare function cx(base: string, override?: string): string;
|
|
5
|
+
/** Validate a single field value against its question config. */
|
|
6
|
+
export declare function validateField(question: QuestionConfig, value: AnswerValue): string | undefined;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/questionnaire/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE3D,iEAAiE;AACjE,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,WAAW,GACjB,MAAM,GAAG,SAAS,CAyBpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Powered by Opendoor" attribution badge.
|
|
3
|
+
*
|
|
4
|
+
* Internal component — not exported from the package's public API.
|
|
5
|
+
* Used by AddressEntry, Questionnaire, and other SDK components
|
|
6
|
+
* when the partner enables attribution via `showAttribution`.
|
|
7
|
+
*
|
|
8
|
+
* Styling inherits from the parent's --od-* CSS custom properties,
|
|
9
|
+
* so it automatically matches whatever theme the parent uses.
|
|
10
|
+
*/
|
|
11
|
+
export declare function PoweredByOpendoor(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=PoweredByOpendoor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PoweredByOpendoor.d.ts","sourceRoot":"","sources":["../../../src/components/shared/PoweredByOpendoor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqBH,wBAAgB,iBAAiB,4CAOhC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { OpendoorProvider } from './provider';
|
|
2
|
+
export type { OpendoorProviderProps } from './provider';
|
|
3
|
+
export { useOpendoorClient } from './useOpendoorClient';
|
|
4
|
+
export { AddressEntry } from './components/AddressEntry';
|
|
5
|
+
export type { AddressEntryProps } from './components/AddressEntry';
|
|
6
|
+
export { QualificationQuestions } from './components/QualificationQuestions';
|
|
7
|
+
export type { QualificationQuestionsProps } from './components/QualificationQuestions';
|
|
8
|
+
export type { Address, CreateOfferRequest, CreateOfferResponse, AddressSuggestionsResponse, OpendoorClientConfig, OpendoorAppearance, OpendoorThemeVariables, } from '@opendoor/partner-sdk-client-js-core';
|
|
9
|
+
export { THEMES, resolveAppearance, } from '@opendoor/partner-sdk-client-js-core';
|
|
10
|
+
export type { AddressData, AddressPrediction, QuestionnaireData, SDKConfig, SDKStep, SDKError, SubmitResult, ClassNameOverrides, } from './types';
|
|
11
|
+
export type { AnswerValue, EligibilityOption, EligibilityAnswers, HomeDetailsAnswers, QuestionnaireAnswers, QuestionnaireStep, QuestionnaireState, ValidationError, ValidationResult, } from './types/questionnaire';
|
|
12
|
+
export { useSDKStore, initializeSDK, getApiBaseUrl, getConfig } from './store';
|
|
13
|
+
export { createOfferRequest, updateOfferRequest, getOfferStatus, getHomeDetail, transformAddressForApi, transformQuestionnaireForApi, } from './services/partnerApi';
|
|
14
|
+
export type { OfferRequestCreateParams, OfferRequestCreateResponse, OfferRequestUpdateParams, OfferRequestUpdateResponse, OfferStatusParams, OfferStatusResponse, HomeDetailParams, HomeDetailResponse, } from './services/partnerApi';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;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