@wix/auto_sdk_property_property 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/build/cjs/index.d.ts +11 -0
- package/build/cjs/index.js +982 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1216 -0
- package/build/cjs/index.typings.js +876 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +877 -0
- package/build/cjs/meta.js +734 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +11 -0
- package/build/es/index.mjs +939 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1216 -0
- package/build/es/index.typings.mjs +832 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +877 -0
- package/build/es/meta.mjs +691 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +123 -0
- package/build/internal/cjs/index.js +982 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1338 -0
- package/build/internal/cjs/index.typings.js +876 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +877 -0
- package/build/internal/cjs/meta.js +734 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +123 -0
- package/build/internal/es/index.mjs +939 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1338 -0
- package/build/internal/es/index.typings.mjs +832 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +877 -0
- package/build/internal/es/meta.mjs +691 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
// src/real-estate-v1-property-property.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
4
|
+
import {
|
|
5
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
6
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
7
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
8
|
+
|
|
9
|
+
// src/real-estate-v1-property-property.http.ts
|
|
10
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
12
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
13
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
15
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
16
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
17
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
18
|
+
function resolveWixRealEstateV1PropertyServiceUrl(opts) {
|
|
19
|
+
const domainToMappings = {};
|
|
20
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
21
|
+
}
|
|
22
|
+
var PACKAGE_NAME = "@wix/auto_sdk_property_property";
|
|
23
|
+
function createProperty(payload) {
|
|
24
|
+
function __createProperty({ host }) {
|
|
25
|
+
const serializedData = transformPaths(payload, [
|
|
26
|
+
{
|
|
27
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
28
|
+
paths: [
|
|
29
|
+
{ path: "property.createdDate" },
|
|
30
|
+
{ path: "property.updatedDate" },
|
|
31
|
+
{ path: "property.listingDate" },
|
|
32
|
+
{ path: "property.saleDate" }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
37
|
+
paths: [
|
|
38
|
+
{ path: "property.baths" },
|
|
39
|
+
{ path: "property.lat" },
|
|
40
|
+
{ path: "property.lng" }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]);
|
|
44
|
+
const metadata = {
|
|
45
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
46
|
+
method: "POST",
|
|
47
|
+
methodFqn: "wix.real_estate.v1.PropertyService.CreateProperty",
|
|
48
|
+
packageName: PACKAGE_NAME,
|
|
49
|
+
migrationOptions: {
|
|
50
|
+
optInTransformResponse: true
|
|
51
|
+
},
|
|
52
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
53
|
+
protoPath: "/v1/properties",
|
|
54
|
+
data: serializedData,
|
|
55
|
+
host
|
|
56
|
+
}),
|
|
57
|
+
data: serializedData,
|
|
58
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
59
|
+
{
|
|
60
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
61
|
+
paths: [
|
|
62
|
+
{ path: "property.createdDate" },
|
|
63
|
+
{ path: "property.updatedDate" },
|
|
64
|
+
{ path: "property.listingDate" },
|
|
65
|
+
{ path: "property.saleDate" }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
70
|
+
paths: [
|
|
71
|
+
{ path: "property.baths" },
|
|
72
|
+
{ path: "property.lat" },
|
|
73
|
+
{ path: "property.lng" }
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
])
|
|
77
|
+
};
|
|
78
|
+
return metadata;
|
|
79
|
+
}
|
|
80
|
+
return __createProperty;
|
|
81
|
+
}
|
|
82
|
+
function getProperty(payload) {
|
|
83
|
+
function __getProperty({ host }) {
|
|
84
|
+
const metadata = {
|
|
85
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
86
|
+
method: "GET",
|
|
87
|
+
methodFqn: "wix.real_estate.v1.PropertyService.GetProperty",
|
|
88
|
+
packageName: PACKAGE_NAME,
|
|
89
|
+
migrationOptions: {
|
|
90
|
+
optInTransformResponse: true
|
|
91
|
+
},
|
|
92
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
93
|
+
protoPath: "/v1/properties/{propertyId}",
|
|
94
|
+
data: payload,
|
|
95
|
+
host
|
|
96
|
+
}),
|
|
97
|
+
params: toURLSearchParams(payload),
|
|
98
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
99
|
+
{
|
|
100
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
101
|
+
paths: [
|
|
102
|
+
{ path: "property.createdDate" },
|
|
103
|
+
{ path: "property.updatedDate" },
|
|
104
|
+
{ path: "property.listingDate" },
|
|
105
|
+
{ path: "property.saleDate" }
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
110
|
+
paths: [
|
|
111
|
+
{ path: "property.baths" },
|
|
112
|
+
{ path: "property.lat" },
|
|
113
|
+
{ path: "property.lng" }
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
])
|
|
117
|
+
};
|
|
118
|
+
return metadata;
|
|
119
|
+
}
|
|
120
|
+
return __getProperty;
|
|
121
|
+
}
|
|
122
|
+
function updateProperty(payload) {
|
|
123
|
+
function __updateProperty({ host }) {
|
|
124
|
+
const serializedData = transformPaths(payload, [
|
|
125
|
+
{
|
|
126
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
127
|
+
paths: [{ path: "fieldMask" }]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
131
|
+
paths: [
|
|
132
|
+
{ path: "property.createdDate" },
|
|
133
|
+
{ path: "property.updatedDate" },
|
|
134
|
+
{ path: "property.listingDate" },
|
|
135
|
+
{ path: "property.saleDate" }
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
140
|
+
paths: [
|
|
141
|
+
{ path: "property.baths" },
|
|
142
|
+
{ path: "property.lat" },
|
|
143
|
+
{ path: "property.lng" }
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]);
|
|
147
|
+
const metadata = {
|
|
148
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
149
|
+
method: "PATCH",
|
|
150
|
+
methodFqn: "wix.real_estate.v1.PropertyService.UpdateProperty",
|
|
151
|
+
packageName: PACKAGE_NAME,
|
|
152
|
+
migrationOptions: {
|
|
153
|
+
optInTransformResponse: true
|
|
154
|
+
},
|
|
155
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
156
|
+
protoPath: "/v1/properties/{property.id}",
|
|
157
|
+
data: serializedData,
|
|
158
|
+
host
|
|
159
|
+
}),
|
|
160
|
+
data: serializedData,
|
|
161
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
162
|
+
{
|
|
163
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
164
|
+
paths: [
|
|
165
|
+
{ path: "property.createdDate" },
|
|
166
|
+
{ path: "property.updatedDate" },
|
|
167
|
+
{ path: "property.listingDate" },
|
|
168
|
+
{ path: "property.saleDate" }
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
173
|
+
paths: [
|
|
174
|
+
{ path: "property.baths" },
|
|
175
|
+
{ path: "property.lat" },
|
|
176
|
+
{ path: "property.lng" }
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
])
|
|
180
|
+
};
|
|
181
|
+
return metadata;
|
|
182
|
+
}
|
|
183
|
+
return __updateProperty;
|
|
184
|
+
}
|
|
185
|
+
function deleteProperty(payload) {
|
|
186
|
+
function __deleteProperty({ host }) {
|
|
187
|
+
const metadata = {
|
|
188
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
189
|
+
method: "DELETE",
|
|
190
|
+
methodFqn: "wix.real_estate.v1.PropertyService.DeleteProperty",
|
|
191
|
+
packageName: PACKAGE_NAME,
|
|
192
|
+
migrationOptions: {
|
|
193
|
+
optInTransformResponse: true
|
|
194
|
+
},
|
|
195
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
196
|
+
protoPath: "/v1/properties/{propertyId}",
|
|
197
|
+
data: payload,
|
|
198
|
+
host
|
|
199
|
+
}),
|
|
200
|
+
params: toURLSearchParams(payload)
|
|
201
|
+
};
|
|
202
|
+
return metadata;
|
|
203
|
+
}
|
|
204
|
+
return __deleteProperty;
|
|
205
|
+
}
|
|
206
|
+
function queryProperties(payload) {
|
|
207
|
+
function __queryProperties({ host }) {
|
|
208
|
+
const metadata = {
|
|
209
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
210
|
+
method: "GET",
|
|
211
|
+
methodFqn: "wix.real_estate.v1.PropertyService.QueryProperties",
|
|
212
|
+
packageName: PACKAGE_NAME,
|
|
213
|
+
migrationOptions: {
|
|
214
|
+
optInTransformResponse: true
|
|
215
|
+
},
|
|
216
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
217
|
+
protoPath: "/v1/properties/query",
|
|
218
|
+
data: payload,
|
|
219
|
+
host
|
|
220
|
+
}),
|
|
221
|
+
params: toURLSearchParams(payload, true),
|
|
222
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
223
|
+
{
|
|
224
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
225
|
+
paths: [
|
|
226
|
+
{ path: "properties.createdDate" },
|
|
227
|
+
{ path: "properties.updatedDate" },
|
|
228
|
+
{ path: "properties.listingDate" },
|
|
229
|
+
{ path: "properties.saleDate" }
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
234
|
+
paths: [
|
|
235
|
+
{ path: "properties.baths" },
|
|
236
|
+
{ path: "properties.lat" },
|
|
237
|
+
{ path: "properties.lng" }
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
]),
|
|
241
|
+
fallback: [
|
|
242
|
+
{
|
|
243
|
+
method: "POST",
|
|
244
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
245
|
+
protoPath: "/v1/properties/query",
|
|
246
|
+
data: payload,
|
|
247
|
+
host
|
|
248
|
+
}),
|
|
249
|
+
data: payload
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
};
|
|
253
|
+
return metadata;
|
|
254
|
+
}
|
|
255
|
+
return __queryProperties;
|
|
256
|
+
}
|
|
257
|
+
function bulkCreateProperties(payload) {
|
|
258
|
+
function __bulkCreateProperties({ host }) {
|
|
259
|
+
const serializedData = transformPaths(payload, [
|
|
260
|
+
{
|
|
261
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
262
|
+
paths: [
|
|
263
|
+
{ path: "properties.createdDate" },
|
|
264
|
+
{ path: "properties.updatedDate" },
|
|
265
|
+
{ path: "properties.listingDate" },
|
|
266
|
+
{ path: "properties.saleDate" }
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
271
|
+
paths: [
|
|
272
|
+
{ path: "properties.baths" },
|
|
273
|
+
{ path: "properties.lat" },
|
|
274
|
+
{ path: "properties.lng" }
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
]);
|
|
278
|
+
const metadata = {
|
|
279
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
280
|
+
method: "POST",
|
|
281
|
+
methodFqn: "wix.real_estate.v1.PropertyService.BulkCreateProperties",
|
|
282
|
+
packageName: PACKAGE_NAME,
|
|
283
|
+
migrationOptions: {
|
|
284
|
+
optInTransformResponse: true
|
|
285
|
+
},
|
|
286
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
287
|
+
protoPath: "/v1/bulk/properties/create",
|
|
288
|
+
data: serializedData,
|
|
289
|
+
host
|
|
290
|
+
}),
|
|
291
|
+
data: serializedData,
|
|
292
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
293
|
+
{
|
|
294
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
295
|
+
paths: [
|
|
296
|
+
{ path: "results.item.createdDate" },
|
|
297
|
+
{ path: "results.item.updatedDate" },
|
|
298
|
+
{ path: "results.item.listingDate" },
|
|
299
|
+
{ path: "results.item.saleDate" }
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
304
|
+
paths: [
|
|
305
|
+
{ path: "results.item.baths" },
|
|
306
|
+
{ path: "results.item.lat" },
|
|
307
|
+
{ path: "results.item.lng" }
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
])
|
|
311
|
+
};
|
|
312
|
+
return metadata;
|
|
313
|
+
}
|
|
314
|
+
return __bulkCreateProperties;
|
|
315
|
+
}
|
|
316
|
+
function bulkUpdateProperties(payload) {
|
|
317
|
+
function __bulkUpdateProperties({ host }) {
|
|
318
|
+
const serializedData = transformPaths(payload, [
|
|
319
|
+
{
|
|
320
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
321
|
+
paths: [{ path: "properties.fieldMask" }]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
325
|
+
paths: [
|
|
326
|
+
{ path: "properties.property.createdDate" },
|
|
327
|
+
{ path: "properties.property.updatedDate" },
|
|
328
|
+
{ path: "properties.property.listingDate" },
|
|
329
|
+
{ path: "properties.property.saleDate" }
|
|
330
|
+
]
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
334
|
+
paths: [
|
|
335
|
+
{ path: "properties.property.baths" },
|
|
336
|
+
{ path: "properties.property.lat" },
|
|
337
|
+
{ path: "properties.property.lng" }
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
]);
|
|
341
|
+
const metadata = {
|
|
342
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
343
|
+
method: "POST",
|
|
344
|
+
methodFqn: "wix.real_estate.v1.PropertyService.BulkUpdateProperties",
|
|
345
|
+
packageName: PACKAGE_NAME,
|
|
346
|
+
migrationOptions: {
|
|
347
|
+
optInTransformResponse: true
|
|
348
|
+
},
|
|
349
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
350
|
+
protoPath: "/v1/bulk/properties/update",
|
|
351
|
+
data: serializedData,
|
|
352
|
+
host
|
|
353
|
+
}),
|
|
354
|
+
data: serializedData,
|
|
355
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
356
|
+
{
|
|
357
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
358
|
+
paths: [
|
|
359
|
+
{ path: "results.item.createdDate" },
|
|
360
|
+
{ path: "results.item.updatedDate" },
|
|
361
|
+
{ path: "results.item.listingDate" },
|
|
362
|
+
{ path: "results.item.saleDate" }
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
367
|
+
paths: [
|
|
368
|
+
{ path: "results.item.baths" },
|
|
369
|
+
{ path: "results.item.lat" },
|
|
370
|
+
{ path: "results.item.lng" }
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
])
|
|
374
|
+
};
|
|
375
|
+
return metadata;
|
|
376
|
+
}
|
|
377
|
+
return __bulkUpdateProperties;
|
|
378
|
+
}
|
|
379
|
+
function bulkDeleteProperties(payload) {
|
|
380
|
+
function __bulkDeleteProperties({ host }) {
|
|
381
|
+
const metadata = {
|
|
382
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
383
|
+
method: "POST",
|
|
384
|
+
methodFqn: "wix.real_estate.v1.PropertyService.BulkDeleteProperties",
|
|
385
|
+
packageName: PACKAGE_NAME,
|
|
386
|
+
migrationOptions: {
|
|
387
|
+
optInTransformResponse: true
|
|
388
|
+
},
|
|
389
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
390
|
+
protoPath: "/v1/bulk/properties/delete",
|
|
391
|
+
data: payload,
|
|
392
|
+
host
|
|
393
|
+
}),
|
|
394
|
+
data: payload
|
|
395
|
+
};
|
|
396
|
+
return metadata;
|
|
397
|
+
}
|
|
398
|
+
return __bulkDeleteProperties;
|
|
399
|
+
}
|
|
400
|
+
function bulkUpdatePropertyTags(payload) {
|
|
401
|
+
function __bulkUpdatePropertyTags({ host }) {
|
|
402
|
+
const metadata = {
|
|
403
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
404
|
+
method: "POST",
|
|
405
|
+
methodFqn: "wix.real_estate.v1.PropertyService.BulkUpdatePropertyTags",
|
|
406
|
+
packageName: PACKAGE_NAME,
|
|
407
|
+
migrationOptions: {
|
|
408
|
+
optInTransformResponse: true
|
|
409
|
+
},
|
|
410
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
411
|
+
protoPath: "/v1/bulk/properties/update-tags",
|
|
412
|
+
data: payload,
|
|
413
|
+
host
|
|
414
|
+
}),
|
|
415
|
+
data: payload
|
|
416
|
+
};
|
|
417
|
+
return metadata;
|
|
418
|
+
}
|
|
419
|
+
return __bulkUpdatePropertyTags;
|
|
420
|
+
}
|
|
421
|
+
function bulkUpdatePropertyTagsByFilter(payload) {
|
|
422
|
+
function __bulkUpdatePropertyTagsByFilter({ host }) {
|
|
423
|
+
const metadata = {
|
|
424
|
+
entityFqdn: "wix.real_estate.v1.property",
|
|
425
|
+
method: "POST",
|
|
426
|
+
methodFqn: "wix.real_estate.v1.PropertyService.BulkUpdatePropertyTagsByFilter",
|
|
427
|
+
packageName: PACKAGE_NAME,
|
|
428
|
+
migrationOptions: {
|
|
429
|
+
optInTransformResponse: true
|
|
430
|
+
},
|
|
431
|
+
url: resolveWixRealEstateV1PropertyServiceUrl({
|
|
432
|
+
protoPath: "/v1/bulk/properties/update-tags-by-filter",
|
|
433
|
+
data: payload,
|
|
434
|
+
host
|
|
435
|
+
}),
|
|
436
|
+
data: payload
|
|
437
|
+
};
|
|
438
|
+
return metadata;
|
|
439
|
+
}
|
|
440
|
+
return __bulkUpdatePropertyTagsByFilter;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// src/real-estate-v1-property-property.universal.ts
|
|
444
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
445
|
+
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
446
|
+
var PropertyStatus = /* @__PURE__ */ ((PropertyStatus2) => {
|
|
447
|
+
PropertyStatus2["PROPERTY_STATUS_UNKNOWN"] = "PROPERTY_STATUS_UNKNOWN";
|
|
448
|
+
PropertyStatus2["ACTIVE"] = "ACTIVE";
|
|
449
|
+
PropertyStatus2["PENDING"] = "PENDING";
|
|
450
|
+
PropertyStatus2["SOLD"] = "SOLD";
|
|
451
|
+
PropertyStatus2["OFF_MARKET"] = "OFF_MARKET";
|
|
452
|
+
PropertyStatus2["DRAFT"] = "DRAFT";
|
|
453
|
+
return PropertyStatus2;
|
|
454
|
+
})(PropertyStatus || {});
|
|
455
|
+
var PropertyType = /* @__PURE__ */ ((PropertyType2) => {
|
|
456
|
+
PropertyType2["PROPERTY_TYPE_UNKNOWN"] = "PROPERTY_TYPE_UNKNOWN";
|
|
457
|
+
PropertyType2["SINGLE_FAMILY"] = "SINGLE_FAMILY";
|
|
458
|
+
PropertyType2["CONDO"] = "CONDO";
|
|
459
|
+
PropertyType2["TOWNHOUSE"] = "TOWNHOUSE";
|
|
460
|
+
PropertyType2["MULTI_FAMILY"] = "MULTI_FAMILY";
|
|
461
|
+
PropertyType2["LAND"] = "LAND";
|
|
462
|
+
PropertyType2["COMMERCIAL"] = "COMMERCIAL";
|
|
463
|
+
return PropertyType2;
|
|
464
|
+
})(PropertyType || {});
|
|
465
|
+
var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
|
|
466
|
+
DocumentType2["DOCUMENT_TYPE_UNKNOWN"] = "DOCUMENT_TYPE_UNKNOWN";
|
|
467
|
+
DocumentType2["FLOOR_PLAN"] = "FLOOR_PLAN";
|
|
468
|
+
DocumentType2["DISCLOSURE"] = "DISCLOSURE";
|
|
469
|
+
DocumentType2["BROCHURE"] = "BROCHURE";
|
|
470
|
+
DocumentType2["OTHER"] = "OTHER";
|
|
471
|
+
return DocumentType2;
|
|
472
|
+
})(DocumentType || {});
|
|
473
|
+
var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
474
|
+
CustomFieldType2["CUSTOM_FIELD_TYPE_UNKNOWN"] = "CUSTOM_FIELD_TYPE_UNKNOWN";
|
|
475
|
+
CustomFieldType2["STRING"] = "STRING";
|
|
476
|
+
CustomFieldType2["NUMBER"] = "NUMBER";
|
|
477
|
+
CustomFieldType2["BOOLEAN"] = "BOOLEAN";
|
|
478
|
+
CustomFieldType2["DATE"] = "DATE";
|
|
479
|
+
return CustomFieldType2;
|
|
480
|
+
})(CustomFieldType || {});
|
|
481
|
+
var PropertySource = /* @__PURE__ */ ((PropertySource2) => {
|
|
482
|
+
PropertySource2["PROPERTY_SOURCE_UNKNOWN"] = "PROPERTY_SOURCE_UNKNOWN";
|
|
483
|
+
PropertySource2["MANUAL"] = "MANUAL";
|
|
484
|
+
PropertySource2["MLS"] = "MLS";
|
|
485
|
+
return PropertySource2;
|
|
486
|
+
})(PropertySource || {});
|
|
487
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
488
|
+
SortOrder2["ASC"] = "ASC";
|
|
489
|
+
SortOrder2["DESC"] = "DESC";
|
|
490
|
+
return SortOrder2;
|
|
491
|
+
})(SortOrder || {});
|
|
492
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
493
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
494
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
495
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
496
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
497
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
498
|
+
return WebhookIdentityType2;
|
|
499
|
+
})(WebhookIdentityType || {});
|
|
500
|
+
async function createProperty2(property) {
|
|
501
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
502
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ property });
|
|
503
|
+
const reqOpts = createProperty(payload);
|
|
504
|
+
sideEffects?.onSiteCall?.();
|
|
505
|
+
try {
|
|
506
|
+
const result = await httpClient.request(reqOpts);
|
|
507
|
+
sideEffects?.onSuccess?.(result);
|
|
508
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.property;
|
|
509
|
+
} catch (err) {
|
|
510
|
+
const transformedError = sdkTransformError(
|
|
511
|
+
err,
|
|
512
|
+
{
|
|
513
|
+
spreadPathsToArguments: {},
|
|
514
|
+
explicitPathsToArguments: { property: "$[0]" },
|
|
515
|
+
singleArgumentUnchanged: false
|
|
516
|
+
},
|
|
517
|
+
["property"]
|
|
518
|
+
);
|
|
519
|
+
sideEffects?.onError?.(err);
|
|
520
|
+
throw transformedError;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
async function getProperty2(propertyId) {
|
|
524
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
525
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
526
|
+
propertyId
|
|
527
|
+
});
|
|
528
|
+
const reqOpts = getProperty(payload);
|
|
529
|
+
sideEffects?.onSiteCall?.();
|
|
530
|
+
try {
|
|
531
|
+
const result = await httpClient.request(reqOpts);
|
|
532
|
+
sideEffects?.onSuccess?.(result);
|
|
533
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.property;
|
|
534
|
+
} catch (err) {
|
|
535
|
+
const transformedError = sdkTransformError(
|
|
536
|
+
err,
|
|
537
|
+
{
|
|
538
|
+
spreadPathsToArguments: {},
|
|
539
|
+
explicitPathsToArguments: { propertyId: "$[0]" },
|
|
540
|
+
singleArgumentUnchanged: false
|
|
541
|
+
},
|
|
542
|
+
["propertyId"]
|
|
543
|
+
);
|
|
544
|
+
sideEffects?.onError?.(err);
|
|
545
|
+
throw transformedError;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
async function updateProperty2(_id, property) {
|
|
549
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
550
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
551
|
+
property: { ...property, id: _id }
|
|
552
|
+
});
|
|
553
|
+
const reqOpts = updateProperty(payload);
|
|
554
|
+
sideEffects?.onSiteCall?.();
|
|
555
|
+
try {
|
|
556
|
+
const result = await httpClient.request(reqOpts);
|
|
557
|
+
sideEffects?.onSuccess?.(result);
|
|
558
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.property;
|
|
559
|
+
} catch (err) {
|
|
560
|
+
const transformedError = sdkTransformError(
|
|
561
|
+
err,
|
|
562
|
+
{
|
|
563
|
+
spreadPathsToArguments: { property: "$[1]" },
|
|
564
|
+
explicitPathsToArguments: { "property.id": "$[0]" },
|
|
565
|
+
singleArgumentUnchanged: false
|
|
566
|
+
},
|
|
567
|
+
["_id", "property"]
|
|
568
|
+
);
|
|
569
|
+
sideEffects?.onError?.(err);
|
|
570
|
+
throw transformedError;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
async function deleteProperty2(propertyId) {
|
|
574
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
575
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
576
|
+
propertyId
|
|
577
|
+
});
|
|
578
|
+
const reqOpts = deleteProperty(payload);
|
|
579
|
+
sideEffects?.onSiteCall?.();
|
|
580
|
+
try {
|
|
581
|
+
const result = await httpClient.request(reqOpts);
|
|
582
|
+
sideEffects?.onSuccess?.(result);
|
|
583
|
+
} catch (err) {
|
|
584
|
+
const transformedError = sdkTransformError(
|
|
585
|
+
err,
|
|
586
|
+
{
|
|
587
|
+
spreadPathsToArguments: {},
|
|
588
|
+
explicitPathsToArguments: { propertyId: "$[0]" },
|
|
589
|
+
singleArgumentUnchanged: false
|
|
590
|
+
},
|
|
591
|
+
["propertyId"]
|
|
592
|
+
);
|
|
593
|
+
sideEffects?.onError?.(err);
|
|
594
|
+
throw transformedError;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
function queryProperties2() {
|
|
598
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
599
|
+
return queryBuilder({
|
|
600
|
+
func: async (payload) => {
|
|
601
|
+
const reqOpts = queryProperties(payload);
|
|
602
|
+
sideEffects?.onSiteCall?.();
|
|
603
|
+
try {
|
|
604
|
+
const result = await httpClient.request(reqOpts);
|
|
605
|
+
sideEffects?.onSuccess?.(result);
|
|
606
|
+
return result;
|
|
607
|
+
} catch (err) {
|
|
608
|
+
sideEffects?.onError?.(err);
|
|
609
|
+
throw err;
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
requestTransformer: (query) => {
|
|
613
|
+
const args = [query, {}];
|
|
614
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
615
|
+
...args?.[1],
|
|
616
|
+
query: args?.[0]
|
|
617
|
+
});
|
|
618
|
+
},
|
|
619
|
+
responseTransformer: ({ data }) => {
|
|
620
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
621
|
+
transformPaths2(data, [])
|
|
622
|
+
);
|
|
623
|
+
return {
|
|
624
|
+
items: transformedData?.properties,
|
|
625
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
626
|
+
};
|
|
627
|
+
},
|
|
628
|
+
errorTransformer: (err) => {
|
|
629
|
+
const transformedError = sdkTransformError(err, {
|
|
630
|
+
spreadPathsToArguments: {},
|
|
631
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
632
|
+
singleArgumentUnchanged: false
|
|
633
|
+
});
|
|
634
|
+
throw transformedError;
|
|
635
|
+
},
|
|
636
|
+
pagingMethod: "CURSOR",
|
|
637
|
+
transformationPaths: {}
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
async function typedQueryProperties(query) {
|
|
641
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
642
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
643
|
+
const reqOpts = queryProperties(payload);
|
|
644
|
+
sideEffects?.onSiteCall?.();
|
|
645
|
+
try {
|
|
646
|
+
const result = await httpClient.request(reqOpts);
|
|
647
|
+
sideEffects?.onSuccess?.(result);
|
|
648
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
649
|
+
} catch (err) {
|
|
650
|
+
const transformedError = sdkTransformError(
|
|
651
|
+
err,
|
|
652
|
+
{
|
|
653
|
+
spreadPathsToArguments: {},
|
|
654
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
655
|
+
singleArgumentUnchanged: false
|
|
656
|
+
},
|
|
657
|
+
["query"]
|
|
658
|
+
);
|
|
659
|
+
sideEffects?.onError?.(err);
|
|
660
|
+
throw transformedError;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
var { QueryBuilder, Filter, Sort } = createQueryUtils();
|
|
664
|
+
async function bulkCreateProperties2(properties, options) {
|
|
665
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
666
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
667
|
+
properties,
|
|
668
|
+
returnEntity: options?.returnEntity
|
|
669
|
+
});
|
|
670
|
+
const reqOpts = bulkCreateProperties(payload);
|
|
671
|
+
sideEffects?.onSiteCall?.();
|
|
672
|
+
try {
|
|
673
|
+
const result = await httpClient.request(reqOpts);
|
|
674
|
+
sideEffects?.onSuccess?.(result);
|
|
675
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
676
|
+
} catch (err) {
|
|
677
|
+
const transformedError = sdkTransformError(
|
|
678
|
+
err,
|
|
679
|
+
{
|
|
680
|
+
spreadPathsToArguments: {},
|
|
681
|
+
explicitPathsToArguments: {
|
|
682
|
+
properties: "$[0]",
|
|
683
|
+
returnEntity: "$[1].returnEntity"
|
|
684
|
+
},
|
|
685
|
+
singleArgumentUnchanged: false
|
|
686
|
+
},
|
|
687
|
+
["properties", "options"]
|
|
688
|
+
);
|
|
689
|
+
sideEffects?.onError?.(err);
|
|
690
|
+
throw transformedError;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
async function bulkUpdateProperties2(properties, options) {
|
|
694
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
695
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
696
|
+
properties,
|
|
697
|
+
returnEntity: options?.returnEntity
|
|
698
|
+
});
|
|
699
|
+
const reqOpts = bulkUpdateProperties(payload);
|
|
700
|
+
sideEffects?.onSiteCall?.();
|
|
701
|
+
try {
|
|
702
|
+
const result = await httpClient.request(reqOpts);
|
|
703
|
+
sideEffects?.onSuccess?.(result);
|
|
704
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
705
|
+
} catch (err) {
|
|
706
|
+
const transformedError = sdkTransformError(
|
|
707
|
+
err,
|
|
708
|
+
{
|
|
709
|
+
spreadPathsToArguments: {},
|
|
710
|
+
explicitPathsToArguments: {
|
|
711
|
+
properties: "$[0]",
|
|
712
|
+
returnEntity: "$[1].returnEntity"
|
|
713
|
+
},
|
|
714
|
+
singleArgumentUnchanged: false
|
|
715
|
+
},
|
|
716
|
+
["properties", "options"]
|
|
717
|
+
);
|
|
718
|
+
sideEffects?.onError?.(err);
|
|
719
|
+
throw transformedError;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
async function bulkDeleteProperties2(propertyIds) {
|
|
723
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
724
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
725
|
+
propertyIds
|
|
726
|
+
});
|
|
727
|
+
const reqOpts = bulkDeleteProperties(payload);
|
|
728
|
+
sideEffects?.onSiteCall?.();
|
|
729
|
+
try {
|
|
730
|
+
const result = await httpClient.request(reqOpts);
|
|
731
|
+
sideEffects?.onSuccess?.(result);
|
|
732
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
733
|
+
} catch (err) {
|
|
734
|
+
const transformedError = sdkTransformError(
|
|
735
|
+
err,
|
|
736
|
+
{
|
|
737
|
+
spreadPathsToArguments: {},
|
|
738
|
+
explicitPathsToArguments: { propertyIds: "$[0]" },
|
|
739
|
+
singleArgumentUnchanged: false
|
|
740
|
+
},
|
|
741
|
+
["propertyIds"]
|
|
742
|
+
);
|
|
743
|
+
sideEffects?.onError?.(err);
|
|
744
|
+
throw transformedError;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
async function bulkUpdatePropertyTags2(propertyIds, options) {
|
|
748
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
749
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
750
|
+
propertyIds,
|
|
751
|
+
assignTags: options?.assignTags,
|
|
752
|
+
unassignTags: options?.unassignTags
|
|
753
|
+
});
|
|
754
|
+
const reqOpts = bulkUpdatePropertyTags(payload);
|
|
755
|
+
sideEffects?.onSiteCall?.();
|
|
756
|
+
try {
|
|
757
|
+
const result = await httpClient.request(reqOpts);
|
|
758
|
+
sideEffects?.onSuccess?.(result);
|
|
759
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
760
|
+
} catch (err) {
|
|
761
|
+
const transformedError = sdkTransformError(
|
|
762
|
+
err,
|
|
763
|
+
{
|
|
764
|
+
spreadPathsToArguments: {},
|
|
765
|
+
explicitPathsToArguments: {
|
|
766
|
+
propertyIds: "$[0]",
|
|
767
|
+
assignTags: "$[1].assignTags",
|
|
768
|
+
unassignTags: "$[1].unassignTags"
|
|
769
|
+
},
|
|
770
|
+
singleArgumentUnchanged: false
|
|
771
|
+
},
|
|
772
|
+
["propertyIds", "options"]
|
|
773
|
+
);
|
|
774
|
+
sideEffects?.onError?.(err);
|
|
775
|
+
throw transformedError;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
async function bulkUpdatePropertyTagsByFilter2(filter, options) {
|
|
779
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
780
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
781
|
+
filter,
|
|
782
|
+
assignTags: options?.assignTags,
|
|
783
|
+
unassignTags: options?.unassignTags
|
|
784
|
+
});
|
|
785
|
+
const reqOpts = bulkUpdatePropertyTagsByFilter(payload);
|
|
786
|
+
sideEffects?.onSiteCall?.();
|
|
787
|
+
try {
|
|
788
|
+
const result = await httpClient.request(reqOpts);
|
|
789
|
+
sideEffects?.onSuccess?.(result);
|
|
790
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
791
|
+
} catch (err) {
|
|
792
|
+
const transformedError = sdkTransformError(
|
|
793
|
+
err,
|
|
794
|
+
{
|
|
795
|
+
spreadPathsToArguments: {},
|
|
796
|
+
explicitPathsToArguments: {
|
|
797
|
+
filter: "$[0]",
|
|
798
|
+
assignTags: "$[1].assignTags",
|
|
799
|
+
unassignTags: "$[1].unassignTags"
|
|
800
|
+
},
|
|
801
|
+
singleArgumentUnchanged: false
|
|
802
|
+
},
|
|
803
|
+
["filter", "options"]
|
|
804
|
+
);
|
|
805
|
+
sideEffects?.onError?.(err);
|
|
806
|
+
throw transformedError;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
export {
|
|
810
|
+
CustomFieldType,
|
|
811
|
+
DocumentType,
|
|
812
|
+
Filter,
|
|
813
|
+
PropertySource,
|
|
814
|
+
PropertyStatus,
|
|
815
|
+
PropertyType,
|
|
816
|
+
QueryBuilder,
|
|
817
|
+
Sort,
|
|
818
|
+
SortOrder,
|
|
819
|
+
WebhookIdentityType,
|
|
820
|
+
bulkCreateProperties2 as bulkCreateProperties,
|
|
821
|
+
bulkDeleteProperties2 as bulkDeleteProperties,
|
|
822
|
+
bulkUpdateProperties2 as bulkUpdateProperties,
|
|
823
|
+
bulkUpdatePropertyTags2 as bulkUpdatePropertyTags,
|
|
824
|
+
bulkUpdatePropertyTagsByFilter2 as bulkUpdatePropertyTagsByFilter,
|
|
825
|
+
createProperty2 as createProperty,
|
|
826
|
+
deleteProperty2 as deleteProperty,
|
|
827
|
+
getProperty2 as getProperty,
|
|
828
|
+
queryProperties2 as queryProperties,
|
|
829
|
+
typedQueryProperties,
|
|
830
|
+
updateProperty2 as updateProperty
|
|
831
|
+
};
|
|
832
|
+
//# sourceMappingURL=index.typings.mjs.map
|