@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
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
const Key = z.string().regex(/^[a-zA-Z0-9_-]{1,80}$/);
|
|
3
|
-
const Text = z.string().min(1).max(4000);
|
|
4
|
-
const Span = z.strictObject({ id: Key, text: Text });
|
|
5
|
-
const Spans = z.array(Span).min(1).max(20);
|
|
6
|
-
const Timestamp = z.iso.datetime({ offset: true });
|
|
7
|
-
export const JudgmentTask = z.enum([
|
|
8
|
-
'claim_verification',
|
|
9
|
-
'meaningful_text_change',
|
|
10
|
-
'marketing_angle',
|
|
11
|
-
'preference_relevance',
|
|
12
|
-
'intent_routing',
|
|
13
|
-
'operational_triage',
|
|
14
|
-
]);
|
|
15
|
-
export const JudgmentRequest = z.discriminatedUnion('task', [
|
|
16
|
-
z.strictObject({
|
|
17
|
-
task: z.literal('claim_verification'),
|
|
18
|
-
claims: z.array(Span).min(1).max(10),
|
|
19
|
-
source_spans: Spans,
|
|
20
|
-
}),
|
|
21
|
-
z.strictObject({ task: z.literal('meaningful_text_change'), before: Text, after: Text }),
|
|
22
|
-
z.strictObject({
|
|
23
|
-
task: z.literal('marketing_angle'),
|
|
24
|
-
product_brief: z.string().min(1).max(1000),
|
|
25
|
-
candidates: z.array(Span).min(1).max(10),
|
|
26
|
-
source_spans: Spans,
|
|
27
|
-
previous_messages: z.array(Span).max(20),
|
|
28
|
-
}),
|
|
29
|
-
z.strictObject({
|
|
30
|
-
task: z.literal('preference_relevance'),
|
|
31
|
-
preferences: z
|
|
32
|
-
.array(z.strictObject({
|
|
33
|
-
id: Key,
|
|
34
|
-
text: z.string().min(1).max(1000),
|
|
35
|
-
importance: z.enum(['required', 'preferred']),
|
|
36
|
-
}))
|
|
37
|
-
.min(1)
|
|
38
|
-
.max(10),
|
|
39
|
-
candidates: z.array(Span).min(1).max(20),
|
|
40
|
-
}),
|
|
41
|
-
z.strictObject({ task: z.literal('intent_routing'), text: Text }),
|
|
42
|
-
z.strictObject({
|
|
43
|
-
task: z.literal('operational_triage'),
|
|
44
|
-
component: z.enum(['api', 'worker', 'source', 'model', 'database', 'unknown']),
|
|
45
|
-
sanitized_logs: z.array(Span).min(1).max(20),
|
|
46
|
-
}),
|
|
47
|
-
]);
|
|
48
|
-
const Verdict = z.enum(['supported', 'contradicted', 'not_established', 'conflicting']);
|
|
49
|
-
const Intent = z.enum([
|
|
50
|
-
'billing',
|
|
51
|
-
'listing_correction',
|
|
52
|
-
'access_issue',
|
|
53
|
-
'marketing_question',
|
|
54
|
-
'technical_issue',
|
|
55
|
-
'tour_request',
|
|
56
|
-
'property_details',
|
|
57
|
-
'agent_help',
|
|
58
|
-
'unsubscribe',
|
|
59
|
-
'other',
|
|
60
|
-
'unknown',
|
|
61
|
-
]);
|
|
62
|
-
export const JudgmentDecision = z.discriminatedUnion('task', [
|
|
63
|
-
z.strictObject({
|
|
64
|
-
task: z.literal('claim_verification'),
|
|
65
|
-
claims: z
|
|
66
|
-
.array(z.strictObject({
|
|
67
|
-
id: Key,
|
|
68
|
-
verdict: Verdict,
|
|
69
|
-
evidence_refs: z.array(Key),
|
|
70
|
-
review_required: z.boolean(),
|
|
71
|
-
}))
|
|
72
|
-
.max(10),
|
|
73
|
-
}),
|
|
74
|
-
z.strictObject({
|
|
75
|
-
task: z.literal('meaningful_text_change'),
|
|
76
|
-
change: z.enum(['material', 'editorial', 'unchanged', 'uncertain']),
|
|
77
|
-
review_required: z.boolean(),
|
|
78
|
-
}),
|
|
79
|
-
z.strictObject({
|
|
80
|
-
task: z.literal('marketing_angle'),
|
|
81
|
-
selected_candidate_id: Key.nullable(),
|
|
82
|
-
repeat_status: z.enum(['novel', 'repetition', 'unknown']),
|
|
83
|
-
evidence_refs: z.array(Key),
|
|
84
|
-
review_required: z.boolean(),
|
|
85
|
-
}),
|
|
86
|
-
z.strictObject({
|
|
87
|
-
task: z.literal('preference_relevance'),
|
|
88
|
-
ranked: z
|
|
89
|
-
.array(z.strictObject({
|
|
90
|
-
candidate_id: Key,
|
|
91
|
-
score: z.number().min(0).max(3).nullable(),
|
|
92
|
-
relevance: z.enum(['relevant', 'not_relevant', 'unknown']),
|
|
93
|
-
}))
|
|
94
|
-
.max(20),
|
|
95
|
-
review_required: z.boolean(),
|
|
96
|
-
}),
|
|
97
|
-
z.strictObject({
|
|
98
|
-
task: z.literal('intent_routing'),
|
|
99
|
-
intent: Intent,
|
|
100
|
-
urgent: z.boolean().nullable(),
|
|
101
|
-
review_required: z.boolean(),
|
|
102
|
-
}),
|
|
103
|
-
z.strictObject({
|
|
104
|
-
task: z.literal('operational_triage'),
|
|
105
|
-
category: z.enum(['auth', 'source_format', 'rate_limit', 'transient_dependency', 'unknown']),
|
|
106
|
-
severity: z.enum(['informational', 'degraded', 'blocking', 'critical', 'unknown']),
|
|
107
|
-
recommended_check: z.enum([
|
|
108
|
-
'credential_configuration',
|
|
109
|
-
'source_contract',
|
|
110
|
-
'retry_budget',
|
|
111
|
-
'dependency_health',
|
|
112
|
-
'manual_review',
|
|
113
|
-
]),
|
|
114
|
-
review_required: z.boolean(),
|
|
115
|
-
}),
|
|
116
|
-
]);
|
|
117
|
-
export const JudgmentProvenance = z.strictObject({
|
|
118
|
-
provider: z.enum(['openrouter', 'vercel_gateway', 'fixture', 'disabled']),
|
|
119
|
-
requested_model: z.string(),
|
|
120
|
-
resolved_model: z.string().nullable(),
|
|
121
|
-
model_policy: z.enum(['pinned', 'rolling_alias', 'fixture']),
|
|
122
|
-
policy_revision: z.string(),
|
|
123
|
-
adapter_version: z.string(),
|
|
124
|
-
/** A code-owned result retains the requested route but did not invoke it. */
|
|
125
|
-
execution: z.literal('deterministic_exact_comparison').optional(),
|
|
126
|
-
});
|
|
127
|
-
export const JudgmentSchema = z.strictObject({
|
|
128
|
-
id: z.string(),
|
|
129
|
-
task: JudgmentTask,
|
|
130
|
-
task_version: z.string(),
|
|
131
|
-
state: z.enum(['running', 'succeeded', 'failed', 'expired']),
|
|
132
|
-
input_fingerprint: z.string(),
|
|
133
|
-
source_trust: z.literal('caller_supplied'),
|
|
134
|
-
provenance: JudgmentProvenance,
|
|
135
|
-
result: JudgmentDecision.nullable(),
|
|
136
|
-
error_code: z.string().nullable(),
|
|
137
|
-
created_at: Timestamp,
|
|
138
|
-
completed_at: Timestamp.nullable(),
|
|
139
|
-
valid_until: Timestamp,
|
|
140
|
-
cached: z.boolean(),
|
|
141
|
-
});
|
|
142
|
-
export const IntelligenceCapabilitySchema = z.strictObject({
|
|
143
|
-
id: z.string(),
|
|
144
|
-
description: z.string(),
|
|
145
|
-
status: z.enum(['implemented', 'not_implemented']),
|
|
146
|
-
task_version: z.string().nullable(),
|
|
147
|
-
task_id: JudgmentTask.nullable(),
|
|
148
|
-
input_kind: z.string(),
|
|
149
|
-
limitations: z.array(z.string()),
|
|
150
|
-
});
|
|
151
|
-
export const IntelligenceCapabilitiesSchema = z.strictObject({
|
|
152
|
-
data: z.array(IntelligenceCapabilitySchema),
|
|
153
|
-
provider: JudgmentProvenance,
|
|
154
|
-
effects_enabled: z.boolean(),
|
|
155
|
-
catalog_model: z.string(),
|
|
156
|
-
taxonomy_version: z.string(),
|
|
157
|
-
});
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const DirectoryAssessmentTask: z.ZodEnum<{
|
|
3
|
-
entity_match: "entity_match";
|
|
4
|
-
office_variant: "office_variant";
|
|
5
|
-
relationship_support: "relationship_support";
|
|
6
|
-
professional_category: "professional_category";
|
|
7
|
-
}>;
|
|
8
|
-
export declare const DirectoryAssessmentRequest: z.ZodObject<{
|
|
9
|
-
dataset_id: z.ZodString;
|
|
10
|
-
entity_id: z.ZodString;
|
|
11
|
-
comparison_id: z.ZodOptional<z.ZodString>;
|
|
12
|
-
task: z.ZodEnum<{
|
|
13
|
-
entity_match: "entity_match";
|
|
14
|
-
office_variant: "office_variant";
|
|
15
|
-
relationship_support: "relationship_support";
|
|
16
|
-
professional_category: "professional_category";
|
|
17
|
-
}>;
|
|
18
|
-
relationship: z.ZodOptional<z.ZodEnum<{
|
|
19
|
-
observed_at_office: "observed_at_office";
|
|
20
|
-
observed_brokerage: "observed_brokerage";
|
|
21
|
-
affiliated_with: "affiliated_with";
|
|
22
|
-
operates: "operates";
|
|
23
|
-
member_of: "member_of";
|
|
24
|
-
}>>;
|
|
25
|
-
}, z.core.$strict>;
|
|
26
|
-
export declare const DirectoryAssessmentSchema: z.ZodObject<{
|
|
27
|
-
id: z.ZodString;
|
|
28
|
-
entity_id: z.ZodString;
|
|
29
|
-
comparison_id: z.ZodNullable<z.ZodString>;
|
|
30
|
-
task: z.ZodEnum<{
|
|
31
|
-
entity_match: "entity_match";
|
|
32
|
-
office_variant: "office_variant";
|
|
33
|
-
relationship_support: "relationship_support";
|
|
34
|
-
professional_category: "professional_category";
|
|
35
|
-
}>;
|
|
36
|
-
definition_version: z.ZodString;
|
|
37
|
-
evidence_hash: z.ZodString;
|
|
38
|
-
state: z.ZodEnum<{
|
|
39
|
-
stale: "stale";
|
|
40
|
-
failed: "failed";
|
|
41
|
-
running: "running";
|
|
42
|
-
succeeded: "succeeded";
|
|
43
|
-
queued: "queued";
|
|
44
|
-
}>;
|
|
45
|
-
provider: z.ZodString;
|
|
46
|
-
model: z.ZodString;
|
|
47
|
-
result: z.ZodNullable<z.ZodObject<{
|
|
48
|
-
decision: z.ZodEnum<{
|
|
49
|
-
unknown: "unknown";
|
|
50
|
-
supported: "supported";
|
|
51
|
-
conflicting: "conflicting";
|
|
52
|
-
not_established: "not_established";
|
|
53
|
-
consistent: "consistent";
|
|
54
|
-
distinct: "distinct";
|
|
55
|
-
residential: "residential";
|
|
56
|
-
commercial: "commercial";
|
|
57
|
-
rental: "rental";
|
|
58
|
-
mixed: "mixed";
|
|
59
|
-
}>;
|
|
60
|
-
evidence_refs: z.ZodArray<z.ZodString>;
|
|
61
|
-
confidence: z.ZodNumber;
|
|
62
|
-
authority: z.ZodLiteral<"semantic_assessment">;
|
|
63
|
-
changes_account_access: z.ZodLiteral<false>;
|
|
64
|
-
}, z.core.$strict>>;
|
|
65
|
-
error_code: z.ZodNullable<z.ZodString>;
|
|
66
|
-
created_at: z.ZodISODateTime;
|
|
67
|
-
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
68
|
-
}, z.core.$strict>;
|
|
69
|
-
export declare const professionalIntelligenceOperations: {
|
|
70
|
-
readonly latestDirectoryAssessment: {
|
|
71
|
-
readonly input: z.ZodObject<{
|
|
72
|
-
dataset_id: z.ZodString;
|
|
73
|
-
entity_id: z.ZodString;
|
|
74
|
-
comparison_id: z.ZodOptional<z.ZodString>;
|
|
75
|
-
task: z.ZodEnum<{
|
|
76
|
-
entity_match: "entity_match";
|
|
77
|
-
office_variant: "office_variant";
|
|
78
|
-
relationship_support: "relationship_support";
|
|
79
|
-
professional_category: "professional_category";
|
|
80
|
-
}>;
|
|
81
|
-
relationship: z.ZodOptional<z.ZodEnum<{
|
|
82
|
-
observed_at_office: "observed_at_office";
|
|
83
|
-
observed_brokerage: "observed_brokerage";
|
|
84
|
-
affiliated_with: "affiliated_with";
|
|
85
|
-
operates: "operates";
|
|
86
|
-
member_of: "member_of";
|
|
87
|
-
}>>;
|
|
88
|
-
}, z.core.$strict>;
|
|
89
|
-
readonly output: z.ZodObject<{
|
|
90
|
-
state: z.ZodEnum<{
|
|
91
|
-
stale: "stale";
|
|
92
|
-
failed: "failed";
|
|
93
|
-
running: "running";
|
|
94
|
-
succeeded: "succeeded";
|
|
95
|
-
queued: "queued";
|
|
96
|
-
not_assessed: "not_assessed";
|
|
97
|
-
}>;
|
|
98
|
-
assessment: z.ZodNullable<z.ZodObject<{
|
|
99
|
-
id: z.ZodString;
|
|
100
|
-
entity_id: z.ZodString;
|
|
101
|
-
comparison_id: z.ZodNullable<z.ZodString>;
|
|
102
|
-
task: z.ZodEnum<{
|
|
103
|
-
entity_match: "entity_match";
|
|
104
|
-
office_variant: "office_variant";
|
|
105
|
-
relationship_support: "relationship_support";
|
|
106
|
-
professional_category: "professional_category";
|
|
107
|
-
}>;
|
|
108
|
-
definition_version: z.ZodString;
|
|
109
|
-
evidence_hash: z.ZodString;
|
|
110
|
-
state: z.ZodEnum<{
|
|
111
|
-
stale: "stale";
|
|
112
|
-
failed: "failed";
|
|
113
|
-
running: "running";
|
|
114
|
-
succeeded: "succeeded";
|
|
115
|
-
queued: "queued";
|
|
116
|
-
}>;
|
|
117
|
-
provider: z.ZodString;
|
|
118
|
-
model: z.ZodString;
|
|
119
|
-
result: z.ZodNullable<z.ZodObject<{
|
|
120
|
-
decision: z.ZodEnum<{
|
|
121
|
-
unknown: "unknown";
|
|
122
|
-
supported: "supported";
|
|
123
|
-
conflicting: "conflicting";
|
|
124
|
-
not_established: "not_established";
|
|
125
|
-
consistent: "consistent";
|
|
126
|
-
distinct: "distinct";
|
|
127
|
-
residential: "residential";
|
|
128
|
-
commercial: "commercial";
|
|
129
|
-
rental: "rental";
|
|
130
|
-
mixed: "mixed";
|
|
131
|
-
}>;
|
|
132
|
-
evidence_refs: z.ZodArray<z.ZodString>;
|
|
133
|
-
confidence: z.ZodNumber;
|
|
134
|
-
authority: z.ZodLiteral<"semantic_assessment">;
|
|
135
|
-
changes_account_access: z.ZodLiteral<false>;
|
|
136
|
-
}, z.core.$strict>>;
|
|
137
|
-
error_code: z.ZodNullable<z.ZodString>;
|
|
138
|
-
created_at: z.ZodISODateTime;
|
|
139
|
-
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
140
|
-
}, z.core.$strict>>;
|
|
141
|
-
}, z.core.$strict>;
|
|
142
|
-
};
|
|
143
|
-
readonly requestDirectoryAssessment: {
|
|
144
|
-
readonly input: z.ZodObject<{
|
|
145
|
-
dataset_id: z.ZodString;
|
|
146
|
-
entity_id: z.ZodString;
|
|
147
|
-
comparison_id: z.ZodOptional<z.ZodString>;
|
|
148
|
-
task: z.ZodEnum<{
|
|
149
|
-
entity_match: "entity_match";
|
|
150
|
-
office_variant: "office_variant";
|
|
151
|
-
relationship_support: "relationship_support";
|
|
152
|
-
professional_category: "professional_category";
|
|
153
|
-
}>;
|
|
154
|
-
relationship: z.ZodOptional<z.ZodEnum<{
|
|
155
|
-
observed_at_office: "observed_at_office";
|
|
156
|
-
observed_brokerage: "observed_brokerage";
|
|
157
|
-
affiliated_with: "affiliated_with";
|
|
158
|
-
operates: "operates";
|
|
159
|
-
member_of: "member_of";
|
|
160
|
-
}>>;
|
|
161
|
-
}, z.core.$strict>;
|
|
162
|
-
readonly output: z.ZodObject<{
|
|
163
|
-
id: z.ZodString;
|
|
164
|
-
entity_id: z.ZodString;
|
|
165
|
-
comparison_id: z.ZodNullable<z.ZodString>;
|
|
166
|
-
task: z.ZodEnum<{
|
|
167
|
-
entity_match: "entity_match";
|
|
168
|
-
office_variant: "office_variant";
|
|
169
|
-
relationship_support: "relationship_support";
|
|
170
|
-
professional_category: "professional_category";
|
|
171
|
-
}>;
|
|
172
|
-
definition_version: z.ZodString;
|
|
173
|
-
evidence_hash: z.ZodString;
|
|
174
|
-
state: z.ZodEnum<{
|
|
175
|
-
stale: "stale";
|
|
176
|
-
failed: "failed";
|
|
177
|
-
running: "running";
|
|
178
|
-
succeeded: "succeeded";
|
|
179
|
-
queued: "queued";
|
|
180
|
-
}>;
|
|
181
|
-
provider: z.ZodString;
|
|
182
|
-
model: z.ZodString;
|
|
183
|
-
result: z.ZodNullable<z.ZodObject<{
|
|
184
|
-
decision: z.ZodEnum<{
|
|
185
|
-
unknown: "unknown";
|
|
186
|
-
supported: "supported";
|
|
187
|
-
conflicting: "conflicting";
|
|
188
|
-
not_established: "not_established";
|
|
189
|
-
consistent: "consistent";
|
|
190
|
-
distinct: "distinct";
|
|
191
|
-
residential: "residential";
|
|
192
|
-
commercial: "commercial";
|
|
193
|
-
rental: "rental";
|
|
194
|
-
mixed: "mixed";
|
|
195
|
-
}>;
|
|
196
|
-
evidence_refs: z.ZodArray<z.ZodString>;
|
|
197
|
-
confidence: z.ZodNumber;
|
|
198
|
-
authority: z.ZodLiteral<"semantic_assessment">;
|
|
199
|
-
changes_account_access: z.ZodLiteral<false>;
|
|
200
|
-
}, z.core.$strict>>;
|
|
201
|
-
error_code: z.ZodNullable<z.ZodString>;
|
|
202
|
-
created_at: z.ZodISODateTime;
|
|
203
|
-
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
204
|
-
}, z.core.$strict>;
|
|
205
|
-
};
|
|
206
|
-
readonly getDirectoryAssessment: {
|
|
207
|
-
readonly input: z.ZodObject<{
|
|
208
|
-
id: z.ZodString;
|
|
209
|
-
}, z.core.$strict>;
|
|
210
|
-
readonly output: z.ZodObject<{
|
|
211
|
-
id: z.ZodString;
|
|
212
|
-
entity_id: z.ZodString;
|
|
213
|
-
comparison_id: z.ZodNullable<z.ZodString>;
|
|
214
|
-
task: z.ZodEnum<{
|
|
215
|
-
entity_match: "entity_match";
|
|
216
|
-
office_variant: "office_variant";
|
|
217
|
-
relationship_support: "relationship_support";
|
|
218
|
-
professional_category: "professional_category";
|
|
219
|
-
}>;
|
|
220
|
-
definition_version: z.ZodString;
|
|
221
|
-
evidence_hash: z.ZodString;
|
|
222
|
-
state: z.ZodEnum<{
|
|
223
|
-
stale: "stale";
|
|
224
|
-
failed: "failed";
|
|
225
|
-
running: "running";
|
|
226
|
-
succeeded: "succeeded";
|
|
227
|
-
queued: "queued";
|
|
228
|
-
}>;
|
|
229
|
-
provider: z.ZodString;
|
|
230
|
-
model: z.ZodString;
|
|
231
|
-
result: z.ZodNullable<z.ZodObject<{
|
|
232
|
-
decision: z.ZodEnum<{
|
|
233
|
-
unknown: "unknown";
|
|
234
|
-
supported: "supported";
|
|
235
|
-
conflicting: "conflicting";
|
|
236
|
-
not_established: "not_established";
|
|
237
|
-
consistent: "consistent";
|
|
238
|
-
distinct: "distinct";
|
|
239
|
-
residential: "residential";
|
|
240
|
-
commercial: "commercial";
|
|
241
|
-
rental: "rental";
|
|
242
|
-
mixed: "mixed";
|
|
243
|
-
}>;
|
|
244
|
-
evidence_refs: z.ZodArray<z.ZodString>;
|
|
245
|
-
confidence: z.ZodNumber;
|
|
246
|
-
authority: z.ZodLiteral<"semantic_assessment">;
|
|
247
|
-
changes_account_access: z.ZodLiteral<false>;
|
|
248
|
-
}, z.core.$strict>>;
|
|
249
|
-
error_code: z.ZodNullable<z.ZodString>;
|
|
250
|
-
created_at: z.ZodISODateTime;
|
|
251
|
-
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
252
|
-
}, z.core.$strict>;
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
|
-
export type DirectoryAssessmentInput = z.infer<typeof DirectoryAssessmentRequest>;
|
|
256
|
-
export type DirectoryAssessment = z.infer<typeof DirectoryAssessmentSchema>;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
const Id = z.string().min(1).max(256);
|
|
3
|
-
export const DirectoryAssessmentTask = z.enum([
|
|
4
|
-
'entity_match',
|
|
5
|
-
'office_variant',
|
|
6
|
-
'relationship_support',
|
|
7
|
-
'professional_category',
|
|
8
|
-
]);
|
|
9
|
-
export const DirectoryAssessmentRequest = z
|
|
10
|
-
.strictObject({
|
|
11
|
-
dataset_id: Id,
|
|
12
|
-
entity_id: Id,
|
|
13
|
-
comparison_id: Id.optional(),
|
|
14
|
-
task: DirectoryAssessmentTask,
|
|
15
|
-
relationship: z
|
|
16
|
-
.enum([
|
|
17
|
-
'affiliated_with',
|
|
18
|
-
'operates',
|
|
19
|
-
'member_of',
|
|
20
|
-
'observed_at_office',
|
|
21
|
-
'observed_brokerage',
|
|
22
|
-
])
|
|
23
|
-
.optional(),
|
|
24
|
-
})
|
|
25
|
-
.superRefine((input, ctx) => {
|
|
26
|
-
if (input.task !== 'professional_category' && !input.comparison_id)
|
|
27
|
-
ctx.addIssue({ code: 'custom', message: 'Pair tasks require comparison_id.' });
|
|
28
|
-
if (input.comparison_id === input.entity_id)
|
|
29
|
-
ctx.addIssue({ code: 'custom', message: 'Compare distinct records.' });
|
|
30
|
-
if (input.task === 'professional_category' && input.comparison_id)
|
|
31
|
-
ctx.addIssue({ code: 'custom', message: 'Category tasks have one subject.' });
|
|
32
|
-
if (input.task === 'relationship_support' && !input.relationship)
|
|
33
|
-
ctx.addIssue({
|
|
34
|
-
code: 'custom',
|
|
35
|
-
message: 'Relationship support requires an explicit relationship predicate.',
|
|
36
|
-
});
|
|
37
|
-
if (input.task !== 'relationship_support' && input.relationship)
|
|
38
|
-
ctx.addIssue({
|
|
39
|
-
code: 'custom',
|
|
40
|
-
message: 'Only relationship-support tasks accept a relationship predicate.',
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
export const DirectoryAssessmentSchema = z.strictObject({
|
|
44
|
-
id: Id,
|
|
45
|
-
entity_id: Id,
|
|
46
|
-
comparison_id: Id.nullable(),
|
|
47
|
-
task: DirectoryAssessmentTask,
|
|
48
|
-
definition_version: z.string(),
|
|
49
|
-
evidence_hash: z.string(),
|
|
50
|
-
state: z.enum(['queued', 'running', 'succeeded', 'failed', 'stale']),
|
|
51
|
-
provider: z.string(),
|
|
52
|
-
model: z.string(),
|
|
53
|
-
result: z
|
|
54
|
-
.strictObject({
|
|
55
|
-
decision: z.enum([
|
|
56
|
-
'consistent',
|
|
57
|
-
'distinct',
|
|
58
|
-
'supported',
|
|
59
|
-
'not_established',
|
|
60
|
-
'conflicting',
|
|
61
|
-
'residential',
|
|
62
|
-
'commercial',
|
|
63
|
-
'rental',
|
|
64
|
-
'mixed',
|
|
65
|
-
'unknown',
|
|
66
|
-
]),
|
|
67
|
-
evidence_refs: z.array(z.string()),
|
|
68
|
-
confidence: z.number().min(0).max(1),
|
|
69
|
-
authority: z.literal('semantic_assessment'),
|
|
70
|
-
changes_account_access: z.literal(false),
|
|
71
|
-
})
|
|
72
|
-
.nullable(),
|
|
73
|
-
error_code: z.string().nullable(),
|
|
74
|
-
created_at: z.iso.datetime({ offset: true }),
|
|
75
|
-
completed_at: z.iso.datetime({ offset: true }).nullable(),
|
|
76
|
-
});
|
|
77
|
-
export const professionalIntelligenceOperations = {
|
|
78
|
-
latestDirectoryAssessment: {
|
|
79
|
-
input: DirectoryAssessmentRequest,
|
|
80
|
-
output: z.strictObject({
|
|
81
|
-
state: z.enum(['not_assessed', 'queued', 'running', 'succeeded', 'failed', 'stale']),
|
|
82
|
-
assessment: DirectoryAssessmentSchema.nullable(),
|
|
83
|
-
}),
|
|
84
|
-
},
|
|
85
|
-
requestDirectoryAssessment: {
|
|
86
|
-
input: DirectoryAssessmentRequest,
|
|
87
|
-
output: DirectoryAssessmentSchema,
|
|
88
|
-
},
|
|
89
|
-
getDirectoryAssessment: { input: z.strictObject({ id: Id }), output: DirectoryAssessmentSchema },
|
|
90
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const PublicationReportRequest: z.ZodObject<{
|
|
3
|
-
dataset_id: z.ZodString;
|
|
4
|
-
listing_id: z.ZodString;
|
|
5
|
-
sequence: z.ZodString;
|
|
6
|
-
state: z.ZodEnum<{
|
|
7
|
-
unavailable: "unavailable";
|
|
8
|
-
available: "available";
|
|
9
|
-
}>;
|
|
10
|
-
url: z.ZodNullable<z.ZodURL>;
|
|
11
|
-
listing_revision: z.ZodString;
|
|
12
|
-
listing_published_at: z.ZodISODateTime;
|
|
13
|
-
observed_at: z.ZodISODateTime;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
|
-
export declare const PublicationReceipt: z.ZodObject<{
|
|
16
|
-
listing_id: z.ZodString;
|
|
17
|
-
product_id: z.ZodString;
|
|
18
|
-
sequence: z.ZodString;
|
|
19
|
-
state: z.ZodEnum<{
|
|
20
|
-
unavailable: "unavailable";
|
|
21
|
-
available: "available";
|
|
22
|
-
}>;
|
|
23
|
-
expires_at: z.ZodISODateTime;
|
|
24
|
-
}, z.core.$strict>;
|
|
25
|
-
export declare const DestinationQuery: z.ZodObject<{
|
|
26
|
-
id: z.ZodString;
|
|
27
|
-
dataset_id: z.ZodString;
|
|
28
|
-
product_id: z.ZodString;
|
|
29
|
-
}, z.core.$strict>;
|
|
30
|
-
export declare const DestinationResponse: z.ZodObject<{
|
|
31
|
-
listing_id: z.ZodString;
|
|
32
|
-
product_id: z.ZodString;
|
|
33
|
-
url: z.ZodNullable<z.ZodString>;
|
|
34
|
-
available: z.ZodBoolean;
|
|
35
|
-
reason: z.ZodEnum<{
|
|
36
|
-
unavailable: "unavailable";
|
|
37
|
-
expired: "expired";
|
|
38
|
-
available: "available";
|
|
39
|
-
not_reported: "not_reported";
|
|
40
|
-
listing_changed: "listing_changed";
|
|
41
|
-
source_stale: "source_stale";
|
|
42
|
-
}>;
|
|
43
|
-
checked_at: z.ZodISODateTime;
|
|
44
|
-
}, z.core.$strict>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// Products report their own publication state. This is not a license to publish a listing.
|
|
3
|
-
const Identifier = z.string().min(1).max(256);
|
|
4
|
-
export const PublicationReportRequest = z
|
|
5
|
-
.strictObject({
|
|
6
|
-
dataset_id: Identifier,
|
|
7
|
-
listing_id: Identifier,
|
|
8
|
-
sequence: z.string().regex(/^[1-9]\d{0,17}$/),
|
|
9
|
-
state: z.enum(['available', 'unavailable']),
|
|
10
|
-
url: z.url().max(2048).nullable(),
|
|
11
|
-
listing_revision: z.string().min(1).max(64),
|
|
12
|
-
listing_published_at: z.iso.datetime({ offset: true }),
|
|
13
|
-
observed_at: z.iso.datetime({ offset: true }),
|
|
14
|
-
})
|
|
15
|
-
.refine((input) => (input.state === 'unavailable' ? input.url === null : input.url !== null), 'Available publications need a URL; unavailable publications must clear it.');
|
|
16
|
-
export const PublicationReceipt = z.strictObject({
|
|
17
|
-
listing_id: Identifier,
|
|
18
|
-
product_id: Identifier,
|
|
19
|
-
sequence: z.string(),
|
|
20
|
-
state: z.enum(['available', 'unavailable']),
|
|
21
|
-
expires_at: z.iso.datetime({ offset: true }),
|
|
22
|
-
});
|
|
23
|
-
export const DestinationQuery = z.strictObject({
|
|
24
|
-
id: Identifier,
|
|
25
|
-
dataset_id: Identifier,
|
|
26
|
-
product_id: Identifier,
|
|
27
|
-
});
|
|
28
|
-
export const DestinationResponse = z.strictObject({
|
|
29
|
-
listing_id: Identifier,
|
|
30
|
-
product_id: Identifier,
|
|
31
|
-
url: z.string().nullable(),
|
|
32
|
-
available: z.boolean(),
|
|
33
|
-
reason: z.enum([
|
|
34
|
-
'available',
|
|
35
|
-
'not_reported',
|
|
36
|
-
'unavailable',
|
|
37
|
-
'expired',
|
|
38
|
-
'listing_changed',
|
|
39
|
-
'source_stale',
|
|
40
|
-
]),
|
|
41
|
-
checked_at: z.iso.datetime({ offset: true }),
|
|
42
|
-
});
|