@propertysimple/client 0.1.0 → 0.2.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/API.md +27 -73
- package/README.md +200 -57
- package/client/src/index.d.ts +257 -2422
- package/client/src/index.js +6 -69
- package/contracts/src/index.d.ts +0 -7
- package/contracts/src/index.js +0 -7
- package/contracts/src/openapi.js +1 -1
- package/contracts/src/operations.d.ts +950 -4678
- package/contracts/src/operations.js +6 -36
- package/contracts/src/opportunity-events.d.ts +2 -1
- package/contracts/src/opportunity-events.js +6 -1
- package/contracts/src/property-features.d.ts +2 -2
- package/contracts/src/property-features.js +62 -19
- package/contracts/src/routes.d.ts +28 -305
- package/contracts/src/routes.js +82 -354
- package/contracts/src/schemas.d.ts +1114 -1355
- package/contracts/src/schemas.js +45 -223
- package/contracts/src/search.d.ts +1366 -253
- package/contracts/src/search.js +117 -2
- package/openapi.json +19288 -38596
- package/package.json +1 -9
- package/client/src/directory-sync.d.ts +0 -123
- package/client/src/directory-sync.js +0 -404
- package/client/src/managed-sync.d.ts +0 -129
- package/client/src/managed-sync.js +0 -410
- package/contracts/src/directory-execution.d.ts +0 -320
- package/contracts/src/directory-execution.js +0 -122
- package/contracts/src/directory-identity.d.ts +0 -1255
- package/contracts/src/directory-identity.js +0 -129
- package/contracts/src/directory-sales.d.ts +0 -333
- package/contracts/src/directory-sales.js +0 -102
- package/contracts/src/directory.d.ts +0 -1088
- package/contracts/src/directory.js +0 -179
- package/contracts/src/intelligence.d.ts +0 -366
- package/contracts/src/intelligence.js +0 -157
- package/contracts/src/professional-intelligence.d.ts +0 -256
- package/contracts/src/professional-intelligence.js +0 -90
- package/contracts/src/publication.d.ts +0 -44
- package/contracts/src/publication.js +0 -42
- package/contracts/src/smart-feed.d.ts +0 -3731
- package/contracts/src/smart-feed.js +0 -109
package/client/src/index.js
CHANGED
|
@@ -156,6 +156,8 @@ export class ListingsClient {
|
|
|
156
156
|
features: (options) => this.call('searchFeatures', {}, options),
|
|
157
157
|
listings: (input = {}, options) => this.call('searchListings', input, options),
|
|
158
158
|
facets: (input, options) => this.call('searchFacets', input, options),
|
|
159
|
+
stats: (input, options) => this.call('searchStats', input, options),
|
|
160
|
+
index: (input, options) => this.call('searchIndex', input, options),
|
|
159
161
|
map: (input, options) => this.call('searchMap', input, options),
|
|
160
162
|
suggest: (input, options) => this.call('searchSuggest', input, options),
|
|
161
163
|
interpret: (input, options) => this.call('searchInterpret', input, options),
|
|
@@ -173,26 +175,16 @@ export class ListingsClient {
|
|
|
173
175
|
resolveIdentity: (input, options) => this.call('resolveListingIdentity', input, options),
|
|
174
176
|
};
|
|
175
177
|
agents = {
|
|
178
|
+
emailSharing: (input, options) => this.call('getAgentEmailSharing', input, options),
|
|
176
179
|
resolveIdentity: (input, options) => this.call('resolveAgentIdentity', input, options),
|
|
177
180
|
get: (id, options) => this.call('getAgent', { id }, options),
|
|
178
181
|
listings: (id, input = {}, options) => this.call('listAgentListings', { ...input, id }, options),
|
|
179
182
|
};
|
|
180
|
-
publications = {
|
|
181
|
-
report: (input, options) => this.call('reportPublication', input, options),
|
|
182
|
-
destination: (input, options) => this.call('resolveDestination', input, options),
|
|
183
|
-
};
|
|
184
|
-
judgments = {
|
|
185
|
-
evaluate: (input, options) => this.call('evaluateJudgment', input, options),
|
|
186
|
-
get: (id, options) => this.call('getJudgment', { id }, options),
|
|
187
|
-
capabilities: (options) => this.call('intelligenceCapabilities', {}, options),
|
|
188
|
-
};
|
|
189
183
|
catalog = {
|
|
190
184
|
health: (datasetId, options) => this.call('getCatalogHealth', { dataset_id: datasetId }, options),
|
|
191
|
-
createSnapshot: (input, options) => this.call('createSnapshot', input, options),
|
|
192
|
-
snapshot: (id, options) => this.call('getSnapshot', { id }, options),
|
|
193
|
-
snapshotItems: (id, input = {}, options) => this.call('listSnapshotItems', { ...input, id }, options),
|
|
194
|
-
changes: (input = {}, options) => this.call('listCatalogChanges', input, options),
|
|
195
185
|
events: (input = {}, options) => this.call('listEvents', input, options),
|
|
186
|
+
/** Listing changes, including removals, from a durable cursor (docs/api.md). */
|
|
187
|
+
listingChanges: (input = {}, options) => this.call('listListingChanges', input, options),
|
|
196
188
|
opportunityObservations: async (input = {}, options) => {
|
|
197
189
|
const page = await this.call('listEvents', input, options);
|
|
198
190
|
try {
|
|
@@ -208,62 +200,7 @@ export class ListingsClient {
|
|
|
208
200
|
}
|
|
209
201
|
},
|
|
210
202
|
};
|
|
211
|
-
|
|
212
|
-
canonicalIdentity: (input, options) => this.call('directoryGetCanonicalIdentity', input, options),
|
|
213
|
-
mergeIdentities: (input, options) => this.call('directoryMergeIdentities', input, options),
|
|
214
|
-
splitIdentity: (input, options) => this.call('directorySplitIdentity', input, options),
|
|
215
|
-
inventory: (input, options) => this.call('directoryListInventory', input, options),
|
|
216
|
-
salesCandidates: (input, options) => this.call('discoverDirectorySalesCandidates', input, options),
|
|
217
|
-
recordProfile: (input, options) => this.call('directoryRecordProfile', input, options),
|
|
218
|
-
recordRelationship: (input, options) => this.call('directoryRecordRelationship', input, options),
|
|
219
|
-
professionals: (input = {}, options) => this.call('directoryListProfessionals', input, options),
|
|
220
|
-
offices: (input = {}, options) => this.call('directoryListOffices', input, options),
|
|
221
|
-
organizations: (input = {}, options) => this.call('directoryListOrganizations', input, options),
|
|
222
|
-
teams: (input = {}, options) => this.call('directoryListTeams', input, options),
|
|
223
|
-
get: (input, options) => this.call('directoryGetEntity', input, options),
|
|
224
|
-
agent: (input, options) => this.call('directoryResolveAgent', input, options),
|
|
225
|
-
identity: (input, options) => this.call('directoryResolveIdentity', input, options),
|
|
226
|
-
relationships: (input, options) => this.call('directoryListRelationships', input, options),
|
|
227
|
-
contacts: (input, options) => this.call('directoryGetContacts', input, options),
|
|
228
|
-
metrics: (input, options) => this.call('directoryGetMetrics', input, options),
|
|
229
|
-
assess: (input, options) => this.call('requestDirectoryAssessment', input, options),
|
|
230
|
-
assessment: (id, options) => this.call('getDirectoryAssessment', { id }, options),
|
|
231
|
-
latestAssessment: (input, options) => this.call('latestDirectoryAssessment', input, options),
|
|
232
|
-
createSalesPlan: (input, options) => this.call('createDirectorySalesPlan', input, options),
|
|
233
|
-
salesPlan: (id, options) => this.call('getDirectorySalesPlan', { id }, options),
|
|
234
|
-
createSnapshot: (input, options) => this.call('createDirectorySnapshot', input, options),
|
|
235
|
-
snapshot: (id, options) => this.call('getDirectorySnapshot', { id }, options),
|
|
236
|
-
snapshotItems: (id, input = {}, options) => this.call('listDirectorySnapshotItems', { ...input, id }, options),
|
|
237
|
-
changes: (input, options) => this.call('listDirectoryChanges', input, options),
|
|
238
|
-
};
|
|
239
|
-
directoryActions = {
|
|
240
|
-
claim: (input, options) => this.call('claimDirectoryActions', input, options),
|
|
241
|
-
startAttempt: (input, options) => this.call('startDirectoryAttempt', input, options),
|
|
242
|
-
get: (id, options) => this.call('getDirectoryAction', { id }, options),
|
|
243
|
-
outcomes: (input, options) => this.call('recordDirectoryActionOutcomes', input, options),
|
|
244
|
-
};
|
|
245
|
-
opportunityPlans = {
|
|
246
|
-
create: (input, options) => this.call('createPlan', input, options),
|
|
247
|
-
get: (id, options) => this.call('getPlan', { id }, options),
|
|
248
|
-
items: (id, input = {}, options) => this.call('listPlanItems', { ...input, id }, options),
|
|
249
|
-
claimDispatchBatch: (input, options) => this.call('claimDispatchBatch', input, options),
|
|
250
|
-
waitUntilReady: async (id, options = {}) => {
|
|
251
|
-
const deadline = Date.now() + (options.maxWaitMs ?? 60000);
|
|
252
|
-
for (;;) {
|
|
253
|
-
const plan = await this.call('getPlan', { id }, options);
|
|
254
|
-
if (!['queued', 'building'].includes(plan.status))
|
|
255
|
-
return plan;
|
|
256
|
-
if (Date.now() >= deadline)
|
|
257
|
-
throw new ApiError(408, 'PLAN_WAIT_TIMEOUT', 'Plan is still building; its ID remains usable.');
|
|
258
|
-
await sleep(Math.min(1000, deadline - Date.now()), options.signal);
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
|
-
actions = {
|
|
263
|
-
startAttempt: (id, input, options) => this.call('startAttempt', { ...input, id }, options),
|
|
264
|
-
outcomes: (input, options) => this.call('recordActionOutcomes', input, options),
|
|
265
|
-
};
|
|
266
|
-
/** Live browsing only. Use catalog snapshots for a complete, consistent inventory replica. */
|
|
203
|
+
/** Live browsing over the current catalog; pages are not a point-in-time snapshot. */
|
|
267
204
|
async *iterateListings(input = {}, options) {
|
|
268
205
|
let cursor = input.cursor;
|
|
269
206
|
const seen = new Set();
|
package/contracts/src/index.d.ts
CHANGED
|
@@ -4,15 +4,8 @@ export * from './catalog-inventory.js';
|
|
|
4
4
|
export * from './platform-api.js';
|
|
5
5
|
export * from './routes.js';
|
|
6
6
|
export * from './openapi.js';
|
|
7
|
-
export * from './publication.js';
|
|
8
|
-
export * from './directory.js';
|
|
9
|
-
export * from './smart-feed.js';
|
|
10
|
-
export * from './professional-intelligence.js';
|
|
11
7
|
export * from './location.js';
|
|
12
8
|
export * from './location-serving.js';
|
|
13
|
-
export * from './directory-sales.js';
|
|
14
|
-
export * from './directory-identity.js';
|
|
15
|
-
export * from './directory-execution.js';
|
|
16
9
|
export * from './search.js';
|
|
17
10
|
export * from './property-features.js';
|
|
18
11
|
export * from './opportunity-events.js';
|
package/contracts/src/index.js
CHANGED
|
@@ -4,15 +4,8 @@ export * from './catalog-inventory.js';
|
|
|
4
4
|
export * from './platform-api.js';
|
|
5
5
|
export * from './routes.js';
|
|
6
6
|
export * from './openapi.js';
|
|
7
|
-
export * from './publication.js';
|
|
8
|
-
export * from './directory.js';
|
|
9
|
-
export * from './smart-feed.js';
|
|
10
|
-
export * from './professional-intelligence.js';
|
|
11
7
|
export * from './location.js';
|
|
12
8
|
export * from './location-serving.js';
|
|
13
|
-
export * from './directory-sales.js';
|
|
14
|
-
export * from './directory-identity.js';
|
|
15
|
-
export * from './directory-execution.js';
|
|
16
9
|
export * from './search.js';
|
|
17
10
|
export * from './property-features.js';
|
|
18
11
|
export * from './opportunity-events.js';
|
package/contracts/src/openapi.js
CHANGED
|
@@ -70,7 +70,7 @@ export function createOpenApiDocument() {
|
|
|
70
70
|
});
|
|
71
71
|
requestBody = { required: true, content: { 'application/json': { schema: body } } };
|
|
72
72
|
}
|
|
73
|
-
const status =
|
|
73
|
+
const status = route.status ?? 200;
|
|
74
74
|
paths[route.path] ??= {};
|
|
75
75
|
paths[route.path][route.method.toLowerCase()] = {
|
|
76
76
|
operationId: route.operation,
|