@opendoor/partner-sdk-client-vue 1.0.0
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 +362 -0
- package/dist/index.js +1944 -0
- package/dist/style.css +1 -0
- package/package.json +54 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { Address } from '../../client-js-core/src/index.ts';
|
|
2
|
+
import { Address as Address_2 } from '../../../../client-js-core/src/index.ts';
|
|
3
|
+
import { AddressSuggestionsResponse } from '../../client-js-core/src/index.ts';
|
|
4
|
+
import { AnswerValue } from '../../../../client-js-core/src/internal/questionnaire/index.ts';
|
|
5
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
6
|
+
import { ComponentProvideOptions } from 'vue';
|
|
7
|
+
import { ComputedRef } from 'vue';
|
|
8
|
+
import { CreateOfferRequest } from '../../client-js-core/src/index.ts';
|
|
9
|
+
import { CreateOfferResponse } from '../../client-js-core/src/index.ts';
|
|
10
|
+
import { DefineComponent } from 'vue';
|
|
11
|
+
import { ExtractPropTypes } from 'vue';
|
|
12
|
+
import { OpendoorAppearance } from '../../client-js-core/src/index.ts';
|
|
13
|
+
import { OpendoorAppearance as OpendoorAppearance_2 } from '../../../../client-js-core/src/index.ts';
|
|
14
|
+
import { OpendoorClient } from '../../client-js-core/src/index.ts';
|
|
15
|
+
import { OpendoorClient as OpendoorClient_2 } from '../../../client-js-core/src/index.ts';
|
|
16
|
+
import { OpendoorClientConfig } from '../../client-js-core/src/index.ts';
|
|
17
|
+
import { OpendoorThemeVariables } from '../../client-js-core/src/index.ts';
|
|
18
|
+
import { PropType } from 'vue';
|
|
19
|
+
import { PublicProps } from 'vue';
|
|
20
|
+
import { resolveAppearance } from '../../client-js-core/src/index.ts';
|
|
21
|
+
import { THEMES } from '../../client-js-core/src/index.ts';
|
|
22
|
+
|
|
23
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
24
|
+
client: OpendoorClient;
|
|
25
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
26
|
+
client: OpendoorClient;
|
|
27
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
|
|
29
|
+
declare const __VLS_component_2: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_2<{
|
|
30
|
+
enableAddressSuggestions?: boolean;
|
|
31
|
+
debounceMs?: number;
|
|
32
|
+
showAttribution?: boolean;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
placeholderText?: string;
|
|
35
|
+
buttonText?: string;
|
|
36
|
+
showButton?: boolean;
|
|
37
|
+
manualEntryText?: string;
|
|
38
|
+
appearance?: OpendoorAppearance_2;
|
|
39
|
+
}>, {
|
|
40
|
+
enableAddressSuggestions: boolean;
|
|
41
|
+
debounceMs: number;
|
|
42
|
+
showAttribution: boolean;
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
placeholderText: string;
|
|
45
|
+
buttonText: string;
|
|
46
|
+
showButton: boolean;
|
|
47
|
+
manualEntryText: string;
|
|
48
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
49
|
+
change: (address: Partial<Address_2>) => void;
|
|
50
|
+
error: (error: Error) => void;
|
|
51
|
+
"address-select": (address: Address_2) => void;
|
|
52
|
+
ready: () => void;
|
|
53
|
+
"validation-error": (error: string) => void;
|
|
54
|
+
"address-suggestions-start": (query: string) => void;
|
|
55
|
+
"address-suggestions-complete": (suggestions: Address_2[]) => void;
|
|
56
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps_2<{
|
|
57
|
+
enableAddressSuggestions?: boolean;
|
|
58
|
+
debounceMs?: number;
|
|
59
|
+
showAttribution?: boolean;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
placeholderText?: string;
|
|
62
|
+
buttonText?: string;
|
|
63
|
+
showButton?: boolean;
|
|
64
|
+
manualEntryText?: string;
|
|
65
|
+
appearance?: OpendoorAppearance_2;
|
|
66
|
+
}>, {
|
|
67
|
+
enableAddressSuggestions: boolean;
|
|
68
|
+
debounceMs: number;
|
|
69
|
+
showAttribution: boolean;
|
|
70
|
+
disabled: boolean;
|
|
71
|
+
placeholderText: string;
|
|
72
|
+
buttonText: string;
|
|
73
|
+
showButton: boolean;
|
|
74
|
+
manualEntryText: string;
|
|
75
|
+
}>>> & Readonly<{
|
|
76
|
+
onChange?: ((address: Partial<Address_2>) => any) | undefined;
|
|
77
|
+
onError?: ((error: Error) => any) | undefined;
|
|
78
|
+
"onAddress-select"?: ((address: Address_2) => any) | undefined;
|
|
79
|
+
onReady?: (() => any) | undefined;
|
|
80
|
+
"onValidation-error"?: ((error: string) => any) | undefined;
|
|
81
|
+
"onAddress-suggestions-start"?: ((query: string) => any) | undefined;
|
|
82
|
+
"onAddress-suggestions-complete"?: ((suggestions: Address_2[]) => any) | undefined;
|
|
83
|
+
}>, {
|
|
84
|
+
enableAddressSuggestions: boolean;
|
|
85
|
+
debounceMs: number;
|
|
86
|
+
showAttribution: boolean;
|
|
87
|
+
disabled: boolean;
|
|
88
|
+
placeholderText: string;
|
|
89
|
+
buttonText: string;
|
|
90
|
+
showButton: boolean;
|
|
91
|
+
manualEntryText: string;
|
|
92
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
93
|
+
|
|
94
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
95
|
+
|
|
96
|
+
declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
|
|
97
|
+
|
|
98
|
+
declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
|
|
99
|
+
|
|
100
|
+
declare type __VLS_NonUndefinedable_4<T> = T extends undefined ? never : T;
|
|
101
|
+
|
|
102
|
+
declare type __VLS_NonUndefinedable_5<T> = T extends undefined ? never : T;
|
|
103
|
+
|
|
104
|
+
declare type __VLS_Prettify<T> = {
|
|
105
|
+
[K in keyof T]: T[K];
|
|
106
|
+
} & {};
|
|
107
|
+
|
|
108
|
+
declare type __VLS_Prettify_2<T> = {
|
|
109
|
+
[K in keyof T]: T[K];
|
|
110
|
+
} & {};
|
|
111
|
+
|
|
112
|
+
declare type __VLS_Prettify_3<T> = {
|
|
113
|
+
[K in keyof T]: T[K];
|
|
114
|
+
} & {};
|
|
115
|
+
|
|
116
|
+
declare function __VLS_template(): {
|
|
117
|
+
default?(_: {}): any;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
declare function __VLS_template_2(): Readonly<{
|
|
121
|
+
'button-icon'?: () => unknown;
|
|
122
|
+
'input-icon'?: () => unknown;
|
|
123
|
+
}> & {
|
|
124
|
+
'button-icon'?: () => unknown;
|
|
125
|
+
'input-icon'?: () => unknown;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
129
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
130
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
131
|
+
} : {
|
|
132
|
+
type: PropType<T[K]>;
|
|
133
|
+
required: true;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
declare type __VLS_TypePropsToRuntimeProps_2<T> = {
|
|
138
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
139
|
+
type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
|
|
140
|
+
} : {
|
|
141
|
+
type: PropType<T[K]>;
|
|
142
|
+
required: true;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
declare type __VLS_TypePropsToRuntimeProps_3<T> = {
|
|
147
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
148
|
+
type: PropType<__VLS_NonUndefinedable_3<T[K]>>;
|
|
149
|
+
} : {
|
|
150
|
+
type: PropType<T[K]>;
|
|
151
|
+
required: true;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
declare type __VLS_TypePropsToRuntimeProps_4<T> = {
|
|
156
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
157
|
+
type: PropType<__VLS_NonUndefinedable_4<T[K]>>;
|
|
158
|
+
} : {
|
|
159
|
+
type: PropType<T[K]>;
|
|
160
|
+
required: true;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
declare type __VLS_TypePropsToRuntimeProps_5<T> = {
|
|
165
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
166
|
+
type: PropType<__VLS_NonUndefinedable_5<T[K]>>;
|
|
167
|
+
} : {
|
|
168
|
+
type: PropType<T[K]>;
|
|
169
|
+
required: true;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
174
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
175
|
+
default: D[K];
|
|
176
|
+
}> : P[K];
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
declare type __VLS_WithDefaults_2<P, D> = {
|
|
180
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_2<P[K] & {
|
|
181
|
+
default: D[K];
|
|
182
|
+
}> : P[K];
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
declare type __VLS_WithDefaults_3<P, D> = {
|
|
186
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_3<P[K] & {
|
|
187
|
+
default: D[K];
|
|
188
|
+
}> : P[K];
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
192
|
+
new (): {
|
|
193
|
+
$slots: S;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
198
|
+
new (): {
|
|
199
|
+
$slots: S;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export { Address }
|
|
204
|
+
|
|
205
|
+
export declare const AddressEntry: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, ReturnType<typeof __VLS_template_2>>;
|
|
206
|
+
|
|
207
|
+
export declare const AddressMap: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_3<{
|
|
208
|
+
address: Address_2;
|
|
209
|
+
appearance?: OpendoorAppearance_2;
|
|
210
|
+
mapboxAccessToken?: string;
|
|
211
|
+
mapPinMarker?: string;
|
|
212
|
+
width?: number;
|
|
213
|
+
height?: number;
|
|
214
|
+
zoom?: number;
|
|
215
|
+
borderRadius?: string;
|
|
216
|
+
}>, {
|
|
217
|
+
width: number;
|
|
218
|
+
height: number;
|
|
219
|
+
zoom: number;
|
|
220
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
221
|
+
error: (error: Error) => void;
|
|
222
|
+
load: () => void;
|
|
223
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_3<{
|
|
224
|
+
address: Address_2;
|
|
225
|
+
appearance?: OpendoorAppearance_2;
|
|
226
|
+
mapboxAccessToken?: string;
|
|
227
|
+
mapPinMarker?: string;
|
|
228
|
+
width?: number;
|
|
229
|
+
height?: number;
|
|
230
|
+
zoom?: number;
|
|
231
|
+
borderRadius?: string;
|
|
232
|
+
}>, {
|
|
233
|
+
width: number;
|
|
234
|
+
height: number;
|
|
235
|
+
zoom: number;
|
|
236
|
+
}>>> & Readonly<{
|
|
237
|
+
onError?: ((error: Error) => any) | undefined;
|
|
238
|
+
onLoad?: (() => any) | undefined;
|
|
239
|
+
}>, {
|
|
240
|
+
width: number;
|
|
241
|
+
height: number;
|
|
242
|
+
zoom: number;
|
|
243
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
244
|
+
|
|
245
|
+
export { AddressSuggestionsResponse }
|
|
246
|
+
|
|
247
|
+
export declare const AddressUnitConfirmation: DefineComponent<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<{
|
|
248
|
+
address: Address_2;
|
|
249
|
+
appearance?: OpendoorAppearance_2;
|
|
250
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
251
|
+
error: (error: Error) => void;
|
|
252
|
+
ready: () => void;
|
|
253
|
+
confirm: (address: Address_2) => void;
|
|
254
|
+
edit: () => void;
|
|
255
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps_4<{
|
|
256
|
+
address: Address_2;
|
|
257
|
+
appearance?: OpendoorAppearance_2;
|
|
258
|
+
}>>> & Readonly<{
|
|
259
|
+
onError?: ((error: Error) => any) | undefined;
|
|
260
|
+
onReady?: (() => any) | undefined;
|
|
261
|
+
onConfirm?: ((address: Address_2) => any) | undefined;
|
|
262
|
+
onEdit?: (() => any) | undefined;
|
|
263
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
264
|
+
|
|
265
|
+
export { CreateOfferRequest }
|
|
266
|
+
|
|
267
|
+
export { CreateOfferResponse }
|
|
268
|
+
|
|
269
|
+
export declare const DtcOnboardingFlow: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_5<{
|
|
270
|
+
/** The selected address for the offer. */
|
|
271
|
+
address: Address_2;
|
|
272
|
+
/** URL to the partner's logo image. Displayed in the header next to "Opendoor". */
|
|
273
|
+
partnerLogoUrl?: string;
|
|
274
|
+
/** Theme customization. Uses 'minimal' defaults if not provided. */
|
|
275
|
+
appearance?: OpendoorAppearance_2;
|
|
276
|
+
/** Pre-filled answers (e.g., from address lookup or prior session). */
|
|
277
|
+
initialAnswers?: Record<string, AnswerValue>;
|
|
278
|
+
/** Market identifier for market-dependent questions (e.g., eligibility criteria). */
|
|
279
|
+
market?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Called when the close (X) button is clicked.
|
|
282
|
+
* When provided, the close button is rendered in the header.
|
|
283
|
+
* When omitted, no close button is shown (matches React parity).
|
|
284
|
+
*/
|
|
285
|
+
onClose?: () => void;
|
|
286
|
+
}>, {
|
|
287
|
+
appearance: () => {
|
|
288
|
+
theme: "minimal";
|
|
289
|
+
};
|
|
290
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
291
|
+
error: (error: Error) => void;
|
|
292
|
+
submit: (answers: Record<string, AnswerValue>) => void;
|
|
293
|
+
ready: () => void;
|
|
294
|
+
"page-change": (pageIndex: number, pageId: string) => void;
|
|
295
|
+
"answer-change": (key: string, value: AnswerValue) => void;
|
|
296
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_5<{
|
|
297
|
+
/** The selected address for the offer. */
|
|
298
|
+
address: Address_2;
|
|
299
|
+
/** URL to the partner's logo image. Displayed in the header next to "Opendoor". */
|
|
300
|
+
partnerLogoUrl?: string;
|
|
301
|
+
/** Theme customization. Uses 'minimal' defaults if not provided. */
|
|
302
|
+
appearance?: OpendoorAppearance_2;
|
|
303
|
+
/** Pre-filled answers (e.g., from address lookup or prior session). */
|
|
304
|
+
initialAnswers?: Record<string, AnswerValue>;
|
|
305
|
+
/** Market identifier for market-dependent questions (e.g., eligibility criteria). */
|
|
306
|
+
market?: string;
|
|
307
|
+
/**
|
|
308
|
+
* Called when the close (X) button is clicked.
|
|
309
|
+
* When provided, the close button is rendered in the header.
|
|
310
|
+
* When omitted, no close button is shown (matches React parity).
|
|
311
|
+
*/
|
|
312
|
+
onClose?: () => void;
|
|
313
|
+
}>, {
|
|
314
|
+
appearance: () => {
|
|
315
|
+
theme: "minimal";
|
|
316
|
+
};
|
|
317
|
+
}>>> & Readonly<{
|
|
318
|
+
onError?: ((error: Error) => any) | undefined;
|
|
319
|
+
onSubmit?: ((answers: Record<string, AnswerValue>) => any) | undefined;
|
|
320
|
+
onReady?: (() => any) | undefined;
|
|
321
|
+
"onPage-change"?: ((pageIndex: number, pageId: string) => any) | undefined;
|
|
322
|
+
"onAnswer-change"?: ((key: string, value: AnswerValue) => any) | undefined;
|
|
323
|
+
}>, {
|
|
324
|
+
appearance: OpendoorAppearance_2;
|
|
325
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
326
|
+
|
|
327
|
+
export { OpendoorAppearance }
|
|
328
|
+
|
|
329
|
+
export { OpendoorClient }
|
|
330
|
+
|
|
331
|
+
export { OpendoorClientConfig }
|
|
332
|
+
|
|
333
|
+
export declare const OpendoorProvider: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
334
|
+
|
|
335
|
+
export { OpendoorThemeVariables }
|
|
336
|
+
|
|
337
|
+
export { resolveAppearance }
|
|
338
|
+
|
|
339
|
+
export { THEMES }
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Access the OpendoorClient provided by {@link OpendoorProvider}.
|
|
343
|
+
* Must be called inside a component wrapped in `<OpendoorProvider>`.
|
|
344
|
+
*
|
|
345
|
+
* Returns a `ComputedRef` so the value stays reactive — if the parent
|
|
346
|
+
* changes the `client` prop on `OpendoorProvider`, consumers automatically
|
|
347
|
+
* see the new client when accessing `.value`.
|
|
348
|
+
*
|
|
349
|
+
* @throws Error if called outside of an `<OpendoorProvider>`.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```vue
|
|
353
|
+
* <script setup lang="ts">
|
|
354
|
+
* import { useOpendoorClient } from '@opendoor/partner-sdk-client-vue';
|
|
355
|
+
* const client = useOpendoorClient();
|
|
356
|
+
* const suggestions = await client.value.getAddressSuggestions('123 Main');
|
|
357
|
+
* </script>
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
export declare function useOpendoorClient(): ComputedRef<OpendoorClient_2>;
|
|
361
|
+
|
|
362
|
+
export { }
|