@signa-so/sdk 0.4.0 → 0.8.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.
Files changed (102) hide show
  1. package/README.md +47 -6
  2. package/dist/_internals/fetch-with-retry.d.ts +0 -2
  3. package/dist/_internals/fetch-with-retry.d.ts.map +1 -1
  4. package/dist/_internals/fetch-with-retry.js +11 -8
  5. package/dist/_internals/fetch-with-retry.js.map +1 -1
  6. package/dist/_internals/query-string.d.ts +1 -1
  7. package/dist/_internals/query-string.js +1 -1
  8. package/dist/category-nice.d.ts +22 -0
  9. package/dist/category-nice.d.ts.map +1 -0
  10. package/dist/category-nice.js +109 -0
  11. package/dist/category-nice.js.map +1 -0
  12. package/dist/client.d.ts +26 -0
  13. package/dist/client.d.ts.map +1 -1
  14. package/dist/client.js +34 -0
  15. package/dist/client.js.map +1 -1
  16. package/dist/generated/api-types.d.ts +7325 -2217
  17. package/dist/generated/api-types.d.ts.map +1 -1
  18. package/dist/index.d.ts +4 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/pagination.d.ts +23 -1
  23. package/dist/pagination.d.ts.map +1 -1
  24. package/dist/pagination.js +27 -0
  25. package/dist/pagination.js.map +1 -1
  26. package/dist/resource.d.ts +0 -2
  27. package/dist/resource.d.ts.map +1 -1
  28. package/dist/resource.js +0 -10
  29. package/dist/resource.js.map +1 -1
  30. package/dist/resources/analytics.d.ts +8 -0
  31. package/dist/resources/analytics.d.ts.map +1 -0
  32. package/dist/resources/analytics.js +13 -0
  33. package/dist/resources/analytics.js.map +1 -0
  34. package/dist/resources/assignments.d.ts +25 -0
  35. package/dist/resources/assignments.d.ts.map +1 -0
  36. package/dist/resources/assignments.js +33 -0
  37. package/dist/resources/assignments.js.map +1 -0
  38. package/dist/resources/attorneys.d.ts +2 -1
  39. package/dist/resources/attorneys.d.ts.map +1 -1
  40. package/dist/resources/attorneys.js +4 -0
  41. package/dist/resources/attorneys.js.map +1 -1
  42. package/dist/resources/compare.d.ts +29 -0
  43. package/dist/resources/compare.d.ts.map +1 -0
  44. package/dist/resources/compare.js +30 -0
  45. package/dist/resources/compare.js.map +1 -0
  46. package/dist/resources/deadlines.d.ts +24 -0
  47. package/dist/resources/deadlines.d.ts.map +1 -0
  48. package/dist/resources/deadlines.js +26 -0
  49. package/dist/resources/deadlines.js.map +1 -0
  50. package/dist/resources/entities.d.ts +2 -1
  51. package/dist/resources/entities.d.ts.map +1 -1
  52. package/dist/resources/entities.js +4 -0
  53. package/dist/resources/entities.js.map +1 -1
  54. package/dist/resources/events.d.ts +2 -2
  55. package/dist/resources/events.d.ts.map +1 -1
  56. package/dist/resources/events.js +2 -2
  57. package/dist/resources/events.js.map +1 -1
  58. package/dist/resources/feedback.d.ts +19 -0
  59. package/dist/resources/feedback.d.ts.map +1 -0
  60. package/dist/resources/feedback.js +29 -0
  61. package/dist/resources/feedback.js.map +1 -0
  62. package/dist/resources/firms.d.ts +3 -2
  63. package/dist/resources/firms.d.ts.map +1 -1
  64. package/dist/resources/firms.js +5 -1
  65. package/dist/resources/firms.js.map +1 -1
  66. package/dist/resources/goods-services.d.ts +1 -1
  67. package/dist/resources/goods-services.js +1 -1
  68. package/dist/resources/oppositions.d.ts +18 -0
  69. package/dist/resources/oppositions.d.ts.map +1 -0
  70. package/dist/resources/oppositions.js +20 -0
  71. package/dist/resources/oppositions.js.map +1 -0
  72. package/dist/resources/organization.d.ts +7 -1
  73. package/dist/resources/organization.d.ts.map +1 -1
  74. package/dist/resources/organization.js +8 -0
  75. package/dist/resources/organization.js.map +1 -1
  76. package/dist/resources/owners.d.ts +2 -1
  77. package/dist/resources/owners.d.ts.map +1 -1
  78. package/dist/resources/owners.js +4 -0
  79. package/dist/resources/owners.js.map +1 -1
  80. package/dist/resources/reconcile.d.ts +22 -0
  81. package/dist/resources/reconcile.d.ts.map +1 -0
  82. package/dist/resources/reconcile.js +24 -0
  83. package/dist/resources/reconcile.js.map +1 -0
  84. package/dist/resources/references.d.ts +2 -2
  85. package/dist/resources/references.js +2 -2
  86. package/dist/resources/screening.d.ts +63 -0
  87. package/dist/resources/screening.d.ts.map +1 -0
  88. package/dist/resources/screening.js +66 -0
  89. package/dist/resources/screening.js.map +1 -0
  90. package/dist/resources/trademarks.d.ts +67 -33
  91. package/dist/resources/trademarks.d.ts.map +1 -1
  92. package/dist/resources/trademarks.js +114 -50
  93. package/dist/resources/trademarks.js.map +1 -1
  94. package/dist/resources/watches.d.ts +14 -2
  95. package/dist/resources/watches.d.ts.map +1 -1
  96. package/dist/resources/watches.js +21 -1
  97. package/dist/resources/watches.js.map +1 -1
  98. package/dist/types.d.ts +1712 -141
  99. package/dist/types.d.ts.map +1 -1
  100. package/dist/version.d.ts +1 -1
  101. package/dist/version.js +1 -1
  102. package/package.json +3 -2
package/dist/types.d.ts CHANGED
@@ -3,8 +3,10 @@ import type { components } from './generated/api-types.js';
3
3
  export type Trademark = components['schemas']['TrademarkDetailResponse'];
4
4
  /** Compact trademark in list responses. */
5
5
  export type TrademarkSummary = components['schemas']['TrademarkSummaryV1'];
6
- /** Trademark event in history responses. */
7
- export type Event = components['schemas']['TrademarkHistoryEvent'];
6
+ /** One inline `relationships[]` edge on the trademark detail. */
7
+ export type TrademarkRelationship = components['schemas']['TrademarkRelationship'];
8
+ /** Trademark prosecution event (GET /v1/trademarks/{id}/events). */
9
+ export type Event = components['schemas']['TrademarkEvent'];
8
10
  /** Stats object shape returned by ?include=stats on attorney detail. */
9
11
  export interface AttorneyStats {
10
12
  trademark_count: number | null;
@@ -13,7 +15,10 @@ export interface AttorneyStats {
13
15
  cancelled_count: number | null;
14
16
  pending_count: number | null;
15
17
  abandoned_count: number | null;
18
+ /** @deprecated Use `grant_rate` — same value. `registration_rate` is a misnomer (share of concluded prosecutions ever granted, not share currently registered). */
16
19
  registration_rate: number | null;
20
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
21
+ grant_rate: number | null;
17
22
  abandonment_rate: number | null;
18
23
  avg_prosecution_days: number | null;
19
24
  jurisdiction_count: number | null;
@@ -29,33 +34,24 @@ export interface OwnerStats {
29
34
  cancelled_count: number | null;
30
35
  pending_count: number | null;
31
36
  abandoned_count: number | null;
37
+ /** @deprecated Use `grant_rate` — same value. `registration_rate` is a misnomer (share of concluded prosecutions ever granted, not share currently registered). */
32
38
  registration_rate: number | null;
39
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
40
+ grant_rate: number | null;
33
41
  abandonment_rate: number | null;
34
42
  jurisdiction_count: number | null;
35
43
  earliest_filing: string | null;
36
44
  latest_filing: string | null;
37
45
  computed_at: string | null;
38
46
  }
39
- /** Stats object shape returned by ?include=stats on firm detail. */
40
- export interface FirmStats {
41
- trademark_count: number | null;
42
- registered_count: number | null;
43
- expired_count: number | null;
44
- cancelled_count: number | null;
45
- pending_count: number | null;
46
- abandoned_count: number | null;
47
- registration_rate: number | null;
48
- abandonment_rate: number | null;
49
- avg_prosecution_days: number | null;
50
- jurisdiction_count: number | null;
51
- earliest_filing: string | null;
52
- latest_filing: string | null;
53
- computed_at: string | null;
54
- }
55
47
  /** Full owner detail (retrieve response). */
56
48
  export type Owner = components['schemas']['OwnerResponse'] & {
57
49
  trademark_count?: number | null;
50
+ active_count?: number | null;
51
+ /** @deprecated Use `grant_rate` — same value; `registration_rate` is a misnomer. */
58
52
  registration_rate?: number | null;
53
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
54
+ grant_rate?: number | null;
59
55
  latest_filing?: string | null;
60
56
  /** Resolved-entity id this owner belongs to (the derived `ent_<owner-uuid>`
61
57
  * singleton when unlinked). Always present. */
@@ -96,10 +92,68 @@ export type Owner = components['schemas']['OwnerResponse'] & {
96
92
  };
97
93
  stats?: OwnerStats;
98
94
  };
95
+ /** Composed live portfolio analytics report for an owner, attorney, firm, or entity. */
96
+ export interface AnalyticsReport {
97
+ object: 'analytics_report';
98
+ subject: {
99
+ id: string;
100
+ object: 'owner' | 'attorney' | 'firm' | 'entity';
101
+ name: string;
102
+ };
103
+ portfolio: {
104
+ mark_count: number;
105
+ active_count: number;
106
+ dead_count: number;
107
+ status_distribution: Record<string, number>;
108
+ class_distribution: Record<string, number>;
109
+ jurisdiction_spread: Record<string, number>;
110
+ filing_trend: Record<string, number>;
111
+ };
112
+ litigation: {
113
+ subject: {
114
+ owner_id: string | null;
115
+ entity_id: string | null;
116
+ };
117
+ proceedings_total: number;
118
+ as_challenger: {
119
+ total: number;
120
+ by_type: Record<string, number>;
121
+ outcomes: Record<string, number>;
122
+ decided: number;
123
+ win_rate: number | null;
124
+ avg_duration_days: number | null;
125
+ };
126
+ as_defendant: {
127
+ total: number;
128
+ by_type: Record<string, number>;
129
+ outcomes: Record<string, number>;
130
+ decided: number;
131
+ win_rate: number | null;
132
+ avg_duration_days: number | null;
133
+ };
134
+ } | null;
135
+ transactions: {
136
+ transaction_count: number;
137
+ by_type: Record<string, number>;
138
+ unreleased_security_interests: number;
139
+ marks_with_liens: number;
140
+ acquired_count: number;
141
+ divested_count: number;
142
+ first_transaction_date: string | null;
143
+ last_transaction_date: string | null;
144
+ } | null;
145
+ generated_at: string;
146
+ /** Per-request id echoed at the top level of the response body (`AnalyticsReportResponse` in the OpenAPI spec). */
147
+ request_id: string;
148
+ }
99
149
  /** Compact owner in list responses. */
100
150
  export type OwnerSummary = components['schemas']['OwnerSummary'] & {
101
151
  trademark_count?: number | null;
152
+ active_count?: number | null;
153
+ /** @deprecated Use `grant_rate` — same value; `registration_rate` is a misnomer. */
102
154
  registration_rate?: number | null;
155
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
156
+ grant_rate?: number | null;
103
157
  latest_filing?: string | null;
104
158
  entity_id?: string;
105
159
  entity_id_type?: 'resolved' | 'derived';
@@ -111,7 +165,11 @@ export type Attorney = components['schemas']['AttorneyResponse'] & {
111
165
  phone?: string | null;
112
166
  address?: unknown | null;
113
167
  trademark_count?: number | null;
168
+ active_count?: number | null;
169
+ /** @deprecated Use `grant_rate` — same value; `registration_rate` is a misnomer. */
114
170
  registration_rate?: number | null;
171
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
172
+ grant_rate?: number | null;
115
173
  latest_filing?: string | null;
116
174
  recent_trademarks?: Array<Record<string, unknown>>;
117
175
  recent_trademarks_has_more?: boolean;
@@ -121,7 +179,11 @@ export type Attorney = components['schemas']['AttorneyResponse'] & {
121
179
  export type AttorneySummary = components['schemas']['AttorneySummary'] & {
122
180
  firm_id?: string | null;
123
181
  trademark_count?: number | null;
182
+ active_count?: number | null;
183
+ /** @deprecated Use `grant_rate` — same value; `registration_rate` is a misnomer. */
124
184
  registration_rate?: number | null;
185
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
186
+ grant_rate?: number | null;
125
187
  latest_filing?: string | null;
126
188
  };
127
189
  /** Full firm detail (retrieve response). */
@@ -132,11 +194,14 @@ export interface Firm {
132
194
  canonical_name: string;
133
195
  attorney_count: number;
134
196
  trademark_count: number;
197
+ active_count: number;
198
+ /** @deprecated Use `grant_rate` — same value; `registration_rate` is a misnomer. */
135
199
  registration_rate: number | null;
200
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
201
+ grant_rate: number | null;
136
202
  latest_filing: string | null;
137
203
  created_at: string;
138
204
  updated_at: string;
139
- stats?: FirmStats;
140
205
  attorneys?: Array<{
141
206
  id: string;
142
207
  object: 'attorney';
@@ -157,7 +222,11 @@ export interface FirmSummary {
157
222
  canonical_name: string;
158
223
  attorney_count: number;
159
224
  trademark_count: number;
225
+ active_count: number;
226
+ /** @deprecated Use `grant_rate` — same value; `registration_rate` is a misnomer. */
160
227
  registration_rate: number | null;
228
+ /** Share of concluded prosecutions that were ever granted. Same value as the deprecated `registration_rate`. */
229
+ grant_rate: number | null;
161
230
  latest_filing: string | null;
162
231
  created_at: string;
163
232
  }
@@ -174,17 +243,17 @@ export interface EntityCompany {
174
243
  verified_at?: string | null;
175
244
  verified_by?: string | null;
176
245
  }
177
- /** Whitelisted per-member link evidence on an entity-detail member. */
246
+ /** Public per-member link provenance on an entity-detail member. */
178
247
  export interface EntityMemberLink {
179
- signal: string;
180
- tier: string | null;
181
- confidence: number | null;
182
- decided_by: string;
183
- /** token-overlap count from the name guard, when present. */
184
- guard_overlap?: number;
185
- /** matched canonical IR numbers (madrid_ir tier), when present. */
248
+ /** How this member was linked into the entity (stable public vocabulary). */
249
+ method: 'international_registration' | 'shared_identifier' | 'public_company' | 'portfolio_overlap' | 'manual_review' | 'other';
250
+ /** Coarse confidence band; null when not scored. */
251
+ match_strength: 'high' | 'medium' | 'low' | null;
252
+ /** Whether the link was confirmed by adjudication/manual review. */
253
+ reviewed: boolean;
254
+ /** matched canonical IR numbers (international_registration), when present. */
186
255
  matched_irs?: string[];
187
- /** matched office-identifier values (office_identifier tier), when present. */
256
+ /** matched office-identifier values (shared_identifier), when present. */
188
257
  matched_identifiers?: string[];
189
258
  }
190
259
  /** A member owner embedded in an entity-detail response. */
@@ -211,8 +280,36 @@ export interface EntitySummary {
211
280
  ticker: string | null;
212
281
  lei: string | null;
213
282
  trademark_count: number;
283
+ active_count: number;
214
284
  member_count: number;
215
285
  }
286
+ /** The nearest listed ancestor of a `subsidiary_of_listed` entity, when it
287
+ * resolves to a live entity in our system. */
288
+ export interface EntityListedAncestor {
289
+ id: string;
290
+ object: 'entity';
291
+ name: string;
292
+ /** The listed ancestor's own ticker. */
293
+ ticker: string | null;
294
+ }
295
+ /** Public-listing decoration (ENG-117). Present on {@link EntityDetail} ONLY when
296
+ * the entity is listed or a subsidiary of a listed company; OMITTED otherwise
297
+ * (absence ≠ confirmed-private). */
298
+ export interface EntityListing {
299
+ /** 'listed' = the entity is itself publicly listed; 'subsidiary_of_listed' =
300
+ * it inherits a ticker from a listed ancestor. */
301
+ status: 'listed' | 'subsidiary_of_listed';
302
+ /** The entity's own ticker (listed) or the inherited ancestor ticker (subsidiary). */
303
+ ticker: string | null;
304
+ /** Exchange / market code (display only). */
305
+ exch_code: string | null;
306
+ /** LEI of the listed company: the entity's own LEI when listed, else the ancestor's. */
307
+ lei: string | null;
308
+ /** Derived from status: 'listed' → 'direct', 'subsidiary_of_listed' → 'inherited'. */
309
+ source: 'direct' | 'inherited';
310
+ /** The nearest listed ancestor; null for a directly-listed entity or when unresolvable. */
311
+ listed_ancestor: EntityListedAncestor | null;
312
+ }
216
313
  /** Full entity detail (`GET /v1/entities/{id}`). Resolved entities embed
217
314
  * members[] with link evidence; derived singletons carry a member-of-one. */
218
315
  export interface EntityDetail {
@@ -222,21 +319,28 @@ export interface EntityDetail {
222
319
  country_code: string | null;
223
320
  entity_type: string | null;
224
321
  entity_id_type: 'resolved' | 'derived';
225
- /** Public-company facts aggregated over member companies ("served through the
226
- * entity"). Always present. A derived singleton exposes the owner's own
227
- * public-company facts when present (pco-linked); otherwise false/null/empty. */
322
+ /** True when a member company is an active SEC ticker OR the entity itself is
323
+ * listed / a subsidiary of a listed company (ENG-117 — matches the list filter).
324
+ * A derived singleton exposes the owner's own public-company facts (pco-linked),
325
+ * else false. */
228
326
  publicly_traded: boolean;
229
327
  /** Survivorship ticker (first of {@link tickers}); null when none. */
230
328
  ticker: string | null;
231
- /** Deduped uppercased SEC tickers across all member companies. */
329
+ /** Deduped uppercased tickers: member-company SEC tickers UNION the entity's own
330
+ * direct/inherited (subsidiary_of_listed) listing_ticker (ENG-117). Includes
331
+ * inherited subsidiary tickers; direct-vs-inherited provenance is in {@link listing}. */
232
332
  tickers: string[];
233
333
  lei: string | null;
234
334
  /** Whether any member company carries a GLEIF LEI. */
235
335
  has_lei: boolean;
236
336
  trademark_count: number;
337
+ active_count: number;
237
338
  member_count: number;
238
339
  /** Resolved entities only — the GLEIF parent entity id, when present. */
239
340
  parent_entity_id?: string | null;
341
+ /** Public-listing block (ENG-117). Present only when the entity is listed or a
342
+ * subsidiary of a listed company; omitted otherwise. */
343
+ listing?: EntityListing;
240
344
  members: EntityMember[];
241
345
  updated_at: string;
242
346
  request_id: string;
@@ -263,28 +367,64 @@ export interface EntityFamily {
263
367
  export type Proceeding = components['schemas']['Proceeding'];
264
368
  /** Full proceeding detail with embedded trademark (retrieve response). */
265
369
  export type ProceedingDetail = components['schemas']['ProceedingResponse'];
370
+ /** Recorded assignment in list responses. */
371
+ export type Assignment = components['schemas']['Assignment'];
372
+ /** Full assignment detail with parties and affected marks. */
373
+ export type AssignmentDetail = components['schemas']['AssignmentResponse'];
374
+ /** Assignment item returned under a trademark's chain of title. */
375
+ export type TrademarkAssignment = components['schemas']['TrademarkAssignmentSub'];
266
376
  /** Request body for POST /v1/trademarks/batch. */
267
377
  export type TrademarkBatchBody = components['schemas']['TrademarkBatchRequest'];
268
378
  /** Response shape for POST /v1/trademarks/batch (non-paginated). */
269
379
  export type TrademarkBatchResponse = components['schemas']['TrademarkBatchResponse'];
270
- /** Version-level change entry. */
271
- export type TrademarkChange = components['schemas']['TrademarkChange'];
272
- /** Mark-to-mark relationship entry. */
273
- export type TrademarkRelationship = components['schemas']['TrademarkRelated'];
274
380
  /** Trademark autocomplete suggestion entry. */
275
381
  export type TrademarkSuggestion = components['schemas']['TrademarkSuggestion'];
276
382
  /** Attorney client (owner) entry with shared count. */
277
383
  export type AttorneyClient = components['schemas']['AttorneyClient'];
278
384
  /** Search result item (V2 with match explanations and faceted aggregations). */
279
- export type SearchV2Result = components['schemas']['SearchResultV2'];
385
+ export type TrademarkSearchResult = components['schemas']['TrademarkSearchResult'];
280
386
  /** Cross-entity suggestion item. */
281
387
  export type CrossEntitySuggestion = components['schemas']['CrossEntitySuggestion'];
282
388
  /** Goods & services term (Nice classification). */
283
389
  export type GoodsServicesTerm = components['schemas']['GoodsServicesTerm'];
284
390
  /** Single maintenance deadline rule (item in `GET /v1/deadline-rules`). */
285
391
  export type DeadlineRule = components['schemas']['DeadlineRule'];
392
+ /** Single computed maintenance deadline. */
393
+ export type ComputedDeadline = components['schemas']['ComputedDeadline'];
394
+ /** Per-item result from `POST /v1/deadlines/compute`. */
395
+ export type DeadlineComputation = components['schemas']['DeadlineComputation'];
396
+ /** Input item for `POST /v1/deadlines/compute`. */
397
+ export type DeadlineComputeItem = components['schemas']['DeadlineComputeItem'];
398
+ /** Request body for `POST /v1/deadlines/compute`. */
399
+ export type DeadlineComputeParams = components['schemas']['DeadlineComputeRequest'];
400
+ /** List response from `POST /v1/deadlines/compute`. */
401
+ export type DeadlineComputeResponse = components['schemas']['DeadlineComputeResponse'];
286
402
  /** Single opposition window rule (item in `GET /v1/opposition-rules`). */
287
403
  export type OppositionRule = components['schemas']['OppositionRule'];
404
+ /** Common extension available for an opposition window, when modeled. */
405
+ export type OppositionCommonExtension = components['schemas']['OppositionCommonExtension'];
406
+ /** Source citation surfaced on an opposition window computation. */
407
+ export type OppositionWindowSource = components['schemas']['OppositionWindowSource'];
408
+ /** Per-item result from `POST /v1/oppositions/compute`. */
409
+ export type OppositionWindowComputation = components['schemas']['OppositionWindowComputation'];
410
+ /** Input item for `POST /v1/oppositions/compute`. */
411
+ export type OppositionComputeItem = components['schemas']['OppositionComputeItem'];
412
+ /** Request body for `POST /v1/oppositions/compute`. */
413
+ export type OppositionComputeParams = components['schemas']['OppositionComputeRequest'];
414
+ /** List response from `POST /v1/oppositions/compute`. */
415
+ export type OppositionComputeResponse = components['schemas']['OppositionComputeResponse'];
416
+ /** Single field comparison from `POST /v1/reconcile`. */
417
+ export type ReconcileFieldDiff = components['schemas']['ReconcileFieldDiff'];
418
+ /** Caller-supplied field values for `POST /v1/reconcile`. */
419
+ export type ReconcileYourFields = components['schemas']['ReconcileYourFields'];
420
+ /** Input item for `POST /v1/reconcile`. */
421
+ export type ReconcileItem = components['schemas']['ReconcileItem'];
422
+ /** Request body for `POST /v1/reconcile`. */
423
+ export type ReconcileParams = components['schemas']['ReconcileRequest'];
424
+ /** Per-item result from `POST /v1/reconcile`. */
425
+ export type Reconciliation = components['schemas']['Reconciliation'];
426
+ /** List response from `POST /v1/reconcile`. */
427
+ export type ReconcileResponse = components['schemas']['ReconcileResponse'];
288
428
  /** Statutory citation + URL surfaced on rule items. */
289
429
  export type RuleSource = components['schemas']['RuleSource'];
290
430
  /** Vienna design code. */
@@ -360,15 +500,22 @@ export type WatchStatus = 'active' | 'paused' | 'disabled';
360
500
  /**
361
501
  * Trigger event types — ingestion-emitted fact events a watch can subscribe to.
362
502
  *
363
- * v1 accepts exactly these 3 values. `trademark.retracted` and
364
- * `trademark.corrected` were listed in earlier SDK revisions but were NEVER
365
- * accepted by the API (create/update reject them with 400) and are never
366
- * emitted by the evaluator. Source of truth:
367
- * `api/src/modules/watches/validators.ts` `ALLOWED_TRIGGER_EVENTS`.
503
+ * All 5 values are accepted as `trigger_events` on create/update. The DEFAULT
504
+ * trigger set applied when you OMIT `trigger_events` is the original 3
505
+ * (`trademark.created`, `trademark.updated`, `trademark.status_changed`).
506
+ * `trademark.retracted` and `trademark.corrected` are OPT-IN: they fire only
507
+ * for watches that explicitly list them in `trigger_events`, and the evaluator
508
+ * actively derives + emits both. Source of truth:
509
+ * `api/src/modules/watches/validators.ts` `ALLOWED_TRIGGER_EVENTS`
510
+ * (= `ALERT_EVENT_TYPES` from `@signa/types`) and `DEFAULT_TRIGGER_EVENTS`.
368
511
  */
369
- export type WatchTriggerEvent = 'trademark.created' | 'trademark.updated' | 'trademark.status_changed';
512
+ export type WatchTriggerEvent = 'trademark.created' | 'trademark.updated' | 'trademark.status_changed' | 'trademark.retracted' | 'trademark.corrected';
513
+ /** Search strategy names accepted by watch similarity queries. */
514
+ export type WatchSearchStrategy = 'exact' | 'phonetic' | 'fuzzy' | 'prefix';
515
+ /** Attribution tier gate for watch similarity queries. */
516
+ export type WatchMinMatchTier = 'exact' | 'normalized' | 'fuzzy' | 'phonetic';
370
517
  /**
371
- * Watch query DSL (v1). Five watch types share one shape — the
518
+ * Watch query DSL. Five watch types share one shape — the
372
519
  * `watch_type` selects which scoping field is required, but the body
373
520
  * shape is identical to a trademark search body. See the
374
521
  * [Watches guide](https://docs.signa.so/guides/monitoring/watches) for
@@ -377,28 +524,40 @@ export type WatchTriggerEvent = 'trademark.created' | 'trademark.updated' | 'tra
377
524
  * `q` is a whitespace-separated keyword list (max 20, each ≥3 chars, no
378
525
  * stop words). `filters` accepts the same vocabulary as the trademark
379
526
  * search API (`trademarkIds`, `ownerId`, `niceClasses`, `jurisdictions`,
380
- * `offices`, etc.). `trigger_events` narrows which lifecycle events
381
- * fire alerts. `score_threshold` (0..1) gates similarity matches.
527
+ * `offices`, etc.). `strategies` uses the same selector as public trademark
528
+ * search. `trigger_events` narrows which lifecycle events fire alerts.
529
+ * `min_match_tier` gates similarity matches by retrieval attribution tier.
530
+ * `score_threshold` is NOT currently supported — sending it on a write is
531
+ * rejected with 400; scores are informational (see `match_score` on alerts).
382
532
  *
383
533
  * Forbidden DSL keys (`function_score`, `script`, `sort`, `cursor`,
384
534
  * `aggregations`, `highlight`) are rejected with 400. `query.match` is
385
535
  * rejected in ANY form (object or string) — earlier doc revisions described
386
536
  * shapes that were never honored by the evaluator. Use `filters.ownerId`,
387
537
  * `filters.trademarkIds`, `filters.niceClasses` for scoping and
388
- * `score_threshold` for similarity precision. Unknown `filters` keys are
538
+ * `min_match_tier` for similarity precision. Unknown `filters` keys are
389
539
  * rejected with 400 listing the allowed vocabulary; `filters.offices`
390
540
  * accepts any casing and is stored lowercase.
391
541
  */
392
542
  export interface WatchQuery {
393
- /** Always `"v1"` for monitoring v1. */
394
- version: 'v1';
543
+ /** `"v2"` for tier-based watch matching. `"v1"` is accepted during migration. */
544
+ version: 'v1' | 'v2';
395
545
  /** Optional keyword query (required for similarity watches). Whitespace-separated; each ≥3 chars; no stop words. */
396
546
  q?: string;
547
+ /** Search strategies to use. Omit for the public-search default (`exact` + `fuzzy`). */
548
+ strategies?: WatchSearchStrategy[];
397
549
  /** Filter object — same vocabulary as the trademark search API. Common keys: `trademarkIds`, `ownerId`, `niceClasses`, `jurisdictions`, `offices`, `statusPrimary`. */
398
550
  filters?: Record<string, unknown>;
399
551
  /** Restrict alert generation to specific trigger event types. */
400
552
  trigger_events?: WatchTriggerEvent[];
401
- /** Similarity score threshold (0..1). Only matches scoring at-or-above fire alerts. Valid for `watch_type: "similarity"`. */
553
+ /** Minimum attribution tier for similarity watches. `phonetic` is the broad "any tier" setting. */
554
+ min_match_tier?: WatchMinMatchTier;
555
+ /**
556
+ * NOT currently supported — sending this on create/update/bulk/preview is
557
+ * rejected with 400. Scores are informational (see `match_score` on alerts).
558
+ * The field is retained on the type so existing stored watch queries still
559
+ * deserialize on GET. Contact support for calibrated-band thresholds.
560
+ */
402
561
  score_threshold?: number;
403
562
  }
404
563
  /** Watch (retrieve / create / update response). */
@@ -413,6 +572,8 @@ export interface Watch {
413
572
  /** Last 24h alert count when retrieving a single watch; null on list responses. */
414
573
  alert_count_24h: number | null;
415
574
  last_alerted_at: string | null;
575
+ /** Customer passthrough label set on the watch; null if unset. */
576
+ customer_reference: string | null;
416
577
  metadata: Record<string, unknown>;
417
578
  created_at: string;
418
579
  updated_at: string;
@@ -420,42 +581,156 @@ export interface Watch {
420
581
  /**
421
582
  * Alert event types — what the API actually emits for `Alert.event_type`.
422
583
  *
423
- * In v1 this is identical to {@link WatchTriggerEvent}: watches can subscribe
424
- * to exactly these 3 events, and alerts only ever carry these 3 values.
425
- * (Earlier SDK revisions claimed watches accepted 5 trigger events — they
426
- * never did; the API rejects `trademark.retracted` / `trademark.corrected`
427
- * with 400.) The two types are kept separate so they can diverge in later
428
- * API versions without a breaking rename.
429
- *
430
- * R4.5 fix: previously this declared 5 values; SDK consumers switching on
431
- * `'trademark.retracted'` or `'trademark.corrected'` had dead `case` branches
432
- * that never fired.
584
+ * In v1 this is identical to {@link WatchTriggerEvent}: all 5 canonical values
585
+ * are accepted as `trigger_events`, and alerts may carry any of them. The
586
+ * DEFAULT trigger set (when `trigger_events` is omitted) is the original 3
587
+ * (`trademark.created`, `trademark.updated`, `trademark.status_changed`);
588
+ * `trademark.retracted` and `trademark.corrected` are OPT-IN and fire only for
589
+ * watches that explicitly subscribe to them — the evaluator derives + emits
590
+ * both. The two types are kept separate so they can diverge in later API
591
+ * versions without a breaking rename.
433
592
  */
434
- export type AlertEventType = 'trademark.created' | 'trademark.updated' | 'trademark.status_changed';
593
+ export type AlertEventType = 'trademark.created' | 'trademark.updated' | 'trademark.status_changed' | 'trademark.retracted' | 'trademark.corrected';
435
594
  /** Alert severity. */
436
595
  export type AlertSeverity = 'normal' | 'high' | 'critical';
437
596
  /** Opposition-window state for the matched mark, when applicable. */
438
597
  export type OppositionWindowStatus = 'open' | 'closing_soon' | 'critical' | 'closed';
439
- /** Alert (immutable — no PATCH/dismiss in monitoring v1). */
598
+ /**
599
+ * One entry in an alert's `event.diff`. Parent-field changes carry real
600
+ * `from`/`to` values; child-entity changes are opaque (`{ path, op:'changed' }`,
601
+ * `from`/`to` absent).
602
+ */
603
+ export interface AlertDiffEntry {
604
+ path: string;
605
+ op: 'set' | 'unset' | 'changed';
606
+ from?: unknown;
607
+ to?: unknown;
608
+ }
609
+ /**
610
+ * Match metadata — why/how the mark matched the watch. The whole block is
611
+ * `null` for pure-filter / pre-v2 alerts that carry no match scoring.
612
+ */
613
+ export interface AlertMatch {
614
+ /** Human-readable explanation of the match; null when not captured. */
615
+ reason: string | null;
616
+ /** Relevance score (e.g. OpenSearch); null when not applicable. */
617
+ score: number | null;
618
+ /** What the score is derived from, e.g. `opensearch_relevance`; null when none. */
619
+ score_basis: string | null;
620
+ }
621
+ /**
622
+ * Compact mark summary embedded on the alert (Alerts v2 `trademark` block).
623
+ * Mirrors the trademark SEARCH summary vocabulary. The summary fields degrade
624
+ * (absent) for pre-v2 alerts, where only `id`, `as_of`, and `links` are present.
625
+ */
626
+ export interface AlertTrademarkSnapshot {
627
+ /** Prefixed trademark ID (`tm_*`). */
628
+ id: string;
629
+ mark_text?: string | null;
630
+ mark_feature_type?: string | null;
631
+ office_code?: string;
632
+ status?: {
633
+ primary: string;
634
+ stage: string;
635
+ };
636
+ filing_date?: string | null;
637
+ registration_date?: string | null;
638
+ nice_classes?: number[];
639
+ owner_name?: string | null;
640
+ /** When the source change occurred (`source_occurred_at`); null on pre-v2 alerts. */
641
+ as_of: string | null;
642
+ links: {
643
+ self: string;
644
+ };
645
+ }
646
+ /**
647
+ * Alert (immutable — no PATCH/dismiss in monitoring v1).
648
+ *
649
+ * Alerts v2 nested shape — mirrors the REST `AlertResponse` (see
650
+ * `api/src/modules/alerts/routes.ts`). The webhook body for `alert.created`
651
+ * carries the same canonical object minus `request_id` / `evaluation_epoch`.
652
+ */
653
+ /**
654
+ * REST-only alert provenance block (ENG-170) — the alert's evidence chain.
655
+ * NOT part of the signed webhook contract (see {@link AlertCreatedPayload}).
656
+ */
657
+ export interface AlertProvenance {
658
+ /** Prefixed sync-run id (`srun_*`); omitted when the alert has no linked run. */
659
+ sync_run?: string;
660
+ /** The trademark_record version the alert froze at. */
661
+ content_version: number;
662
+ /**
663
+ * created_at minus occurred_at, in seconds. Null when occurred_at is null
664
+ * or in the future relative to created_at (unknown, never negative).
665
+ */
666
+ detection_latency_seconds: number | null;
667
+ /** True when detection latency exceeded the office's expected cadence. False whenever latency is unknown. */
668
+ late_detection: boolean;
669
+ }
440
670
  export interface Alert {
441
671
  id: string;
442
672
  object: 'alert';
443
- watch_id: string;
444
- watch_name: string;
445
- trademark_id: string;
446
- event_type: AlertEventType;
447
- /** Snapshot of trademark version at the moment of evaluation (immutable). */
448
- content_version: number;
449
- /** Computed customer-action deadline; null if no deadline applies. */
450
- must_act_by: string | null;
451
- /** Current opposition-window state for this mark; null when no window applies. */
452
- opposition_window_status: OppositionWindowStatus | null;
453
- severity: AlertSeverity;
454
- /** Optional compact mark summary (mark text, owner, office) included by some routes. */
455
- trademark_summary?: Record<string, unknown>;
456
- /** Optional human-readable explanation of why the mark matched the watch. */
457
- match_reason?: string;
458
- created_at: string;
673
+ /** Alerts v2 wire schema version, e.g. `'2026-06-01'`. */
674
+ schema_version: string;
675
+ watch: {
676
+ id: string;
677
+ name: string;
678
+ type: WatchType;
679
+ };
680
+ /** Customer passthrough set on the watch; null if unset. */
681
+ customer_reference: string | null;
682
+ event: {
683
+ type: AlertEventType;
684
+ /** Short human-readable description, e.g. `"Status primary changed: pending → registered"`. */
685
+ summary: string;
686
+ diff: AlertDiffEntry[];
687
+ /**
688
+ * Set to `true` when the diff was clipped to stay under the wire byte
689
+ * budget (entries dropped and/or long values replaced with `[truncated]`).
690
+ * Absent/undefined for normal, un-clipped alerts.
691
+ */
692
+ diff_truncated?: boolean;
693
+ };
694
+ /** Match metadata, or null for pure-filter / pre-v2 alerts. */
695
+ match: AlertMatch | null;
696
+ trademark: AlertTrademarkSnapshot;
697
+ deadline: {
698
+ severity: AlertSeverity;
699
+ /** Current opposition-window state for this mark; null when no window applies. */
700
+ opposition_window_status: OppositionWindowStatus | null;
701
+ /** Computed customer-action deadline; null if no deadline applies. */
702
+ must_act_by: string | null;
703
+ };
704
+ /**
705
+ * True when this alert was generated well after the underlying change
706
+ * occurred (e.g. the monitoring pipeline recovered from a stall and
707
+ * processed backlogged changes). Late alerts remain fully visible via the
708
+ * REST API (filter with `?detected_late=true|false`) but are EXCLUDED from
709
+ * webhook delivery by default.
710
+ */
711
+ detected_late: boolean;
712
+ timestamps: {
713
+ /** When the source change occurred; null on pre-v2 alerts. */
714
+ occurred_at: string | null;
715
+ /** When the underlying change was ingested; omitted when no change row is linked. */
716
+ ingested_at?: string;
717
+ created_at: string;
718
+ };
719
+ links: {
720
+ trademark: string;
721
+ watch: string;
722
+ };
723
+ /**
724
+ * REST-only: evaluation epoch the alert was emitted under (NOT part of the
725
+ * webhook contract). Lets clients distinguish prior-query-revision alerts
726
+ * when listing with `?epoch=all`.
727
+ */
728
+ evaluation_epoch: number;
729
+ /**
730
+ * REST-only: the alert's evidence chain (ENG-170). NOT part of the webhook
731
+ * contract; webhook consumers re-fetch the alert via the API to obtain it.
732
+ */
733
+ provenance: AlertProvenance;
459
734
  }
460
735
  /** Webhook event types delivered by the dispatcher. */
461
736
  export type WebhookEventType = 'alert.created' | 'webhook.test';
@@ -482,7 +757,12 @@ export interface WebhookEvent<T = unknown> {
482
757
  data: T;
483
758
  }
484
759
  /**
485
- * Inner payload of an `alert.created` webhook delivery.
760
+ * Preserved FLAT fields on an `alert.created` webhook delivery.
761
+ *
762
+ * These are the lean, backward-compatible top-level fields the dispatcher has
763
+ * always emitted. They are kept alongside the rich {@link Alert} object (see
764
+ * {@link AlertCreatedPayload}) so existing consumers that read flat fields
765
+ * never break.
486
766
  *
487
767
  * IDs are prefixed (Round 4 R4.5) — `alert_id`, `watch_id`, and
488
768
  * `trademark_record_id` feed straight into `GET /v1/alerts/{id}` etc.
@@ -492,7 +772,7 @@ export interface WebhookEvent<T = unknown> {
492
772
  * customer's webhook endpoint already implies the tenant, and
493
773
  * cross-referencing internal tenant UUIDs is not part of the public API.
494
774
  */
495
- export interface AlertCreatedPayload {
775
+ export interface AlertCreatedFlatFields {
496
776
  /** Prefixed alert ID, e.g. `alt_018f...`. */
497
777
  alert_id: string;
498
778
  /** Prefixed watch ID, e.g. `wat_018f...`. */
@@ -524,6 +804,30 @@ export interface AlertCreatedPayload {
524
804
  /** Hash of the source data payload that triggered the alert; null when not available. */
525
805
  source_data_hash: string | null;
526
806
  }
807
+ /**
808
+ * Inner payload of an `alert.created` webhook delivery.
809
+ *
810
+ * The dispatcher (`buildSelfContainedAlertData` in
811
+ * `workers/webhook-dispatcher/src/dispatcher.ts`) emits a SELF-CONTAINED body:
812
+ * the full rich {@link Alert} object (`watch`, `event`, `match`, `trademark`,
813
+ * `deadline`, `timestamps`, `schema_version`, `customer_reference`, `links`,
814
+ * `id`, `object`) SPREAD together with the preserved {@link AlertCreatedFlatFields}.
815
+ * Rich-first, flat-last, so the lean flat fields win on any future key overlap.
816
+ *
817
+ * The flat fields ({@link AlertCreatedFlatFields}) are ALWAYS present. The rich
818
+ * half mirrors the REST {@link Alert} resource MINUS `evaluation_epoch`
819
+ * (REST-only — the webhook carries the epoch as a flat field instead, see
820
+ * {@link AlertCreatedFlatFields.evaluation_epoch}), and is OPTIONAL: the rich
821
+ * fields (`event`, `trademark`, `match`, `watch`, `deadline`, `timestamps`,
822
+ * `schema_version`, `links`, `id`, `object`, `customer_reference`) are present
823
+ * on normal deliveries but ABSENT on the rare lean-fallback delivery — when the
824
+ * alert row was hard-deleted between emit and dispatch, hydration returns null
825
+ * and the dispatcher emits ONLY the flat fields.
826
+ *
827
+ * Consumers that read rich fields should feature-detect, e.g.
828
+ * `if (data.event) { … }`, rather than assume they are present.
829
+ */
830
+ export type AlertCreatedPayload = AlertCreatedFlatFields & Partial<Omit<Alert, 'evaluation_epoch' | 'provenance'>>;
527
831
  /** Webhook envelope for an `alert.created` delivery. */
528
832
  export type AlertCreatedEvent = WebhookEvent<AlertCreatedPayload>;
529
833
  /** Webhook endpoint status. */
@@ -618,6 +922,16 @@ export interface WatchPreviewResponse {
618
922
  * were found (partial result). Absent = exact count.
619
923
  */
620
924
  estimate_basis?: 'candidacy_upper_bound';
925
+ /**
926
+ * A page of the actual matching trademarks in the canonical summary shape
927
+ * (identical to `GET /v1/trademarks` results). Returned BY DEFAULT; omitted
928
+ * only when the request set `count_only: true`. Up to `result_limit` items.
929
+ */
930
+ results?: TrademarkSummary[];
931
+ /** Whether more matches exist beyond `results`. Omitted when count_only. */
932
+ has_more?: boolean;
933
+ /** Echo of the effective page size for `results`. Omitted when count_only. */
934
+ result_limit?: number;
621
935
  request_id: string;
622
936
  }
623
937
  /**
@@ -654,13 +968,24 @@ export interface WatchDiagnostics {
654
968
  candidacy_passed: boolean;
655
969
  trigger_event_type: string | null;
656
970
  trigger_event_in_filter: boolean;
971
+ /**
972
+ * Persisted per-match relevance score (`match_score` on the most recent
973
+ * alert for this watch+trademark); null when no alert exists or the watch
974
+ * has no scored (`q`) clause. Informational only.
975
+ */
657
976
  opensearch_score: number | null;
977
+ /**
978
+ * Stored (legacy) threshold, surfaced for existing watches that carry one.
979
+ * INERT — no longer gates matching, and rejected on new writes.
980
+ */
658
981
  score_threshold: number | null;
982
+ min_match_tier: WatchMinMatchTier | null;
659
983
  alert_fired: boolean;
660
984
  /**
661
985
  * Walked in order: alert fired → office not in scope → freshness limit →
662
- * candidacy missing → trigger event filtered → score below threshold →
663
- * rolled into digest → fallback. See the diagnostics docs for the full enum.
986
+ * candidacy missing → trigger event filtered → rolled into digest →
987
+ * fallback. (No score-threshold reason: the field is inert.) See the
988
+ * diagnostics docs for the full enum.
664
989
  */
665
990
  reason: string;
666
991
  delivery_mode_effective: 'per_alert' | 'digest' | null;
@@ -669,13 +994,15 @@ export interface WatchDiagnostics {
669
994
  /** Alert's frozen `evaluation_epoch` when emitted under a replay-bumped epoch; null otherwise. */
670
995
  replay_epoch_origin: number | null;
671
996
  last_relevant_sync_run: {
672
- id: string;
673
997
  office_code: string;
674
998
  completed_at: string | null;
675
999
  search_indexed_at: string | null;
676
1000
  } | null;
677
- /** `event_outbox` UUID — cross-reference against the `webhook-id` on delivery audit rows. */
678
- outbox_event_id: string | null;
1001
+ /**
1002
+ * Public ID (`alt_*`) of the alert that fired, or null. Cross-reference
1003
+ * against `alert_id` on `webhooks.listDeliveries()` rows.
1004
+ */
1005
+ alert_id: string | null;
679
1006
  opposition: {
680
1007
  must_act_by: string | null;
681
1008
  rule_source: string | null;
@@ -697,6 +1024,105 @@ export interface WatchDiagnosticsParams {
697
1024
  /** Required prefixed trademark ID (`tm_*`). */
698
1025
  trademarkId: string;
699
1026
  }
1027
+ /** A disclosed coverage gap on a per-office attestation entry. */
1028
+ export interface WatchAttestationGap {
1029
+ from: string;
1030
+ through: string;
1031
+ /**
1032
+ * `office_lagging` = coverage was stale beyond the office SLO for this
1033
+ * interval. `evaluation_failed` is reserved (not emitted in v1: gaps cover
1034
+ * coverage-staleness only).
1035
+ */
1036
+ reason: 'office_lagging' | 'evaluation_failed';
1037
+ /** True once coverage caught back up within the period. */
1038
+ resolved: boolean;
1039
+ }
1040
+ /**
1041
+ * Per-office attestation entry. `status: 'unsupported'` (an in-scope office
1042
+ * Signa does not ingest) carries NO evaluation claims — the numeric fields are
1043
+ * omitted entirely. `status: 'no_evaluations'` (a supported office with zero
1044
+ * evaluations in the period) carries zero counts, no coverage claims, and a
1045
+ * full-period gap — an un-evaluated month never reads as a clean silent month.
1046
+ */
1047
+ export interface WatchAttestationOffice {
1048
+ office_code: string;
1049
+ office_name: string;
1050
+ status: 'evaluated' | 'no_evaluations' | 'unsupported';
1051
+ evaluations_count?: number;
1052
+ sync_runs_evaluated?: string[];
1053
+ /**
1054
+ * Changes evaluated against your query this period (candidacy volume). NOT
1055
+ * the size of the whole office corpus.
1056
+ */
1057
+ changes_evaluated?: number;
1058
+ match_count?: number;
1059
+ alerts_emitted?: number;
1060
+ coverage_from?: string | null;
1061
+ coverage_through?: string | null;
1062
+ coverage_basis?: 'source_dates' | 'date_range' | 'run_completed' | null;
1063
+ gaps?: WatchAttestationGap[];
1064
+ }
1065
+ /**
1066
+ * The filable monthly proof-of-monitoring artifact. Deterministic for a closed
1067
+ * period: re-fetch and compare `content_hash` to verify integrity. The hash
1068
+ * excludes `generated_at`, `request_id`, `content_hash`,
1069
+ * `watch_status_at_generation`, `watch.name`, and
1070
+ * `watch.configuration_changed_since_period` (generation-time / display-only
1071
+ * facts).
1072
+ */
1073
+ export interface WatchAttestation {
1074
+ object: 'watch_attestation';
1075
+ schema_version: string;
1076
+ watch: {
1077
+ id: string;
1078
+ /** Display-only; excluded from `content_hash` (mutable via PATCH). */
1079
+ name: string;
1080
+ query_fingerprint: string;
1081
+ /**
1082
+ * The fingerprint describes the CURRENT watch configuration (a true
1083
+ * evaluated-time snapshot requires the deferred watch-revision history).
1084
+ */
1085
+ fingerprint_basis: 'current_configuration';
1086
+ trigger_events: string[];
1087
+ /** Evaluation-epoch deltas occurred WITHIN the period. */
1088
+ configuration_changed_in_period: boolean;
1089
+ /**
1090
+ * The live configuration is ahead of every epoch seen in the period (a
1091
+ * post-period change happened; the fingerprint no longer describes the
1092
+ * period). Generation-time fact; excluded from `content_hash`.
1093
+ */
1094
+ configuration_changed_since_period: boolean;
1095
+ epochs_in_period?: number[];
1096
+ };
1097
+ period: {
1098
+ start: string;
1099
+ end: string;
1100
+ partial: boolean;
1101
+ };
1102
+ offices: WatchAttestationOffice[];
1103
+ totals: {
1104
+ evaluations: number;
1105
+ alerts_emitted: number;
1106
+ };
1107
+ reconciliation: 'consistent' | 'mismatch';
1108
+ statement: string;
1109
+ slo_reference: string;
1110
+ /**
1111
+ * Present ('paused' | 'disabled') when the watch is not active at generation
1112
+ * time. Pause history within the period is not reconstructable in v1.
1113
+ * Generation-time fact; excluded from `content_hash`.
1114
+ */
1115
+ watch_status_at_generation?: string;
1116
+ generated_at: string;
1117
+ content_hash: string;
1118
+ request_id: string;
1119
+ }
1120
+ export interface WatchAttestationParams {
1121
+ /** UTC calendar month `YYYY-MM`. Default: previous month. */
1122
+ period?: string;
1123
+ /** Set true to allow an interim artifact for the current (open) month. */
1124
+ partial?: boolean;
1125
+ }
700
1126
  /** Result of `webhooks.test()`. */
701
1127
  export interface WebhookTestResponse {
702
1128
  object: 'webhook_test';
@@ -709,22 +1135,24 @@ export interface WebhookRedeliveryResponse {
709
1135
  delivery_attempt_id: string;
710
1136
  request_id: string;
711
1137
  }
712
- /** Org-level event list item. */
1138
+ /** Org-level event list item. IDs are evt_-prefixed opaque strings. */
713
1139
  export interface OrgEvent {
714
- id: number;
1140
+ id: string;
715
1141
  object: 'event';
716
- event_type: string;
1142
+ type: string;
717
1143
  trademark_id: string;
718
1144
  office_code: string;
719
1145
  created_at: string;
720
1146
  }
721
- /** Org-level event detail (with changes). */
1147
+ /** Org-level event detail (with field-level before/after diffs). */
722
1148
  export interface OrgEventDetail extends OrgEvent {
723
- changes: Array<{
724
- field: string;
1149
+ version: number;
1150
+ changed_fields: string[];
1151
+ changes: Record<string, {
725
1152
  before: unknown;
726
1153
  after: unknown;
727
1154
  }>;
1155
+ request_id: string;
728
1156
  }
729
1157
  /** Identity (GET /v1/organization/me). */
730
1158
  export type Identity = components['schemas']['Identity'];
@@ -750,6 +1178,12 @@ export type UsageSummaryResponse = components['schemas']['UsageSummaryResponse']
750
1178
  export type UsageSummaryItem = components['schemas']['UsageSummaryItem'];
751
1179
  /** Billing period context on a usage summary response. */
752
1180
  export type UsageBillingPeriod = components['schemas']['BillingPeriodContext'];
1181
+ /** Pooled credit balance response (GET /v1/organization/credits). */
1182
+ export type CreditBalance = components['schemas']['CreditBalanceResponse'];
1183
+ /** Remaining-credit breakdown by grant type on a credit balance response. */
1184
+ export type CreditGrantBreakdown = components['schemas']['CreditGrantBreakdown'];
1185
+ /** A single grant entry in the credit expiry schedule. */
1186
+ export type CreditExpiryScheduleEntry = components['schemas']['CreditExpiryScheduleEntry'];
753
1187
  /** Generic delete confirmation. */
754
1188
  export interface DeletedResponse {
755
1189
  id: string;
@@ -757,32 +1191,89 @@ export interface DeletedResponse {
757
1191
  deleted: true;
758
1192
  request_id: string;
759
1193
  }
760
- /** Trademark source provenance (from raw_record_version). */
761
- export type TrademarkSource = components['schemas']['TrademarkSourceResponse'];
762
- /** Trademark coverage (Madrid IR designation). */
763
- export type TrademarkCoverage = components['schemas']['TrademarkCoverage'];
764
1194
  /** Trademark proceeding (with parties) as returned by /trademarks/{id}/proceedings. */
765
1195
  export type TrademarkProceeding = components['schemas']['TrademarkProceedingSub'];
1196
+ /** Source synchronization state for lazy trademark document metadata. */
1197
+ export interface TrademarkDocumentSourceSync {
1198
+ status: 'synced' | 'pending' | 'unsupported';
1199
+ last_synced_at: string | null;
1200
+ }
1201
+ /** Trademark office document metadata returned by /trademarks/{id}/documents. */
1202
+ export interface TrademarkDocument {
1203
+ id: string;
1204
+ object: 'trademark_document';
1205
+ document_kind: 'office_action' | 'certificate' | 'correspondence' | 'filed_form' | 'other';
1206
+ official_date: string | null;
1207
+ description: string | null;
1208
+ mime_type: string;
1209
+ page_count: number | null;
1210
+ url: string;
1211
+ }
766
1212
  /** Owner related entity (GLEIF corporate hierarchy). */
767
1213
  export type OwnerRelated = components['schemas']['OwnerRelated'];
1214
+ /**
1215
+ * A `search_meta.warnings[]` element (mirror of the API spec). Two families
1216
+ * share this shape:
1217
+ * • strategy-skip warnings — a REQUESTED strategy produced zero clauses for
1218
+ * the query shape (e.g. `strategies=[phonetic]` on a query too short or
1219
+ * high-collision); carries `strategy`.
1220
+ * • filter-coverage warnings — an applied filter (e.g. `opposition_status`,
1221
+ * `seniority_claims`) has partial index coverage; carries `severity`,
1222
+ * `affected_filter`, `affected_offices`, `behavior`.
1223
+ */
1224
+ export interface SearchWarning {
1225
+ code: string;
1226
+ message: string;
1227
+ strategy?: string;
1228
+ severity?: 'info' | 'warning';
1229
+ affected_filter?: string;
1230
+ /** WIPO ST.3 office codes (e.g. 'US', 'EM', 'WO') affected by the caveat. */
1231
+ affected_offices?: string[];
1232
+ behavior?: string;
1233
+ }
768
1234
  /** Search metadata (V2 — timing, totals, strategy info). */
1235
+ /**
1236
+ * ENG-106 — how the query text is matched against the mark text.
1237
+ * `similar` (default) runs the ranked strategies ladder (relevance scoring).
1238
+ * `exact` | `starts_with` | `ends_with` | `contains` are deterministic
1239
+ * (date-led sort, `relevance_score` null on every row). Deterministic modes
1240
+ * require a query and disallow `strategies` / `ranking_profile`; `contains`
1241
+ * additionally needs a folded query of at least 3 characters.
1242
+ */
1243
+ export type MatchMode = 'similar' | 'exact' | 'starts_with' | 'ends_with' | 'contains';
769
1244
  export interface SearchMeta {
770
1245
  search_id: string;
771
- query: string;
1246
+ query: string | null;
1247
+ /** Public strategies used for the served set. Empty `[]` for deterministic match modes. */
772
1248
  strategies_used: string[];
773
1249
  /**
774
- * Total matching results. Only present when the caller set
775
- * `options.include_total = true` (or requested aggregations). Absent
776
- * on default searches so the API can skip OpenSearch hit counting
777
- * and return faster on broad queries. See api-spec-v1 §5.
1250
+ * ENG-106 — the match mode actually applied. Echoed for ALL modes (including
1251
+ * `'similar'`).
1252
+ */
1253
+ match: MatchMode;
1254
+ international_registrations: 'grouped' | 'expanded';
1255
+ fallback_reason?: string;
1256
+ /**
1257
+ * The `jurisdictions` matching mode actually applied: `'protection'` (default,
1258
+ * regional-membership expansion) or `'direct'` (literal territory legs).
1259
+ * Echoed on every response, including when no `jurisdictions` filter is present.
1260
+ */
1261
+ territory_match: TerritoryMatchMode;
1262
+ /**
1263
+ * Search warnings. Two families share this array: per-strategy skip warnings
1264
+ * (a REQUESTED strategy produced zero clauses for the query shape) and
1265
+ * filter-coverage warnings (an applied filter has partial index coverage).
1266
+ * Omitted when there is nothing to warn about.
778
1267
  */
779
- total_results?: number;
1268
+ warnings?: SearchWarning[];
780
1269
  /**
781
- * `true` if `total_results` is an exact count, `false` if it is a
782
- * lower bound (capped at 10k). Only present when `total_results` is
783
- * present.
1270
+ * NOTE: the total matching-result count is NOT on `search_meta`. It surfaces
1271
+ * as `pagination.total_count` (+ `pagination.total_count_approximate`) when
1272
+ * the caller sets `options.include_total = true` — see
1273
+ * `SignaList.total_count`. The former `search_meta.total_results` /
1274
+ * `total_count_exact` / `total_count_approximate` fields were removed in the
1275
+ * ENG-14 beta break.
784
1276
  */
785
- total_count_exact?: boolean;
786
1277
  execution_time_ms: number;
787
1278
  }
788
1279
  /** API error body (RFC 9457-inspired). */
@@ -803,17 +1294,43 @@ export interface APIErrorBody {
803
1294
  /** Server-suggested seconds to wait before retrying (body-level mirror of the Retry-After header). */
804
1295
  retry_after?: number;
805
1296
  }
1297
+ export type TrademarkSearchInclude = 'full_goods_services';
1298
+ export type TrademarkDetailInclude = 'office_extensions';
1299
+ /**
1300
+ * How a `jurisdictions` filter matches. `protection` (default) selects rights
1301
+ * that protect, or seek protection, in the requested territory: a country
1302
+ * request also matches regional rights whose membership covers it (a EUTM for
1303
+ * `jurisdictions: ['FR']`). `direct` matches only literal territory legs
1304
+ * (national filings + Madrid designations of the exact territory), reproducing
1305
+ * the pre-2026-07 behavior. Inert when no `jurisdictions` filter is present.
1306
+ */
1307
+ export type TerritoryMatchMode = 'protection' | 'direct';
1308
+ export type OppositionStatus = 'open' | 'not_started' | 'closed' | 'unknown';
1309
+ export type SeniorityClaims = 'claimed' | 'none' | 'unknown';
806
1310
  export interface TrademarkRetrieveParams {
807
1311
  /**
808
- * Optional relations to embed alongside the trademark detail.
1312
+ * Optional detail projections.
809
1313
  *
810
- * Currently only `history` is supported. Including `history` embeds the 50
811
- * most recent prosecution events with a `has_more` indicator. Owners,
812
- * classifications, attorneys, media, priorities, proceedings, and Madrid
813
- * coverage are always returned inline at the detail tier.
1314
+ * `office_extensions` includes the raw office-specific extension blob,
1315
+ * which is omitted from the default detail response.
1316
+ */
1317
+ include?: TrademarkDetailInclude[];
1318
+ /** Sparse top-level field projection. `id` and `object` are always retained. */
1319
+ fields?: string[];
1320
+ /**
1321
+ * Preferred goods/services language for classification rows. When multiple
1322
+ * language variants exist for the same Nice class, the API returns the
1323
+ * requested language if present; groups without that language keep all rows
1324
+ * in default classification order.
814
1325
  */
815
- include?: Array<'history'>;
1326
+ language?: string;
816
1327
  }
1328
+ /**
1329
+ * ENG-67 — the closed set of faceted aggregation dimensions accepted by both
1330
+ * `GET /v1/trademarks?aggregations=` and `POST /v1/trademarks` `options.aggregations`.
1331
+ * Mirrors the server-side `AggregationEnum` and the generated OpenAPI enum.
1332
+ */
1333
+ export type TrademarkAggregationName = 'status_stage' | 'office_code' | 'jurisdiction_code' | 'nice_classes' | 'filing_year' | 'mark_feature_type' | 'mark_legal_category' | 'filing_route' | 'right_kind' | 'scope_kind' | 'firm_id' | 'attorney_id' | 'owner_country' | 'owner_id' | 'entity_id';
817
1334
  export interface TrademarkListParams {
818
1335
  /**
819
1336
  * Coarse status bucket. Accepts a single value or an array to match any of
@@ -833,11 +1350,25 @@ export interface TrademarkListParams {
833
1350
  registration_number?: string;
834
1351
  ir_number?: string;
835
1352
  office?: string;
1353
+ /**
1354
+ * Jurisdiction codes selecting rights that protect, or seek protection, in
1355
+ * these territories. Protection-scope by default (a EUTM matches
1356
+ * `jurisdictions: ['FR']`); see `territory_match` to control expansion.
1357
+ */
836
1358
  jurisdictions?: string | string[];
1359
+ /** How `jurisdictions` matches: `protection` (default) or `direct`. */
1360
+ territory_match?: TerritoryMatchMode;
837
1361
  offices?: string | string[];
838
1362
  owner_country?: string;
839
1363
  nice_classes?: number | number[];
840
1364
  vienna_codes?: string | string[];
1365
+ us_design_codes?: string | string[];
1366
+ filing_basis?: string | string[];
1367
+ us_register_type?: 'principal' | 'supplemental';
1368
+ opposition_status?: OppositionStatus;
1369
+ opposition_closes_before?: string;
1370
+ opposition_closes_after?: string;
1371
+ seniority_claims?: SeniorityClaims;
841
1372
  filing_date_gte?: string;
842
1373
  filing_date_gt?: string;
843
1374
  filing_date_lte?: string;
@@ -858,6 +1389,22 @@ export interface TrademarkListParams {
858
1389
  publication_date_gt?: string;
859
1390
  publication_date_lte?: string;
860
1391
  publication_date_lt?: string;
1392
+ status_effective_date_gte?: string;
1393
+ status_effective_date_gt?: string;
1394
+ status_effective_date_lte?: string;
1395
+ status_effective_date_lt?: string;
1396
+ priority_date_gte?: string;
1397
+ priority_date_gt?: string;
1398
+ priority_date_lte?: string;
1399
+ priority_date_lt?: string;
1400
+ first_use_anywhere_date_gte?: string;
1401
+ first_use_anywhere_date_gt?: string;
1402
+ first_use_anywhere_date_lte?: string;
1403
+ first_use_anywhere_date_lt?: string;
1404
+ first_use_in_commerce_date_gte?: string;
1405
+ first_use_in_commerce_date_gt?: string;
1406
+ first_use_in_commerce_date_lte?: string;
1407
+ first_use_in_commerce_date_lt?: string;
861
1408
  termination_date_gte?: string;
862
1409
  termination_date_gt?: string;
863
1410
  termination_date_lte?: string;
@@ -892,18 +1439,36 @@ export interface TrademarkListParams {
892
1439
  is_madrid?: boolean;
893
1440
  is_retracted?: boolean;
894
1441
  is_series_mark?: boolean;
1442
+ international_registrations?: 'grouped' | 'expanded';
895
1443
  /** Optional text query (triggers relevance ranking when no explicit sort). */
896
1444
  q?: string;
1445
+ /** ENG-67 — faceted bucket counts (TMview "Statistics view"). Field names to aggregate. */
1446
+ aggregations?: TrademarkAggregationName[];
1447
+ /** ENG-67 — when true, return only aggregation counts (no result documents). */
1448
+ aggregations_only?: boolean;
897
1449
  /** Search strategies to apply (e.g. 'exact', 'phonetic', 'fuzzy', 'prefix'). */
898
1450
  strategies?: string[];
899
1451
  /** Ranking profile to use. */
900
1452
  ranking_profile?: string;
1453
+ /**
1454
+ * ENG-106 — how `q` matches the mark text. `'similar'` (default, ranked) vs
1455
+ * the deterministic `'exact'` / `'starts_with'` / `'ends_with'` / `'contains'`
1456
+ * modes. Deterministic modes require `q` and disallow `strategies` /
1457
+ * `ranking_profile`; `'contains'` needs a folded query ≥ 3 chars.
1458
+ */
1459
+ match?: MatchMode;
1460
+ /** ENG-106 — exclude marks whose text contains this substring (case/accent-insensitive). Composable with any match mode. */
1461
+ mark_text_not_contains?: string;
901
1462
  /** When true, include total_count in pagination (adds latency). */
902
1463
  include_total?: boolean;
903
1464
  /** When true, include match highlight spans. */
904
1465
  highlights?: boolean;
905
1466
  /** When true, include execution timing in search_meta. */
906
1467
  include_timing?: boolean;
1468
+ /** Optional row projections. `full_goods_services` disables summary G&S truncation. */
1469
+ include?: TrademarkSearchInclude[];
1470
+ /** Sparse top-level field projection. `id` and `object` are always retained. */
1471
+ fields?: string[];
907
1472
  goods_services_text?: string;
908
1473
  origin_office_code?: string;
909
1474
  renewal_due_before?: string;
@@ -917,7 +1482,7 @@ export interface TrademarkListParams {
917
1482
  limit?: number;
918
1483
  cursor?: string;
919
1484
  }
920
- export interface TrademarkHistoryParams {
1485
+ export interface TrademarkEventsParams {
921
1486
  event_type?: string;
922
1487
  event_scope?: string;
923
1488
  event_date_gte?: string;
@@ -925,33 +1490,34 @@ export interface TrademarkHistoryParams {
925
1490
  limit?: number;
926
1491
  cursor?: string;
927
1492
  }
928
- export interface TrademarkChangesParams {
929
- changed_field?: string;
930
- limit?: number;
931
- cursor?: string;
932
- }
933
- export interface TrademarkRelatedParams {
934
- relationship_type?: string;
935
- limit?: number;
936
- cursor?: string;
937
- }
938
1493
  export interface TrademarkSuggestParams {
939
1494
  q: string;
940
1495
  jurisdictions?: string | string[];
1496
+ /** How `jurisdictions` matches: `protection` (default) or `direct`. */
1497
+ territory_match?: TerritoryMatchMode;
941
1498
  nice_classes?: number | number[];
942
1499
  status_stage?: string | string[];
943
1500
  }
944
- export interface TrademarkCoverageParams {
945
- protection_status?: string;
946
- limit?: number;
947
- cursor?: string;
948
- }
949
1501
  export interface TrademarkProceedingsParams {
950
1502
  proceeding_type?: string;
951
1503
  status?: string;
952
1504
  limit?: number;
953
1505
  cursor?: string;
954
1506
  }
1507
+ export interface TrademarkAssignmentsParams {
1508
+ conveyance_type?: ConveyanceType;
1509
+ /** Alias for conveyance_type. */
1510
+ type?: ConveyanceType;
1511
+ limit?: number;
1512
+ cursor?: string;
1513
+ }
1514
+ export interface TrademarkDocumentParams {
1515
+ document_kind?: TrademarkDocument['document_kind'] | TrademarkDocument['document_kind'][];
1516
+ official_date_gte?: string;
1517
+ official_date_lt?: string;
1518
+ limit?: number;
1519
+ cursor?: string;
1520
+ }
955
1521
  export interface OwnerRelatedParams {
956
1522
  limit?: number;
957
1523
  cursor?: string;
@@ -961,11 +1527,9 @@ export interface OwnerRelatedParams {
961
1527
  * always returns the full detail tier (aliases, identifiers, stats, public
962
1528
  * companies). This empty params type is reserved for future use.
963
1529
  */
964
- export interface OwnerRetrieveParams {
965
- }
1530
+ export type OwnerRetrieveParams = Record<string, never>;
966
1531
  /** Entity detail accepts no query parameters (reserved for future use). */
967
- export interface EntityRetrieveParams {
968
- }
1532
+ export type EntityRetrieveParams = Record<string, never>;
969
1533
  export interface EntityListParams {
970
1534
  q?: string;
971
1535
  country_code?: string;
@@ -983,10 +1547,14 @@ export interface EntityListParams {
983
1547
  * Trademark filters for `GET /v1/entities/{id}/trademarks` — the same
984
1548
  * Appendix-A filter set as the owner/attorney sub-resources (it runs through
985
1549
  * the same `listTrademarksViaSearch` path), fanned out across ALL member owners.
1550
+ *
1551
+ * `include_family` (ENG-117) additionally expands the set to this entity AND all
1552
+ * of its family-tree descendants (via `entities.parent_entity_id`).
986
1553
  */
987
- export type EntityTrademarksParams = OwnerTrademarksParams;
988
- export interface EntityFamilyParams {
989
- }
1554
+ export type EntityTrademarksParams = OwnerTrademarksParams & {
1555
+ include_family?: boolean;
1556
+ };
1557
+ export type EntityFamilyParams = Record<string, never>;
990
1558
  export interface OwnerListParams {
991
1559
  q?: string;
992
1560
  country_code?: string;
@@ -995,7 +1563,11 @@ export interface OwnerListParams {
995
1563
  lei?: string;
996
1564
  publicly_traded?: boolean;
997
1565
  has_lei?: boolean;
998
- sort?: '-trademark_count' | 'trademark_count' | '-registration_rate' | 'registration_rate' | '-latest_filing' | 'latest_filing' | '-name' | 'name';
1566
+ sort?: '-trademark_count' | 'trademark_count'
1567
+ /** @deprecated Use `grant_rate` — same value. */
1568
+ | '-registration_rate'
1569
+ /** @deprecated Use `grant_rate` — same value. */
1570
+ | 'registration_rate' | '-grant_rate' | 'grant_rate' | '-latest_filing' | 'latest_filing' | '-name' | 'name';
999
1571
  include_total?: boolean;
1000
1572
  limit?: number;
1001
1573
  cursor?: string;
@@ -1019,11 +1591,25 @@ export interface OwnerTrademarksParams {
1019
1591
  registration_number?: string;
1020
1592
  ir_number?: string;
1021
1593
  office?: string;
1594
+ /**
1595
+ * Jurisdiction codes selecting rights that protect, or seek protection, in
1596
+ * these territories. Protection-scope by default (a EUTM matches
1597
+ * `jurisdictions: ['FR']`); see `territory_match` to control expansion.
1598
+ */
1022
1599
  jurisdictions?: string | string[];
1600
+ /** How `jurisdictions` matches: `protection` (default) or `direct`. */
1601
+ territory_match?: TerritoryMatchMode;
1023
1602
  offices?: string | string[];
1024
1603
  owner_country?: string;
1025
1604
  nice_classes?: number | number[];
1026
1605
  vienna_codes?: string | string[];
1606
+ us_design_codes?: string | string[];
1607
+ filing_basis?: string | string[];
1608
+ us_register_type?: 'principal' | 'supplemental';
1609
+ opposition_status?: OppositionStatus;
1610
+ opposition_closes_before?: string;
1611
+ opposition_closes_after?: string;
1612
+ seniority_claims?: SeniorityClaims;
1027
1613
  filing_date_gte?: string;
1028
1614
  filing_date_gt?: string;
1029
1615
  filing_date_lte?: string;
@@ -1044,6 +1630,22 @@ export interface OwnerTrademarksParams {
1044
1630
  publication_date_gt?: string;
1045
1631
  publication_date_lte?: string;
1046
1632
  publication_date_lt?: string;
1633
+ status_effective_date_gte?: string;
1634
+ status_effective_date_gt?: string;
1635
+ status_effective_date_lte?: string;
1636
+ status_effective_date_lt?: string;
1637
+ priority_date_gte?: string;
1638
+ priority_date_gt?: string;
1639
+ priority_date_lte?: string;
1640
+ priority_date_lt?: string;
1641
+ first_use_anywhere_date_gte?: string;
1642
+ first_use_anywhere_date_gt?: string;
1643
+ first_use_anywhere_date_lte?: string;
1644
+ first_use_anywhere_date_lt?: string;
1645
+ first_use_in_commerce_date_gte?: string;
1646
+ first_use_in_commerce_date_gt?: string;
1647
+ first_use_in_commerce_date_lte?: string;
1648
+ first_use_in_commerce_date_lt?: string;
1047
1649
  termination_date_gte?: string;
1048
1650
  termination_date_gt?: string;
1049
1651
  termination_date_lte?: string;
@@ -1064,6 +1666,20 @@ export interface OwnerTrademarksParams {
1064
1666
  is_madrid?: boolean;
1065
1667
  is_retracted?: boolean;
1066
1668
  is_series_mark?: boolean;
1669
+ international_registrations?: 'grouped' | 'expanded';
1670
+ include_total?: boolean;
1671
+ include?: TrademarkSearchInclude[];
1672
+ fields?: string[];
1673
+ /** Text query to match against the mark text within this portfolio. Required for any deterministic `match` mode. */
1674
+ q?: string;
1675
+ /**
1676
+ * ENG-106 — how `q` matches the mark text. `'similar'` (default, ranked) vs
1677
+ * the deterministic `'exact'` / `'starts_with'` / `'ends_with'` / `'contains'`
1678
+ * modes. Deterministic modes require `q`; `'contains'` needs a folded query ≥ 3 chars.
1679
+ */
1680
+ match?: MatchMode;
1681
+ /** ENG-106 — exclude marks whose text contains this substring (case/accent-insensitive). Composable with any match mode. */
1682
+ mark_text_not_contains?: string;
1067
1683
  limit?: number;
1068
1684
  cursor?: string;
1069
1685
  }
@@ -1072,13 +1688,16 @@ export interface OwnerTrademarksParams {
1072
1688
  * always returns the full detail tier (aliases, identifiers, scalar stats).
1073
1689
  * This empty params type is reserved for future use.
1074
1690
  */
1075
- export interface AttorneyRetrieveParams {
1076
- }
1691
+ export type AttorneyRetrieveParams = Record<string, never>;
1077
1692
  export interface AttorneyListParams {
1078
1693
  q?: string;
1079
1694
  firm_id?: string;
1080
1695
  country_code?: string;
1081
- sort?: '-trademark_count' | 'trademark_count' | '-name' | 'name';
1696
+ sort?: '-trademark_count' | 'trademark_count'
1697
+ /** @deprecated Use `grant_rate` — same value. */
1698
+ | '-registration_rate'
1699
+ /** @deprecated Use `grant_rate` — same value. */
1700
+ | 'registration_rate' | '-grant_rate' | 'grant_rate' | '-avg_prosecution_days' | 'avg_prosecution_days' | '-latest_filing' | 'latest_filing' | '-name' | 'name';
1082
1701
  limit?: number;
1083
1702
  cursor?: string;
1084
1703
  }
@@ -1101,11 +1720,25 @@ export interface AttorneyTrademarksParams {
1101
1720
  registration_number?: string;
1102
1721
  ir_number?: string;
1103
1722
  office?: string;
1723
+ /**
1724
+ * Jurisdiction codes selecting rights that protect, or seek protection, in
1725
+ * these territories. Protection-scope by default (a EUTM matches
1726
+ * `jurisdictions: ['FR']`); see `territory_match` to control expansion.
1727
+ */
1104
1728
  jurisdictions?: string | string[];
1729
+ /** How `jurisdictions` matches: `protection` (default) or `direct`. */
1730
+ territory_match?: TerritoryMatchMode;
1105
1731
  offices?: string | string[];
1106
1732
  owner_country?: string;
1107
1733
  nice_classes?: number | number[];
1108
1734
  vienna_codes?: string | string[];
1735
+ us_design_codes?: string | string[];
1736
+ filing_basis?: string | string[];
1737
+ us_register_type?: 'principal' | 'supplemental';
1738
+ opposition_status?: OppositionStatus;
1739
+ opposition_closes_before?: string;
1740
+ opposition_closes_after?: string;
1741
+ seniority_claims?: SeniorityClaims;
1109
1742
  filing_date_gte?: string;
1110
1743
  filing_date_gt?: string;
1111
1744
  filing_date_lte?: string;
@@ -1126,6 +1759,22 @@ export interface AttorneyTrademarksParams {
1126
1759
  publication_date_gt?: string;
1127
1760
  publication_date_lte?: string;
1128
1761
  publication_date_lt?: string;
1762
+ status_effective_date_gte?: string;
1763
+ status_effective_date_gt?: string;
1764
+ status_effective_date_lte?: string;
1765
+ status_effective_date_lt?: string;
1766
+ priority_date_gte?: string;
1767
+ priority_date_gt?: string;
1768
+ priority_date_lte?: string;
1769
+ priority_date_lt?: string;
1770
+ first_use_anywhere_date_gte?: string;
1771
+ first_use_anywhere_date_gt?: string;
1772
+ first_use_anywhere_date_lte?: string;
1773
+ first_use_anywhere_date_lt?: string;
1774
+ first_use_in_commerce_date_gte?: string;
1775
+ first_use_in_commerce_date_gt?: string;
1776
+ first_use_in_commerce_date_lte?: string;
1777
+ first_use_in_commerce_date_lt?: string;
1129
1778
  termination_date_gte?: string;
1130
1779
  termination_date_gt?: string;
1131
1780
  termination_date_lte?: string;
@@ -1146,6 +1795,20 @@ export interface AttorneyTrademarksParams {
1146
1795
  is_madrid?: boolean;
1147
1796
  is_retracted?: boolean;
1148
1797
  is_series_mark?: boolean;
1798
+ international_registrations?: 'grouped' | 'expanded';
1799
+ include_total?: boolean;
1800
+ include?: TrademarkSearchInclude[];
1801
+ fields?: string[];
1802
+ /** Text query to match against the mark text within this portfolio. Required for any deterministic `match` mode. */
1803
+ q?: string;
1804
+ /**
1805
+ * ENG-106 — how `q` matches the mark text. `'similar'` (default, ranked) vs
1806
+ * the deterministic `'exact'` / `'starts_with'` / `'ends_with'` / `'contains'`
1807
+ * modes. Deterministic modes require `q`; `'contains'` needs a folded query ≥ 3 chars.
1808
+ */
1809
+ match?: MatchMode;
1810
+ /** ENG-106 — exclude marks whose text contains this substring (case/accent-insensitive). Composable with any match mode. */
1811
+ mark_text_not_contains?: string;
1149
1812
  limit?: number;
1150
1813
  cursor?: string;
1151
1814
  }
@@ -1154,14 +1817,18 @@ export interface AttorneyClientsParams {
1154
1817
  cursor?: string;
1155
1818
  }
1156
1819
  export interface FirmRetrieveParams {
1157
- include?: Array<'stats' | 'specializations' | 'jurisdictions' | 'trend' | 'attorneys'>;
1820
+ include?: Array<'attorneys'>;
1158
1821
  }
1159
1822
  export interface FirmListParams {
1160
1823
  q?: string;
1161
1824
  country_code?: string;
1162
1825
  min_attorneys?: number;
1163
1826
  min_filings?: number;
1164
- sort?: '-trademark_count' | 'trademark_count' | '-attorney_count' | 'attorney_count' | '-registration_rate' | 'registration_rate' | '-name' | 'name';
1827
+ sort?: '-trademark_count' | 'trademark_count' | '-attorney_count' | 'attorney_count'
1828
+ /** @deprecated Use `grant_rate` — same value. */
1829
+ | '-registration_rate'
1830
+ /** @deprecated Use `grant_rate` — same value. */
1831
+ | 'registration_rate' | '-grant_rate' | 'grant_rate' | '-name' | 'name';
1165
1832
  limit?: number;
1166
1833
  cursor?: string;
1167
1834
  }
@@ -1188,11 +1855,25 @@ export interface FirmTrademarksParams {
1188
1855
  registration_number?: string;
1189
1856
  ir_number?: string;
1190
1857
  office?: string;
1858
+ /**
1859
+ * Jurisdiction codes selecting rights that protect, or seek protection, in
1860
+ * these territories. Protection-scope by default (a EUTM matches
1861
+ * `jurisdictions: ['FR']`); see `territory_match` to control expansion.
1862
+ */
1191
1863
  jurisdictions?: string | string[];
1864
+ /** How `jurisdictions` matches: `protection` (default) or `direct`. */
1865
+ territory_match?: TerritoryMatchMode;
1192
1866
  offices?: string | string[];
1193
1867
  owner_country?: string;
1194
1868
  nice_classes?: number | number[];
1195
1869
  vienna_codes?: string | string[];
1870
+ us_design_codes?: string | string[];
1871
+ filing_basis?: string | string[];
1872
+ us_register_type?: 'principal' | 'supplemental';
1873
+ opposition_status?: OppositionStatus;
1874
+ opposition_closes_before?: string;
1875
+ opposition_closes_after?: string;
1876
+ seniority_claims?: SeniorityClaims;
1196
1877
  filing_date_gte?: string;
1197
1878
  filing_date_gt?: string;
1198
1879
  filing_date_lte?: string;
@@ -1213,6 +1894,22 @@ export interface FirmTrademarksParams {
1213
1894
  publication_date_gt?: string;
1214
1895
  publication_date_lte?: string;
1215
1896
  publication_date_lt?: string;
1897
+ status_effective_date_gte?: string;
1898
+ status_effective_date_gt?: string;
1899
+ status_effective_date_lte?: string;
1900
+ status_effective_date_lt?: string;
1901
+ priority_date_gte?: string;
1902
+ priority_date_gt?: string;
1903
+ priority_date_lte?: string;
1904
+ priority_date_lt?: string;
1905
+ first_use_anywhere_date_gte?: string;
1906
+ first_use_anywhere_date_gt?: string;
1907
+ first_use_anywhere_date_lte?: string;
1908
+ first_use_anywhere_date_lt?: string;
1909
+ first_use_in_commerce_date_gte?: string;
1910
+ first_use_in_commerce_date_gt?: string;
1911
+ first_use_in_commerce_date_lte?: string;
1912
+ first_use_in_commerce_date_lt?: string;
1216
1913
  termination_date_gte?: string;
1217
1914
  termination_date_gt?: string;
1218
1915
  termination_date_lte?: string;
@@ -1233,15 +1930,33 @@ export interface FirmTrademarksParams {
1233
1930
  is_madrid?: boolean;
1234
1931
  is_retracted?: boolean;
1235
1932
  is_series_mark?: boolean;
1933
+ international_registrations?: 'grouped' | 'expanded';
1934
+ include_total?: boolean;
1935
+ include?: TrademarkSearchInclude[];
1936
+ fields?: string[];
1937
+ /** Text query to match against the mark text within this portfolio. Required for any deterministic `match` mode. */
1938
+ q?: string;
1939
+ /**
1940
+ * ENG-106 — how `q` matches the mark text. `'similar'` (default, ranked) vs
1941
+ * the deterministic `'exact'` / `'starts_with'` / `'ends_with'` / `'contains'`
1942
+ * modes. Deterministic modes require `q`; `'contains'` needs a folded query ≥ 3 chars.
1943
+ */
1944
+ match?: MatchMode;
1945
+ /** ENG-106 — exclude marks whose text contains this substring (case/accent-insensitive). Composable with any match mode. */
1946
+ mark_text_not_contains?: string;
1236
1947
  limit?: number;
1237
1948
  cursor?: string;
1238
1949
  }
1950
+ export type ProceedingAggregation = 'outcome' | 'party_role' | 'nice_class' | 'office_code' | 'filed_year';
1239
1951
  export interface ProceedingListParams {
1240
1952
  trademark_id?: string;
1241
1953
  proceeding_type?: string;
1242
1954
  status?: string;
1243
1955
  q?: string;
1244
1956
  party_owner_id?: string;
1957
+ party_entity_id?: string;
1958
+ /** Alias for party_entity_id. */
1959
+ entity_id?: string;
1245
1960
  party_role?: 'opponent' | 'petitioner' | 'respondent' | 'intervener' | 'other';
1246
1961
  contested_class?: number;
1247
1962
  office_code?: string;
@@ -1249,10 +1964,26 @@ export interface ProceedingListParams {
1249
1964
  filed_date_lt?: string;
1250
1965
  decision_date_gte?: string;
1251
1966
  decision_date_lt?: string;
1967
+ aggregations?: ProceedingAggregation[];
1252
1968
  sort?: '-filed_date' | 'filed_date' | '-decided_date' | 'decided_date';
1253
1969
  limit?: number;
1254
1970
  cursor?: string;
1255
1971
  }
1972
+ export type ConveyanceType = 'assignment' | 'security_interest' | 'release' | 'merger' | 'name_change' | 'license' | 'partial_assignment' | 'correction' | 'entity_conversion' | 'other';
1973
+ export interface AssignmentListParams {
1974
+ owner_id?: string;
1975
+ entity_id?: string;
1976
+ trademark_id?: string;
1977
+ conveyance_type?: ConveyanceType | ConveyanceType[];
1978
+ /** Alias for conveyance_type. */
1979
+ type?: ConveyanceType | ConveyanceType[];
1980
+ recorded_date_gte?: string;
1981
+ recorded_date_lt?: string;
1982
+ role?: 'assignor' | 'assignee';
1983
+ sort?: '-recorded_date' | 'recorded_date';
1984
+ limit?: number;
1985
+ cursor?: string;
1986
+ }
1256
1987
  export interface ClassificationListParams {
1257
1988
  q?: string;
1258
1989
  }
@@ -1279,6 +2010,110 @@ export interface DateRangeFilter {
1279
2010
  lte?: string;
1280
2011
  lt?: string;
1281
2012
  }
2013
+ /** Normalized crop box (fractions of width/height, each in [0,1]). */
2014
+ export interface ImageSearchCrop {
2015
+ x: number;
2016
+ y: number;
2017
+ w: number;
2018
+ h: number;
2019
+ }
2020
+ /** Efficient-filtered facets for image search. */
2021
+ export interface ImageSearchFilters {
2022
+ offices?: string[];
2023
+ jurisdictions?: string[];
2024
+ statuses?: string[];
2025
+ include?: 'live' | 'all';
2026
+ nice_classes?: number[];
2027
+ feature_types?: string[];
2028
+ vienna_codes?: string[];
2029
+ design_code_keys?: string[];
2030
+ }
2031
+ export type ImageSearchChannel = 'visual' | 'logo_text' | 'exact_dup' | 'vienna_overlap';
2032
+ /**
2033
+ * Image-search request. Provide EXACTLY ONE image source: raw `image` bytes
2034
+ * (multipart upload), an `image_url` (https), or a `media_id`.
2035
+ */
2036
+ export interface TrademarkImageSearchParams {
2037
+ /** Query image bytes for a multipart upload. */
2038
+ image?: Blob | ArrayBuffer | Uint8Array;
2039
+ /** Optional filename for the uploaded part. */
2040
+ image_filename?: string;
2041
+ /** https URL of the query image (SSRF-guarded server-side). */
2042
+ image_url?: string;
2043
+ /** Existing media id (med_…) — reuse its stored vector, no re-embed. */
2044
+ media_id?: string;
2045
+ filters?: ImageSearchFilters;
2046
+ /**
2047
+ * How `filters.jurisdictions` matches: `protection` (default) or `direct`.
2048
+ * Top-level field, not nested inside `filters`.
2049
+ */
2050
+ territory_match?: TerritoryMatchMode;
2051
+ crop?: ImageSearchCrop;
2052
+ /** Bounded top-K page size (1-100, default 20). */
2053
+ limit?: number;
2054
+ /** Signal channels (default: visual, logo_text, exact_dup). */
2055
+ channels?: ImageSearchChannel[];
2056
+ }
2057
+ export interface ImageSearchSignals {
2058
+ visual: {
2059
+ score: number;
2060
+ band: 'identical' | 'strong' | 'moderate' | 'weak';
2061
+ embedding_spec: string;
2062
+ };
2063
+ logo_text: {
2064
+ query_text: string;
2065
+ matched_clause: string;
2066
+ } | null;
2067
+ exact_dup: {
2068
+ checksum_match: boolean;
2069
+ phash_distance: number | null;
2070
+ } | null;
2071
+ vienna_overlap: {
2072
+ codes: string[];
2073
+ } | null;
2074
+ }
2075
+ export interface ImageSearchHit {
2076
+ object: 'image_search_hit';
2077
+ score: number;
2078
+ band: 'identical' | 'strong' | 'moderate' | 'weak';
2079
+ signals: ImageSearchSignals;
2080
+ matched_image: {
2081
+ image_id: string;
2082
+ checksum: string;
2083
+ office: string;
2084
+ jurisdiction: string;
2085
+ thumbnail_url: string | null;
2086
+ };
2087
+ thumbnail_url: string | null;
2088
+ trademark: TrademarkSummary;
2089
+ }
2090
+ export interface ImageSearchResults {
2091
+ object: 'list';
2092
+ data: ImageSearchHit[];
2093
+ has_more: boolean;
2094
+ /**
2095
+ * ENG-19 — the returned-hit count rides `pagination.total_count`
2096
+ * (`total_count_approximate` is always `false`: image search is bounded
2097
+ * top-K, the count is exact). Both are ALWAYS emitted by this endpoint.
2098
+ * The former `search_meta.total_results` was removed in the ENG-14 beta
2099
+ * break.
2100
+ */
2101
+ pagination: {
2102
+ cursor: string | null;
2103
+ total_count: number;
2104
+ total_count_approximate: false;
2105
+ };
2106
+ search_meta: {
2107
+ search_id: string;
2108
+ query_mode: 'upload' | 'image_url' | 'media_id';
2109
+ channels: ImageSearchChannel[];
2110
+ embedding_spec: string;
2111
+ retrieval_bundle: string;
2112
+ index_version: number;
2113
+ execution_time_ms: number;
2114
+ };
2115
+ request_id?: string;
2116
+ }
1282
2117
  export interface TrademarkSearchBody {
1283
2118
  /** Optional text query. When omitted, results are filter-only. */
1284
2119
  query?: string;
@@ -1286,6 +2121,15 @@ export interface TrademarkSearchBody {
1286
2121
  strategies?: ('exact' | 'phonetic' | 'fuzzy' | 'prefix')[];
1287
2122
  /** Ranking profile to use. */
1288
2123
  ranking_profile?: string;
2124
+ /**
2125
+ * ENG-106 — how `query` matches the mark text. `'similar'` (default, ranked)
2126
+ * vs the deterministic `'exact'` / `'starts_with'` / `'ends_with'` /
2127
+ * `'contains'` modes. Deterministic modes require `query` and disallow
2128
+ * `strategies` / `ranking_profile`; `'contains'` needs a folded query ≥ 3 chars.
2129
+ */
2130
+ match?: MatchMode;
2131
+ /** ENG-106 — exclude marks whose text contains this substring (case/accent-insensitive). Composable with any match mode. */
2132
+ mark_text_not_contains?: string;
1289
2133
  filters?: {
1290
2134
  /**
1291
2135
  * Coarse status bucket. Accepts a single value or an array to match any
@@ -1306,12 +2150,23 @@ export interface TrademarkSearchBody {
1306
2150
  owner_country?: string;
1307
2151
  nice_classes?: number[];
1308
2152
  vienna_codes?: string[];
2153
+ us_design_codes?: string[];
2154
+ filing_basis?: string[];
2155
+ us_register_type?: 'principal' | 'supplemental';
2156
+ opposition_status?: OppositionStatus;
2157
+ opposition_closes_before?: string;
2158
+ opposition_closes_after?: string;
2159
+ seniority_claims?: SeniorityClaims;
1309
2160
  goods_services_text?: string;
1310
2161
  filing_date?: DateRangeFilter;
1311
2162
  registration_date?: DateRangeFilter;
1312
2163
  expiry_date?: DateRangeFilter;
1313
2164
  renewal_due_date?: DateRangeFilter;
1314
2165
  publication_date?: DateRangeFilter;
2166
+ status_effective_date?: DateRangeFilter;
2167
+ priority_date?: DateRangeFilter;
2168
+ first_use_anywhere_date?: DateRangeFilter;
2169
+ first_use_in_commerce_date?: DateRangeFilter;
1315
2170
  termination_date?: DateRangeFilter;
1316
2171
  updated_at?: DateRangeFilter;
1317
2172
  owner_id?: string;
@@ -1334,7 +2189,7 @@ export interface TrademarkSearchBody {
1334
2189
  is_series_mark?: boolean;
1335
2190
  };
1336
2191
  options?: {
1337
- aggregations?: ('status_stage' | 'office_code' | 'jurisdiction_code' | 'nice_classes' | 'filing_year' | 'mark_feature_type' | 'mark_legal_category' | 'filing_route' | 'right_kind' | 'scope_kind')[];
2192
+ aggregations?: TrademarkAggregationName[];
1338
2193
  aggregations_only?: boolean;
1339
2194
  include_total?: boolean;
1340
2195
  highlights?: boolean;
@@ -1349,6 +2204,14 @@ export interface TrademarkSearchBody {
1349
2204
  sort?: string;
1350
2205
  limit?: number;
1351
2206
  cursor?: string;
2207
+ international_registrations?: 'grouped' | 'expanded';
2208
+ /**
2209
+ * How `filters.jurisdictions` matches: `protection` (default) or `direct`.
2210
+ * Top-level field, NOT nested inside `filters`.
2211
+ */
2212
+ territory_match?: TerritoryMatchMode;
2213
+ include?: TrademarkSearchInclude[];
2214
+ fields?: string[];
1352
2215
  }
1353
2216
  /**
1354
2217
  * @deprecated Use `TrademarkSearchBody` instead. The `/v1/trademarks/search`
@@ -1447,6 +2310,59 @@ export interface SavedSearchExecuteParams {
1447
2310
  limit?: number;
1448
2311
  cursor?: string;
1449
2312
  }
2313
+ /** Feedback type discriminator. */
2314
+ export type FeedbackType = 'data_issue' | 'bug' | 'feature_request' | 'other';
2315
+ /** Feedback lifecycle status. */
2316
+ export type FeedbackStatus = 'open' | 'acknowledged' | 'resolved';
2317
+ /** A submitted feedback item. */
2318
+ export interface Feedback {
2319
+ id: string;
2320
+ object: 'feedback';
2321
+ /** Public ID (key_…) of the API key that filed this report; null if unattributed. */
2322
+ api_key_id: string | null;
2323
+ type: FeedbackType;
2324
+ status: FeedbackStatus;
2325
+ message: string;
2326
+ /** Public ID of the referenced entity, if any (tm_/own_/…). */
2327
+ resource_id: string | null;
2328
+ /** The request_id the customer referenced, echoed verbatim. */
2329
+ request_ref: string | null;
2330
+ field: string | null;
2331
+ expected_value: string | null;
2332
+ context: Record<string, unknown>;
2333
+ resolution_note: string | null;
2334
+ metadata: Record<string, string>;
2335
+ created_at: string;
2336
+ updated_at: string;
2337
+ resolved_at: string | null;
2338
+ }
2339
+ /** Body for `feedback.create(...)`. */
2340
+ export interface FeedbackCreateParams {
2341
+ type: FeedbackType;
2342
+ message: string;
2343
+ /** Optional public ID of any referenced entity (tm_/own_/att_/firm_/prc_/…). */
2344
+ resource_id?: string;
2345
+ /** Optional request_id (req_…) where the problem was observed. */
2346
+ request_id?: string;
2347
+ /** For data issues: which field is wrong. */
2348
+ field?: string;
2349
+ /** For data issues: the expected value. */
2350
+ expected_value?: string;
2351
+ metadata?: Record<string, string>;
2352
+ }
2353
+ /** Query params for `feedback.list(...)`. All filters optional and combinable. */
2354
+ export interface FeedbackListParams {
2355
+ /** Filter by type(s). */
2356
+ type?: FeedbackType | FeedbackType[];
2357
+ /** Filter by status(es). */
2358
+ status?: FeedbackStatus | FeedbackStatus[];
2359
+ /** Return feedback created at or after this time (YYYY-MM-DD or ISO 8601). */
2360
+ created_at_gte?: string;
2361
+ /** Return feedback created strictly before this time (YYYY-MM-DD or ISO 8601). */
2362
+ created_at_lt?: string;
2363
+ cursor?: string;
2364
+ limit?: number;
2365
+ }
1450
2366
  /**
1451
2367
  * Body for `watches.create(...)`.
1452
2368
  *
@@ -1465,6 +2381,11 @@ export interface WatchCreateParams {
1465
2381
  * {@link WatchDeliveryMode} union for forward compatibility.
1466
2382
  */
1467
2383
  delivery_mode?: 'always_per_alert';
2384
+ /**
2385
+ * Customer passthrough label echoed back on the watch and on every alert it
2386
+ * fires. Max 200 chars on create; pass `null` to clear.
2387
+ */
2388
+ customer_reference?: string | null;
1468
2389
  metadata?: Record<string, unknown>;
1469
2390
  }
1470
2391
  /**
@@ -1486,6 +2407,11 @@ export interface WatchUpdateParams {
1486
2407
  delivery_mode?: 'always_per_alert';
1487
2408
  /** PATCH supports active/paused only — use `pause()` / `resume()` for clarity. */
1488
2409
  status?: 'active' | 'paused';
2410
+ /**
2411
+ * Customer passthrough label echoed back on the watch and on every alert it
2412
+ * fires. Max 200 chars on create; pass `null` to clear.
2413
+ */
2414
+ customer_reference?: string | null;
1489
2415
  metadata?: Record<string, unknown>;
1490
2416
  }
1491
2417
  export interface WatchListParams {
@@ -1508,6 +2434,14 @@ export interface WatchPreviewParams {
1508
2434
  query: WatchQuery | Record<string, unknown>;
1509
2435
  /** Trial window for the dry-run match count (1..365 days). Default 7. */
1510
2436
  trial_window_days?: number;
2437
+ /**
2438
+ * Skip hydrating the matching marks and return only `estimated_match_count`.
2439
+ * The cheap path for high-frequency "how many would this catch" calls.
2440
+ * Default false — `results` are returned by default.
2441
+ */
2442
+ count_only?: boolean;
2443
+ /** Page size for `results` (1..50, default 20). Ignored when count_only. */
2444
+ result_limit?: number;
1511
2445
  }
1512
2446
  /** Body for `watches.bulk(body)` — up to 100 watches in one call. */
1513
2447
  export interface WatchBulkParams {
@@ -1516,6 +2450,13 @@ export interface WatchBulkParams {
1516
2450
  export interface AlertListParams {
1517
2451
  severity?: AlertSeverity;
1518
2452
  event_type?: AlertEventType;
2453
+ /**
2454
+ * Which evaluation epochs to include. `'current'` (default) returns only
2455
+ * alerts from the watch's current evaluation epoch — alerts from prior query
2456
+ * revisions (bumped via `/replay`) are excluded. `'all'` returns every alert
2457
+ * regardless of the epoch it fired under.
2458
+ */
2459
+ epoch?: 'all' | 'current';
1519
2460
  limit?: number;
1520
2461
  cursor?: string;
1521
2462
  }
@@ -1616,6 +2557,571 @@ export interface UsageSummaryParams {
1616
2557
  /** Restrict summary to a specific endpoint type. */
1617
2558
  endpoint_type?: string;
1618
2559
  }
2560
+ /** Shared `GET /v1/screening` options (everything except the candidate). */
2561
+ export interface ScreenOptions {
2562
+ /** Intended Nice class numbers (1-45). */
2563
+ nice_classes?: number[];
2564
+ /** Free-text description of intended goods/services (max 2,000 characters). */
2565
+ goods_services?: string;
2566
+ /** Restrict to these jurisdiction (territory) codes. */
2567
+ jurisdictions?: string[];
2568
+ /** Restrict to these registering office codes. */
2569
+ offices?: string[];
2570
+ /** `live` (default) keeps live marks; `all` includes dead marks. */
2571
+ include?: 'live' | 'all';
2572
+ /** Band-admission threshold. */
2573
+ sensitivity?: 'strict' | 'standard' | 'broad';
2574
+ /**
2575
+ * BETA (flag-gated) — goods/services resolution cascade knob. `auto` (default) runs the
2576
+ * deterministic + semantic-on-refusal cascade (bimodal latency; the tier-3 LLM lane adds a
2577
+ * ~4s p50 uncached tail once it lands); `deterministic` is the budget-safe, sub-ms/SLA mode
2578
+ * that never calls the LLM lane; `llm` is not yet implemented (501). Honored only when the
2579
+ * cascade-modes flag is enabled server-side; ignored otherwise.
2580
+ */
2581
+ resolution_mode?: 'auto' | 'deterministic' | 'llm';
2582
+ /** Page size (1-50, default 20). */
2583
+ limit?: number;
2584
+ }
2585
+ /**
2586
+ * `GET /v1/screening` query parameters. EXACTLY ONE candidate is required:
2587
+ * either `q` (mark text, 2-200 non-whitespace chars) OR `trademark_id`
2588
+ * (an existing register record) — the XOR is enforced at the type level, so
2589
+ * supplying both or neither is a compile error, mirroring the API's 400.
2590
+ */
2591
+ export type ScreenParams = ScreenOptions & ({
2592
+ q: string;
2593
+ trademark_id?: never;
2594
+ } | {
2595
+ trademark_id: string;
2596
+ q?: never;
2597
+ });
2598
+ export type ScreeningRiskLevel = 'high' | 'medium' | 'low';
2599
+ /**
2600
+ * `GET /v1/screening` verdict. `needs_review` is a would-be `clear` the screen
2601
+ * could not complete to `clear` standard. The usual cause is incomplete register
2602
+ * coverage for a requested territory, but a stale corpus, a capped analysis
2603
+ * horizon, a failed lane, an unsupported language, low-confidence class
2604
+ * inference, or a coverage assessment that could not be read at all produce it
2605
+ * too. Inspect `ScreenResult.screening.coverage` for the details when present,
2606
+ * it can be absent when the assessment itself failed. Found conflicts still band
2607
+ * `high_risk` / `caution` regardless of coverage. The listing verdict
2608
+ * (`ListingCheckResult.listing.verdict`) is a SEPARATE enum without
2609
+ * `needs_review`, incomplete coverage surfaces there as `caution`.
2610
+ */
2611
+ export type ScreeningVerdict = 'clear' | 'caution' | 'needs_review' | 'high_risk';
2612
+ export type ScreeningMarkMatchLevel = 'identical' | 'strong' | 'weak';
2613
+ export type ScreeningGoodsServicesMatchLevel = 'same_class' | 'related_class' | 'unrelated';
2614
+ export type ScreeningLitigationRiskLevel = 'high' | 'medium' | 'low' | 'unknown';
2615
+ export type ScreeningCoverageStatus = 'complete' | 'partial' | 'stale' | 'unavailable';
2616
+ /** Per-office register freshness on the coverage gate's office axis. */
2617
+ export interface ScreeningOfficeCoverage {
2618
+ /** Public office code (WIPO ST.3, e.g. `US`, `EM` for the EUIPO). */
2619
+ office: string;
2620
+ status: ScreeningCoverageStatus;
2621
+ /** Corpus freshness watermark (ISO ts), or `null` when unavailable. */
2622
+ as_of: string | null;
2623
+ }
2624
+ /** Per-requested-territory protection-scope register coverage. */
2625
+ export interface ScreeningTerritoryCoverage {
2626
+ /** Requested territory code (jurisdiction code, e.g. `DE`, `EU`; `EM` normalized to `EU`). */
2627
+ territory: string;
2628
+ /** The territory's own national register; `office` is `null` when no office models it. */
2629
+ national_register: {
2630
+ office: string | null;
2631
+ covered: boolean;
2632
+ };
2633
+ /** Regional registers that also protect here (EU/BX/OA). Empty for a regional request. */
2634
+ regional_registers: Array<{
2635
+ code: string;
2636
+ covered: boolean;
2637
+ }>;
2638
+ /**
2639
+ * For a REGIONAL request (`jurisdictions: ['EU']`) only: since screening
2640
+ * expands a region down to its member states, `uncovered` lists the member
2641
+ * territories whose national register is dark. Absent for a country request.
2642
+ */
2643
+ member_registers?: {
2644
+ total: number;
2645
+ uncovered: string[];
2646
+ };
2647
+ complete: boolean;
2648
+ }
2649
+ /**
2650
+ * Register-coverage assessment behind a screening verdict. Present whenever the
2651
+ * coverage registry was readable. `complete_for_clear:false` is why an otherwise
2652
+ * `clear` verdict was downgraded to `needs_review`.
2653
+ */
2654
+ export interface ScreeningCoverage {
2655
+ /** Office-freshness axis (ST.3 codes). */
2656
+ offices: ScreeningOfficeCoverage[];
2657
+ /** Protection-scope axis (jurisdiction codes). Empty for offices-scoped/unscoped requests. */
2658
+ territories: ScreeningTerritoryCoverage[];
2659
+ classes: {
2660
+ requested: number[];
2661
+ resolved: number[];
2662
+ expanded: number[];
2663
+ searched: number[];
2664
+ source: 'requested' | 'inferred' | 'expanded';
2665
+ inference_confidence: 'high' | 'medium' | 'low' | null;
2666
+ };
2667
+ lanes: {
2668
+ planned: string[];
2669
+ completed: string[];
2670
+ capped: string[];
2671
+ failed: string[];
2672
+ };
2673
+ language: {
2674
+ detected: string | null;
2675
+ supported: boolean;
2676
+ };
2677
+ horizon: {
2678
+ analyzed: number;
2679
+ cap: number;
2680
+ capped: boolean;
2681
+ cap_reason: string | null;
2682
+ };
2683
+ complete_for_clear: boolean;
2684
+ }
2685
+ /** One banded conflict returned by `GET /v1/screening`. */
2686
+ export interface ScreeningHit {
2687
+ object: 'screening_hit';
2688
+ risk_level: ScreeningRiskLevel;
2689
+ reason_codes: string[];
2690
+ mark_match: {
2691
+ level: ScreeningMarkMatchLevel;
2692
+ admitted_match_levels: string[];
2693
+ };
2694
+ goods_services_match: {
2695
+ level: ScreeningGoodsServicesMatchLevel;
2696
+ matched_nice_classes: number[];
2697
+ };
2698
+ jurisdiction_match: {
2699
+ requested: string[];
2700
+ matched: string[];
2701
+ };
2702
+ litigation_risk: {
2703
+ level: ScreeningLitigationRiskLevel;
2704
+ owner_publicly_traded: boolean | null;
2705
+ owner_ticker: string | null;
2706
+ prior_proceedings: number | null;
2707
+ owner_portfolio_size: number | null;
2708
+ };
2709
+ trademark: TrademarkSummary;
2710
+ }
2711
+ /** `GET /v1/screening` response — bespoke list envelope. */
2712
+ export interface ScreenResult {
2713
+ object: 'list';
2714
+ screening: {
2715
+ verdict: ScreeningVerdict;
2716
+ summary: {
2717
+ high: number;
2718
+ medium: number;
2719
+ low: number;
2720
+ truncated: boolean;
2721
+ };
2722
+ litigation_risk: {
2723
+ high: number;
2724
+ medium: number;
2725
+ };
2726
+ candidate: {
2727
+ mark: string;
2728
+ normalized: string;
2729
+ trademark_id?: string;
2730
+ };
2731
+ inferred_nice_classes?: number[];
2732
+ rules_version: string;
2733
+ /**
2734
+ * BETA — present only when the cascade-modes flag is enabled server-side. Request-level
2735
+ * rollup of how the goods/services coverage was resolved, plus per-area suggestion marking
2736
+ * (TUR P1d). Each area carries two independent axes: `method` (which lane produced it) and
2737
+ * `suggested` (whether the caller should verify before relying on it) so a consumer can render
2738
+ * an uncertain answer distinctly from a certain one.
2739
+ */
2740
+ resolution?: {
2741
+ /** The resolution_mode the request asked for. */
2742
+ mode_requested: 'auto' | 'deterministic' | 'llm';
2743
+ /**
2744
+ * Deepest cascade lane that actually contributed. `llm`/`llm_cached` are reserved for
2745
+ * tier-3 and not emitted yet.
2746
+ */
2747
+ method: 'deterministic' | 'semantic' | 'llm' | 'llm_cached';
2748
+ /**
2749
+ * Top-1 semantic retrieval score (quantized scale) across the semantic areas that
2750
+ * contributed; null when method is not `semantic`.
2751
+ */
2752
+ top_semantic_score_q: number | null;
2753
+ /**
2754
+ * BETA (tier-3) — the pinned model revision that produced a billed LLM adjudication
2755
+ * (method `llm`/`llm_cached`), so a customer can verify which model they paid for. null on
2756
+ * the deterministic/semantic path.
2757
+ */
2758
+ llm_model: string | null;
2759
+ /**
2760
+ * BETA (tier-3) — cache disposition of an LLM adjudication: `hit` (replayed, billed
2761
+ * llm_cached), `miss` (a model call ran, billed llm), or null (no LLM lane / honest fallback).
2762
+ */
2763
+ cache: 'hit' | 'miss' | null;
2764
+ /** Per-area suggestion marking. */
2765
+ areas: Array<{
2766
+ nice_class: number;
2767
+ label: string;
2768
+ role: 'core' | 'related' | 'adjacent' | 'conditional' | 'administrative';
2769
+ /** WHICH LANE produced this area (provenance only, NOT a certainty claim). */
2770
+ method: 'deterministic' | 'semantic' | 'llm';
2771
+ /**
2772
+ * WHETHER THE CALLER SHOULD VERIFY before relying on this area (independent of `method`).
2773
+ * true when semantic-derived, OR confidence is below `high`, OR provenance is a
2774
+ * low-certainty deterministic source (e.g. class_fallback). Only a high-confidence
2775
+ * grounded deterministic area is false.
2776
+ */
2777
+ suggested: boolean;
2778
+ /** Semantic-derived areas are capped at medium; below-high confidence sets suggested=true. */
2779
+ confidence: 'high' | 'medium' | 'low';
2780
+ /** Machine-readable per-area provenance, e.g. `['semantic_match']`, `['class_fallback']`. */
2781
+ basis_codes: string[];
2782
+ /** Quantized semantic score for a semantic area; null on deterministic areas. */
2783
+ score_q: number | null;
2784
+ }>;
2785
+ };
2786
+ as_of: string | null;
2787
+ admitted_match_levels: string[];
2788
+ /**
2789
+ * Register-coverage assessment (protection-scope). Present whenever the
2790
+ * coverage registry was readable. `coverage.complete_for_clear:false` is why
2791
+ * a would-be `clear` was downgraded to `needs_review`.
2792
+ */
2793
+ coverage?: ScreeningCoverage;
2794
+ note?: string;
2795
+ warnings: string[];
2796
+ };
2797
+ data: ScreeningHit[];
2798
+ has_more: boolean;
2799
+ pagination: {
2800
+ cursor: string | null;
2801
+ };
2802
+ request_id?: string;
2803
+ }
2804
+ /** A structured description of the candidate's intended use. */
2805
+ export interface CompareUseProfile {
2806
+ /** Intended Nice class numbers (1-45). */
2807
+ nice_classes?: number[];
2808
+ /** Structured goods/services lines, optionally pinned to a Nice class. */
2809
+ goods_services?: Array<{
2810
+ nice_class?: number;
2811
+ text: string;
2812
+ }>;
2813
+ /** Plain-English description of the business or intended use. */
2814
+ business_description?: string;
2815
+ }
2816
+ export type CompareCandidate = {
2817
+ trademark_id: string;
2818
+ mark?: never;
2819
+ use?: never;
2820
+ } | {
2821
+ trademark_id?: never;
2822
+ mark: string;
2823
+ use: CompareUseProfile;
2824
+ };
2825
+ export type CompareConflict = {
2826
+ trademark_id: string;
2827
+ mark?: never;
2828
+ nice_classes?: never;
2829
+ goods_services?: never;
2830
+ status?: never;
2831
+ } | {
2832
+ trademark_id?: never;
2833
+ mark: string;
2834
+ nice_classes: number[];
2835
+ goods_services?: string;
2836
+ status?: 'active' | 'pending' | 'inactive' | 'unknown';
2837
+ };
2838
+ /** A compare batch contains at least one and at most ten conflicts. */
2839
+ export type CompareConflicts = [CompareConflict] | [CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict] | [CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict, CompareConflict];
2840
+ /** `POST /v1/compare` request body. `conflicts` accepts 1-10 items. */
2841
+ export interface CompareParams {
2842
+ candidate: CompareCandidate;
2843
+ conflicts: CompareConflicts;
2844
+ jurisdictions?: string[];
2845
+ offices?: string[];
2846
+ }
2847
+ export type ComparisonStatus = 'ok' | 'not_found' | 'not_comparable';
2848
+ export type CompareRiskLevel = 'high' | 'medium' | 'low';
2849
+ export type CompareMarkMatchLevel = 'identical' | 'strong' | 'weak' | 'none';
2850
+ export type CompareGoodsServicesLevel = 'same_class' | 'related_class' | 'unrelated';
2851
+ /** One request-ordered pair result from `POST /v1/compare`. */
2852
+ export interface ComparisonResult {
2853
+ object: 'comparison_result';
2854
+ comparison_status: ComparisonStatus;
2855
+ /** Conservative human-review signal: true for ok pairs where a mark-similarity clause fired. */
2856
+ review_recommended: boolean;
2857
+ /** Open vocabulary; tolerate warnings added in future. */
2858
+ warnings: string[];
2859
+ conflict: {
2860
+ trademark_id?: string;
2861
+ mark: string | null;
2862
+ nice_classes: number[] | null;
2863
+ status_as_evaluated: string | null;
2864
+ record_as_of: string | null;
2865
+ };
2866
+ risk_level: CompareRiskLevel | null;
2867
+ /** Open vocabulary; tolerate reason codes added in future. */
2868
+ reason_codes: string[] | null;
2869
+ mark_match: {
2870
+ level: CompareMarkMatchLevel;
2871
+ /** Compare engine clauses; unlike Screening, Compare has no sensitivity admission gate. */
2872
+ matched_levels: string[];
2873
+ } | null;
2874
+ goods_services: {
2875
+ level: CompareGoodsServicesLevel;
2876
+ overlap_classes: number[];
2877
+ text_similarity: number | null;
2878
+ } | null;
2879
+ similarity: {
2880
+ string: number;
2881
+ phonetic: number;
2882
+ /** Reserved for a future semantic dimension; currently always `null`. */
2883
+ semantic: null | number;
2884
+ } | null;
2885
+ }
2886
+ /** `POST /v1/compare` response — bespoke list envelope. */
2887
+ export interface CompareResult {
2888
+ object: 'list';
2889
+ comparison: {
2890
+ candidate: {
2891
+ trademark_id?: string;
2892
+ mark: string;
2893
+ normalized: string;
2894
+ effective_nice_classes: number[];
2895
+ };
2896
+ rules_version: 'compare-v1.1';
2897
+ /** Serving screening strategy identifier; intentionally not a string literal. */
2898
+ band_rules_version: string;
2899
+ mapping_version: string;
2900
+ resolver: {
2901
+ engine_version: string;
2902
+ ruleset_version: string;
2903
+ catalog_version: string;
2904
+ };
2905
+ as_of: string | null;
2906
+ /** Open vocabulary; tolerate warnings added in future. */
2907
+ warnings: string[];
2908
+ disclaimer: string;
2909
+ };
2910
+ data: ComparisonResult[];
2911
+ summary: {
2912
+ high: number;
2913
+ medium: number;
2914
+ low: number;
2915
+ none: number;
2916
+ not_comparable: number;
2917
+ /** Count of ok results where a mark-similarity clause fired. */
2918
+ review_recommended: number;
2919
+ };
2920
+ has_more: false;
2921
+ pagination: {
2922
+ cursor: null;
2923
+ };
2924
+ request_id: string;
2925
+ }
2926
+ /**
2927
+ * Coarse listing/candidate verdict band. Beta: common-word listings are
2928
+ * over-flagged, so treat `caution` as no-signal pending the ENG-199 redesign.
2929
+ */
2930
+ export type ListingVerdict = 'clear' | 'caution' | 'high_risk';
2931
+ /** `POST /v1/screening/listings` request body. Generic commerce-text fields only. */
2932
+ export interface ListingCheckParams {
2933
+ /** Listing title (required). */
2934
+ title: string;
2935
+ /** Explicit brand/seller name — always screened, never suppressed. */
2936
+ brand?: string;
2937
+ /** Listing description — high-precision markers only (quoted / ™®-adjacent / "compatible with X"). */
2938
+ description?: string;
2939
+ /** Platform-neutral tags/keywords/search terms. */
2940
+ keywords?: string[];
2941
+ /** Listing category label — context only, never itself a candidate. */
2942
+ category?: string;
2943
+ /** Intended Nice class numbers (1-45). */
2944
+ nice_classes?: number[];
2945
+ /** Restrict to these jurisdiction (territory) codes. */
2946
+ jurisdictions?: string[];
2947
+ /** Restrict to these registering office codes. */
2948
+ offices?: string[];
2949
+ /** `live` (default) keeps live marks; `all` includes dead. */
2950
+ include?: 'live' | 'all';
2951
+ /** Band-admission threshold for the primary tier. Title/keyword tier is always `strict`. */
2952
+ sensitivity?: 'strict' | 'standard' | 'broad';
2953
+ }
2954
+ /** One DuPont-mapped factor in the informational screening ledger. */
2955
+ export interface ScreeningFactorEntry {
2956
+ factor_id: string;
2957
+ dupont_factor: number;
2958
+ assessment: string;
2959
+ confidence: string;
2960
+ evidence: Array<Record<string, unknown>>;
2961
+ limitations: string[];
2962
+ computed_by: string;
2963
+ version: string;
2964
+ }
2965
+ /** One conflict under a listing candidate (byte-identical to a GET /v1/screening hit + `informational`). */
2966
+ export interface ListingCandidateHit {
2967
+ object: 'screening_hit';
2968
+ risk_level: 'high' | 'medium' | 'low';
2969
+ reason_codes: string[];
2970
+ mark_match: {
2971
+ level: string;
2972
+ admitted_match_levels: string[];
2973
+ };
2974
+ goods_services_match: {
2975
+ level: string;
2976
+ matched_nice_classes: number[];
2977
+ };
2978
+ jurisdiction_match: {
2979
+ requested: string[];
2980
+ matched: string[];
2981
+ };
2982
+ litigation_risk: Record<string, unknown>;
2983
+ trademark: Record<string, unknown>;
2984
+ /** Surfaced but non-escalating conflict. Informational; not legal advice. */
2985
+ informational?: boolean;
2986
+ /** Closed reason explaining why the conflict is informational. Informational; not legal advice. */
2987
+ informational_reason?: 'unrelated_class_identical' | 'generic_term_no_corroboration' | 'crowded_field_no_corroboration' | 'identical_unrelated_no_corroboration' | 'nominative_compat';
2988
+ /** Origin of the served risk band. Informational; not legal advice. */
2989
+ band_source?: 'v1_table' | 'v3_scorer';
2990
+ /** Additive v3 scorer read; never the served band. Informational; not legal advice. */
2991
+ model_assessment?: {
2992
+ band: 'high' | 'medium' | 'borderline' | 'low';
2993
+ confidence: 'high' | 'medium' | 'low';
2994
+ band_source: 'v1_table' | 'v3_scorer';
2995
+ };
2996
+ /** DuPont factor ledger with supporting evidence. Informational; not legal advice. */
2997
+ factor_ledger?: ScreeningFactorEntry[];
2998
+ }
2999
+ /**
3000
+ * Analysis-completeness status — closed enum, ORTHOGONAL to verdict. Derived
3001
+ * deterministically from completeness signals; `complete` means the listing was
3002
+ * fully screened. Read this together with `auto_approve_eligible`, not the
3003
+ * tri-state verdict alone. Mirrors `ListingMeta.analysis_status` in the OpenAPI
3004
+ * contract.
3005
+ */
3006
+ export type AnalysisStatus = 'complete' | 'incomplete_budget' | 'incomplete_timeout' | 'incomplete_backend' | 'incomplete_unscreenable' | 'incomplete_variant_shed' | 'incomplete_stale_snapshot' | 'unsupported_language';
3007
+ /** Provenance of a matched candidate within the listing (evidence-first payload). */
3008
+ export interface ListingMatchCandidate {
3009
+ term: string;
3010
+ normalized: string;
3011
+ tier: 'P' | 'S';
3012
+ field: 'title' | 'brand' | 'description' | 'keywords';
3013
+ }
3014
+ /**
3015
+ * Evidence-first PRIMARY payload entry: one matched mark, deduped + attributed.
3016
+ * Discriminated on `source`: `live_register` carries live-register `registration`
3017
+ * evidence (rights_domain `trademark`); `curated_bank` carries `bank_entry`
3018
+ * provenance for a non-register persona/character right (rights_domain
3019
+ * `character_ip` | `persona_publicity` | `franchise`). Mirrors the `ListingMatch`
3020
+ * schema in the OpenAPI contract.
3021
+ */
3022
+ export type ListingMatch = {
3023
+ object: 'listing_match';
3024
+ source: 'live_register';
3025
+ disposition: 'actionable' | 'informational';
3026
+ reason_codes: string[];
3027
+ /** Live-register trademark match. */
3028
+ rights_domain: 'trademark';
3029
+ goods_services_text_available: boolean;
3030
+ candidate: ListingMatchCandidate;
3031
+ /** Registration evidence — byte-identical to the matching `data[].hits[]` entry. */
3032
+ registration: ListingCandidateHit;
3033
+ } | {
3034
+ object: 'listing_match';
3035
+ source: 'curated_bank';
3036
+ disposition: 'actionable' | 'informational';
3037
+ reason_codes: string[];
3038
+ /** Curated non-register persona/character right — NOT a live-register lookup. */
3039
+ rights_domain: 'character_ip' | 'persona_publicity' | 'franchise';
3040
+ goods_services_text_available: boolean;
3041
+ candidate: ListingMatchCandidate;
3042
+ /** Curated bank provenance — canonical name + review date. Honest labeling. */
3043
+ bank_entry: {
3044
+ canonical: string;
3045
+ review_date: string;
3046
+ note: string;
3047
+ };
3048
+ };
3049
+ /** One extracted, screened candidate mark. */
3050
+ export interface ListingCandidate {
3051
+ object: 'listing_candidate';
3052
+ term: string;
3053
+ normalized: string;
3054
+ tier: 'P' | 'S';
3055
+ reference?: boolean;
3056
+ reference_intent?: 'compat' | 'attribution' | 'prose';
3057
+ counterfeit?: boolean;
3058
+ sources: Array<{
3059
+ field: string;
3060
+ span: [number, number];
3061
+ keyword_index?: number;
3062
+ }>;
3063
+ verdict: ListingVerdict;
3064
+ nice_classes_used: number[];
3065
+ hits: ListingCandidateHit[];
3066
+ }
3067
+ /** A candidate that was NOT screened, with a closed reason code (auditability). */
3068
+ export interface SuppressedListingCandidate {
3069
+ object: 'suppressed_candidate';
3070
+ term: string;
3071
+ normalized: string;
3072
+ field: string;
3073
+ span: [number, number];
3074
+ keyword_index?: number;
3075
+ reason: 'charset' | 'stopword' | 'jargon' | 'descriptive' | 'generic_term' | 'no_index_hit' | 'containment' | 'cap' | 'protected_cap' | 'numeric_id_brand' | 'unscreenable';
3076
+ }
3077
+ /** `POST /v1/screening/listings` response — bespoke envelope. */
3078
+ export interface ListingCheckResult {
3079
+ object: 'list';
3080
+ listing: {
3081
+ verdict: ListingVerdict;
3082
+ summary: {
3083
+ high: number;
3084
+ medium: number;
3085
+ low: number;
3086
+ informational: number;
3087
+ };
3088
+ candidates_screened: number;
3089
+ rules_version: 'screening-v1';
3090
+ verdict_version: components['schemas']['ListingMeta']['verdict_version'];
3091
+ extractor_version: string;
3092
+ selector_version: string;
3093
+ as_of: string | null;
3094
+ warnings: string[];
3095
+ note?: string;
3096
+ analysis_status: AnalysisStatus;
3097
+ auto_approve_eligible: boolean;
3098
+ class_provenance: {
3099
+ source: 'provided_platform' | 'provided_unverified' | 'inferred' | 'none';
3100
+ confidence: number | null;
3101
+ };
3102
+ resolved_nice_classes: number[];
3103
+ /** Content hash of the deterministic dictionaries. */
3104
+ dictionaries_version: string;
3105
+ /** Cheap content hash over the decision-asset version tuple. */
3106
+ decision_asset_version: string;
3107
+ /** Fan-out forms actually evaluated (present whenever variant shedding occurred). */
3108
+ forms_evaluated?: number;
3109
+ /** Total fan-out forms before shedding (present whenever variant shedding occurred). */
3110
+ forms_total?: number;
3111
+ };
3112
+ /**
3113
+ * Evidence-first PRIMARY payload: one entry per matched mark (deduped,
3114
+ * attributed). Leads with disposition + reason codes + registration evidence.
3115
+ */
3116
+ matches: ListingMatch[];
3117
+ data: ListingCandidate[];
3118
+ suppressed: SuppressedListingCandidate[];
3119
+ has_more: boolean;
3120
+ pagination: {
3121
+ cursor: string | null;
3122
+ };
3123
+ request_id?: string;
3124
+ }
1619
3125
  /** Per-request overrides. Accepted as the last argument on every method. */
1620
3126
  export interface RequestOptions {
1621
3127
  /** Request timeout in ms. Overrides client default. */
@@ -1659,10 +3165,75 @@ export interface ListResponseBody<T> {
1659
3165
  pagination: {
1660
3166
  cursor: string | null;
1661
3167
  total_count?: number;
3168
+ total_count_approximate?: boolean;
1662
3169
  };
1663
3170
  request_id: string;
1664
3171
  search_meta?: SearchMeta;
3172
+ source_sync?: TrademarkDocumentSourceSync;
1665
3173
  /** Faceted aggregation buckets (V2 search and saved search results). */
1666
3174
  aggregations?: Record<string, Record<string, number>>;
3175
+ /**
3176
+ * TSK-127 — display-name labels for aggregation bucket keys, shaped
3177
+ * `{ <aggName>: { <bucketKey>: name } }`. Currently populated for the
3178
+ * `entity_id` facet (entity id → display name) so consumers can render
3179
+ * human-readable bucket labels without a follow-up lookup.
3180
+ */
3181
+ aggregation_metadata?: Record<string, Record<string, string>>;
3182
+ }
3183
+ export interface OfficeAnalytics {
3184
+ object: 'office_analytics';
3185
+ code: string;
3186
+ total_marks: number;
3187
+ registered_count: number;
3188
+ pending_count: number;
3189
+ expired_count: number;
3190
+ cancelled_count: number;
3191
+ abandoned_count: number;
3192
+ registration_rate: number | null;
3193
+ jurisdiction_count: number;
3194
+ earliest_filing: string | null;
3195
+ latest_filing: string | null;
3196
+ top_classes: Array<{
3197
+ class: number;
3198
+ count: number;
3199
+ pct: number;
3200
+ }> | null;
3201
+ yearly_trend: Array<{
3202
+ year: number;
3203
+ filed: number;
3204
+ registered: number;
3205
+ abandoned: number;
3206
+ }> | null;
3207
+ stats_computed_at: string;
3208
+ /** Per-request id echoed at the top level of the response body (`*Response` in the OpenAPI spec). */
3209
+ request_id: string;
3210
+ }
3211
+ export interface MarketAnalytics {
3212
+ object: 'market_analytics';
3213
+ total_marks: number;
3214
+ active_count: number;
3215
+ by_status: Record<string, number>;
3216
+ by_office: Record<string, number>;
3217
+ top_classes: Array<{
3218
+ class: number;
3219
+ count: number;
3220
+ pct: number;
3221
+ }>;
3222
+ filing_trend: Record<string, number>;
3223
+ computed_at: string;
3224
+ /** Per-request id echoed at the top level of the response body (`*Response` in the OpenAPI spec). */
3225
+ request_id: string;
3226
+ }
3227
+ export interface ClassificationAnalytics {
3228
+ object: 'classification_analytics';
3229
+ nice_class: number;
3230
+ total_marks: number;
3231
+ active_count: number;
3232
+ by_status: Record<string, number>;
3233
+ by_office: Record<string, number>;
3234
+ filing_trend: Record<string, number>;
3235
+ computed_at: string;
3236
+ /** Per-request id echoed at the top level of the response body (`*Response` in the OpenAPI spec). */
3237
+ request_id: string;
1667
3238
  }
1668
3239
  //# sourceMappingURL=types.d.ts.map