@signa-so/sdk 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -13
- package/dist/_internals/fetch-with-retry.js +1 -1
- package/dist/_internals/fetch-with-retry.js.map +1 -1
- package/dist/_internals/query-string.d.ts +5 -4
- package/dist/_internals/query-string.d.ts.map +1 -1
- package/dist/_internals/query-string.js +6 -14
- package/dist/_internals/query-string.js.map +1 -1
- package/dist/client.d.ts +54 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +76 -13
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -1
- package/dist/errors.js.map +1 -1
- package/dist/generated/api-types.d.ts +3608 -2393
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/resources/alerts.d.ts +18 -13
- package/dist/resources/alerts.d.ts.map +1 -1
- package/dist/resources/alerts.js +29 -19
- package/dist/resources/alerts.js.map +1 -1
- package/dist/resources/attorneys.d.ts +5 -2
- package/dist/resources/attorneys.d.ts.map +1 -1
- package/dist/resources/attorneys.js +6 -5
- package/dist/resources/attorneys.js.map +1 -1
- package/dist/resources/entities.d.ts +52 -0
- package/dist/resources/entities.d.ts.map +1 -0
- package/dist/resources/entities.js +70 -0
- package/dist/resources/entities.js.map +1 -0
- package/dist/resources/firms.d.ts +5 -5
- package/dist/resources/firms.js +5 -5
- package/dist/resources/goods-services.d.ts +56 -0
- package/dist/resources/goods-services.d.ts.map +1 -0
- package/dist/resources/goods-services.js +60 -0
- package/dist/resources/goods-services.js.map +1 -0
- package/dist/resources/{platform.d.ts → organization.d.ts} +24 -3
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/organization.js +81 -0
- package/dist/resources/organization.js.map +1 -0
- package/dist/resources/owners.d.ts +5 -2
- package/dist/resources/owners.d.ts.map +1 -1
- package/dist/resources/owners.js +6 -5
- package/dist/resources/owners.js.map +1 -1
- package/dist/resources/portfolios.d.ts +3 -3
- package/dist/resources/portfolios.d.ts.map +1 -1
- package/dist/resources/portfolios.js +4 -4
- package/dist/resources/portfolios.js.map +1 -1
- package/dist/resources/proceedings.d.ts +1 -1
- package/dist/resources/proceedings.js +1 -1
- package/dist/resources/references.d.ts +51 -12
- package/dist/resources/references.d.ts.map +1 -1
- package/dist/resources/references.js +33 -15
- package/dist/resources/references.js.map +1 -1
- package/dist/resources/suggest.d.ts +16 -0
- package/dist/resources/suggest.d.ts.map +1 -0
- package/dist/resources/suggest.js +18 -0
- package/dist/resources/suggest.js.map +1 -0
- package/dist/resources/trademarks.d.ts +47 -5
- package/dist/resources/trademarks.d.ts.map +1 -1
- package/dist/resources/trademarks.js +53 -5
- package/dist/resources/trademarks.js.map +1 -1
- package/dist/resources/watches.d.ts +56 -9
- package/dist/resources/watches.d.ts.map +1 -1
- package/dist/resources/watches.js +91 -12
- package/dist/resources/watches.js.map +1 -1
- package/dist/resources/webhooks.d.ts +57 -0
- package/dist/resources/webhooks.d.ts.map +1 -0
- package/dist/resources/webhooks.js +86 -0
- package/dist/resources/webhooks.js.map +1 -0
- package/dist/types.d.ts +1163 -213
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webhooks.d.ts +57 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +76 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +7 -2
- package/dist/resources/platform.d.ts.map +0 -1
- package/dist/resources/platform.js +0 -50
- package/dist/resources/platform.js.map +0 -1
- package/dist/resources/search.d.ts +0 -27
- package/dist/resources/search.d.ts.map +0 -1
- package/dist/resources/search.js +0 -36
- package/dist/resources/search.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { components } from './generated/api-types.js';
|
|
|
2
2
|
/** Full trademark with all optional includes (retrieve response). */
|
|
3
3
|
export type Trademark = components['schemas']['TrademarkDetailResponse'];
|
|
4
4
|
/** Compact trademark in list responses. */
|
|
5
|
-
export type TrademarkSummary = components['schemas']['
|
|
5
|
+
export type TrademarkSummary = components['schemas']['TrademarkSummaryV1'];
|
|
6
6
|
/** Trademark event in history responses. */
|
|
7
|
-
export type Event = components['schemas']['
|
|
7
|
+
export type Event = components['schemas']['TrademarkHistoryEvent'];
|
|
8
8
|
/** Stats object shape returned by ?include=stats on attorney detail. */
|
|
9
9
|
export interface AttorneyStats {
|
|
10
10
|
trademark_count: number | null;
|
|
@@ -52,55 +52,35 @@ export interface FirmStats {
|
|
|
52
52
|
latest_filing: string | null;
|
|
53
53
|
computed_at: string | null;
|
|
54
54
|
}
|
|
55
|
-
/** Specializations (top Nice classes + mark types). */
|
|
56
|
-
export interface Specializations {
|
|
57
|
-
top_classes: Array<{
|
|
58
|
-
class: number;
|
|
59
|
-
count: number;
|
|
60
|
-
pct: number;
|
|
61
|
-
}> | null;
|
|
62
|
-
top_mark_types: Array<{
|
|
63
|
-
type: string;
|
|
64
|
-
count: number;
|
|
65
|
-
pct: number;
|
|
66
|
-
}> | null;
|
|
67
|
-
}
|
|
68
|
-
/** Top client entry (for attorneys/firms). */
|
|
69
|
-
export interface TopClient {
|
|
70
|
-
owner_id: string;
|
|
71
|
-
name: string;
|
|
72
|
-
count: number;
|
|
73
|
-
}
|
|
74
|
-
/** Top attorney entry (for owners). */
|
|
75
|
-
export interface TopAttorney {
|
|
76
|
-
attorney_id: string;
|
|
77
|
-
name: string;
|
|
78
|
-
count: number;
|
|
79
|
-
}
|
|
80
|
-
/** Jurisdiction breakdown entry. */
|
|
81
|
-
export interface JurisdictionEntry {
|
|
82
|
-
office: string;
|
|
83
|
-
count: number;
|
|
84
|
-
registered?: number;
|
|
85
|
-
rate?: number;
|
|
86
|
-
avg_days?: number;
|
|
87
|
-
}
|
|
88
|
-
/** Yearly trend entry. */
|
|
89
|
-
export interface TrendEntry {
|
|
90
|
-
year: number;
|
|
91
|
-
filed: number;
|
|
92
|
-
registered: number;
|
|
93
|
-
abandoned: number;
|
|
94
|
-
}
|
|
95
55
|
/** Full owner detail (retrieve response). */
|
|
96
56
|
export type Owner = components['schemas']['OwnerResponse'] & {
|
|
97
57
|
trademark_count?: number | null;
|
|
98
58
|
registration_rate?: number | null;
|
|
99
59
|
latest_filing?: string | null;
|
|
60
|
+
/** Resolved-entity id this owner belongs to (the derived `ent_<owner-uuid>`
|
|
61
|
+
* singleton when unlinked). Always present. */
|
|
62
|
+
entity_id?: string;
|
|
63
|
+
entity_id_type?: 'resolved' | 'derived';
|
|
64
|
+
/** Whether the (possibly entity-inherited) company set includes an active SEC
|
|
65
|
+
* company with a ticker. */
|
|
66
|
+
publicly_traded?: boolean;
|
|
67
|
+
/** First SEC ticker across the (possibly inherited) company set. */
|
|
68
|
+
ticker?: string | null;
|
|
69
|
+
/** First GLEIF LEI across the (possibly inherited) company set. */
|
|
70
|
+
lei?: string | null;
|
|
71
|
+
/** Whether any GLEIF LEI is present across the (possibly inherited) set. */
|
|
72
|
+
has_lei?: boolean;
|
|
73
|
+
/** `entity` when company facts are inherited across entity members; `direct`
|
|
74
|
+
* for an unlinked singleton. */
|
|
75
|
+
companies_source?: 'entity' | 'direct';
|
|
76
|
+
/** Public companies — when linked, the union of all members' company links
|
|
77
|
+
* (served through the entity). Omitted entirely when empty. */
|
|
78
|
+
companies?: EntityCompany[];
|
|
100
79
|
related_entities?: {
|
|
101
80
|
parent: {
|
|
102
81
|
id: string;
|
|
103
82
|
object: 'owner';
|
|
83
|
+
name: string;
|
|
104
84
|
canonical_name: string;
|
|
105
85
|
country_code: string | null;
|
|
106
86
|
entity_type: string | null;
|
|
@@ -108,22 +88,21 @@ export type Owner = components['schemas']['OwnerResponse'] & {
|
|
|
108
88
|
children: Array<{
|
|
109
89
|
id: string;
|
|
110
90
|
object: 'owner';
|
|
91
|
+
name: string;
|
|
111
92
|
canonical_name: string;
|
|
112
93
|
country_code: string | null;
|
|
113
94
|
entity_type: string | null;
|
|
114
95
|
}>;
|
|
115
96
|
};
|
|
116
97
|
stats?: OwnerStats;
|
|
117
|
-
specializations?: Specializations;
|
|
118
|
-
top_attorneys?: TopAttorney[];
|
|
119
|
-
jurisdictions?: JurisdictionEntry[];
|
|
120
|
-
trend?: TrendEntry[];
|
|
121
98
|
};
|
|
122
99
|
/** Compact owner in list responses. */
|
|
123
100
|
export type OwnerSummary = components['schemas']['OwnerSummary'] & {
|
|
124
101
|
trademark_count?: number | null;
|
|
125
102
|
registration_rate?: number | null;
|
|
126
103
|
latest_filing?: string | null;
|
|
104
|
+
entity_id?: string;
|
|
105
|
+
entity_id_type?: 'resolved' | 'derived';
|
|
127
106
|
};
|
|
128
107
|
/** Full attorney detail (retrieve response). */
|
|
129
108
|
export type Attorney = components['schemas']['AttorneyResponse'] & {
|
|
@@ -137,10 +116,6 @@ export type Attorney = components['schemas']['AttorneyResponse'] & {
|
|
|
137
116
|
recent_trademarks?: Array<Record<string, unknown>>;
|
|
138
117
|
recent_trademarks_has_more?: boolean;
|
|
139
118
|
stats?: AttorneyStats;
|
|
140
|
-
specializations?: Specializations;
|
|
141
|
-
top_clients?: TopClient[];
|
|
142
|
-
jurisdictions?: JurisdictionEntry[];
|
|
143
|
-
trend?: TrendEntry[];
|
|
144
119
|
};
|
|
145
120
|
/** Compact attorney in list responses. */
|
|
146
121
|
export type AttorneySummary = components['schemas']['AttorneySummary'] & {
|
|
@@ -153,8 +128,8 @@ export type AttorneySummary = components['schemas']['AttorneySummary'] & {
|
|
|
153
128
|
export interface Firm {
|
|
154
129
|
id: string;
|
|
155
130
|
object: 'firm';
|
|
131
|
+
name: string;
|
|
156
132
|
canonical_name: string;
|
|
157
|
-
display_name: string;
|
|
158
133
|
attorney_count: number;
|
|
159
134
|
trademark_count: number;
|
|
160
135
|
registration_rate: number | null;
|
|
@@ -162,34 +137,128 @@ export interface Firm {
|
|
|
162
137
|
created_at: string;
|
|
163
138
|
updated_at: string;
|
|
164
139
|
stats?: FirmStats;
|
|
165
|
-
specializations?: Specializations;
|
|
166
|
-
top_clients?: TopClient[];
|
|
167
|
-
jurisdictions?: JurisdictionEntry[];
|
|
168
|
-
trend?: TrendEntry[];
|
|
169
140
|
attorneys?: Array<{
|
|
170
141
|
id: string;
|
|
171
142
|
object: 'attorney';
|
|
143
|
+
name: string;
|
|
172
144
|
canonical_name: string;
|
|
173
145
|
firm_name: string | null;
|
|
174
146
|
country_code: string | null;
|
|
175
147
|
trademark_count: number | null;
|
|
176
148
|
}>;
|
|
177
149
|
attorneys_has_more?: boolean;
|
|
178
|
-
livemode: boolean;
|
|
179
150
|
request_id: string;
|
|
180
151
|
}
|
|
181
152
|
/** Compact firm in list responses. */
|
|
182
153
|
export interface FirmSummary {
|
|
183
154
|
id: string;
|
|
184
155
|
object: 'firm';
|
|
156
|
+
name: string;
|
|
185
157
|
canonical_name: string;
|
|
186
|
-
display_name: string;
|
|
187
158
|
attorney_count: number;
|
|
188
159
|
trademark_count: number;
|
|
189
160
|
registration_rate: number | null;
|
|
190
161
|
latest_filing: string | null;
|
|
191
162
|
created_at: string;
|
|
192
163
|
}
|
|
164
|
+
/** Public-company reference inherited onto an entity member / owner. */
|
|
165
|
+
export interface EntityCompany {
|
|
166
|
+
source: 'sec' | 'gleif';
|
|
167
|
+
source_id: string;
|
|
168
|
+
legal_name?: string;
|
|
169
|
+
ticker: string | null;
|
|
170
|
+
exchange: string | null;
|
|
171
|
+
lei: string | null;
|
|
172
|
+
entity_status: string;
|
|
173
|
+
confidence?: number;
|
|
174
|
+
verified_at?: string | null;
|
|
175
|
+
verified_by?: string | null;
|
|
176
|
+
}
|
|
177
|
+
/** Whitelisted per-member link evidence on an entity-detail member. */
|
|
178
|
+
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. */
|
|
186
|
+
matched_irs?: string[];
|
|
187
|
+
/** matched office-identifier values (office_identifier tier), when present. */
|
|
188
|
+
matched_identifiers?: string[];
|
|
189
|
+
}
|
|
190
|
+
/** A member owner embedded in an entity-detail response. */
|
|
191
|
+
export interface EntityMember {
|
|
192
|
+
id: string;
|
|
193
|
+
object: 'owner';
|
|
194
|
+
name: string;
|
|
195
|
+
canonical_name: string;
|
|
196
|
+
country_code: string | null;
|
|
197
|
+
entity_type: string | null;
|
|
198
|
+
office_code: string | null;
|
|
199
|
+
/** null on a derived singleton's self-member (it was never linked). */
|
|
200
|
+
link: EntityMemberLink | null;
|
|
201
|
+
}
|
|
202
|
+
/** Compact entity in list responses (`GET /v1/entities`). */
|
|
203
|
+
export interface EntitySummary {
|
|
204
|
+
id: string;
|
|
205
|
+
object: 'entity';
|
|
206
|
+
name: string;
|
|
207
|
+
country_code: string | null;
|
|
208
|
+
entity_type: string | null;
|
|
209
|
+
entity_id_type: 'resolved' | 'derived';
|
|
210
|
+
publicly_traded: boolean;
|
|
211
|
+
ticker: string | null;
|
|
212
|
+
lei: string | null;
|
|
213
|
+
trademark_count: number;
|
|
214
|
+
member_count: number;
|
|
215
|
+
}
|
|
216
|
+
/** Full entity detail (`GET /v1/entities/{id}`). Resolved entities embed
|
|
217
|
+
* members[] with link evidence; derived singletons carry a member-of-one. */
|
|
218
|
+
export interface EntityDetail {
|
|
219
|
+
id: string;
|
|
220
|
+
object: 'entity';
|
|
221
|
+
name: string;
|
|
222
|
+
country_code: string | null;
|
|
223
|
+
entity_type: string | null;
|
|
224
|
+
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. */
|
|
228
|
+
publicly_traded: boolean;
|
|
229
|
+
/** Survivorship ticker (first of {@link tickers}); null when none. */
|
|
230
|
+
ticker: string | null;
|
|
231
|
+
/** Deduped uppercased SEC tickers across all member companies. */
|
|
232
|
+
tickers: string[];
|
|
233
|
+
lei: string | null;
|
|
234
|
+
/** Whether any member company carries a GLEIF LEI. */
|
|
235
|
+
has_lei: boolean;
|
|
236
|
+
trademark_count: number;
|
|
237
|
+
member_count: number;
|
|
238
|
+
/** Resolved entities only — the GLEIF parent entity id, when present. */
|
|
239
|
+
parent_entity_id?: string | null;
|
|
240
|
+
members: EntityMember[];
|
|
241
|
+
updated_at: string;
|
|
242
|
+
request_id: string;
|
|
243
|
+
}
|
|
244
|
+
/** A node in an entity's GLEIF family (`GET /v1/entities/{id}/family`). */
|
|
245
|
+
export interface EntityFamilyNode {
|
|
246
|
+
id: string;
|
|
247
|
+
object: 'entity';
|
|
248
|
+
name: string;
|
|
249
|
+
country_code: string | null;
|
|
250
|
+
relationship: 'parent' | 'direct_subsidiary';
|
|
251
|
+
source: 'gleif';
|
|
252
|
+
}
|
|
253
|
+
/** GLEIF-curated direct family (parent + direct children, 1 level). */
|
|
254
|
+
export interface EntityFamily {
|
|
255
|
+
object: 'entity_family';
|
|
256
|
+
parent: EntityFamilyNode | null;
|
|
257
|
+
children: EntityFamilyNode[];
|
|
258
|
+
source: 'gleif';
|
|
259
|
+
coverage_caveat: string;
|
|
260
|
+
request_id: string;
|
|
261
|
+
}
|
|
193
262
|
/** Proceeding in list responses. */
|
|
194
263
|
export type Proceeding = components['schemas']['Proceeding'];
|
|
195
264
|
/** Full proceeding detail with embedded trademark (retrieve response). */
|
|
@@ -212,8 +281,12 @@ export type SearchV2Result = components['schemas']['SearchResultV2'];
|
|
|
212
281
|
export type CrossEntitySuggestion = components['schemas']['CrossEntitySuggestion'];
|
|
213
282
|
/** Goods & services term (Nice classification). */
|
|
214
283
|
export type GoodsServicesTerm = components['schemas']['GoodsServicesTerm'];
|
|
215
|
-
/**
|
|
216
|
-
export type
|
|
284
|
+
/** Single maintenance deadline rule (item in `GET /v1/deadline-rules`). */
|
|
285
|
+
export type DeadlineRule = components['schemas']['DeadlineRule'];
|
|
286
|
+
/** Single opposition window rule (item in `GET /v1/opposition-rules`). */
|
|
287
|
+
export type OppositionRule = components['schemas']['OppositionRule'];
|
|
288
|
+
/** Statutory citation + URL surfaced on rule items. */
|
|
289
|
+
export type RuleSource = components['schemas']['RuleSource'];
|
|
217
290
|
/** Vienna design code. */
|
|
218
291
|
export type DesignCode = components['schemas']['DesignCode'];
|
|
219
292
|
/** Vienna design code with children (retrieve response). */
|
|
@@ -222,6 +295,16 @@ export type DesignCodeDetail = components['schemas']['DesignCodeDetailResponse']
|
|
|
222
295
|
export type Classification = components['schemas']['Classification'];
|
|
223
296
|
/** Nice classification with terms (retrieve response). */
|
|
224
297
|
export type ClassificationDetail = components['schemas']['ClassificationDetailResponse'];
|
|
298
|
+
/** Single accepted goods/services term attached to a suggested class. */
|
|
299
|
+
export type AcceptedTerm = components['schemas']['AcceptedTerm'];
|
|
300
|
+
/** One suggested Nice class in the lighter classification suggestion (no terms). */
|
|
301
|
+
export type ClassificationSuggestionLite = components['schemas']['ClassificationSuggestionLite'];
|
|
302
|
+
/** Full response of `POST /v1/classifications/suggest` — lighter shape (classes only, no accepted terms). */
|
|
303
|
+
export type ClassificationSuggestResult = components['schemas']['ClassificationSuggestionResponse'];
|
|
304
|
+
/** One suggested Nice class with rationale + grounded accepted terms. */
|
|
305
|
+
export type GoodsServicesSuggestionClass = components['schemas']['GoodsServicesSuggestionClass'];
|
|
306
|
+
/** Full response of `POST /v1/goods-services/suggest` — classes with accepted terms per class. */
|
|
307
|
+
export type GoodsServicesSuggestResult = components['schemas']['GoodsServicesSuggestionResponse'];
|
|
225
308
|
/** Trademark office. */
|
|
226
309
|
export type Office = components['schemas']['Office'];
|
|
227
310
|
/** Trademark office with detail (retrieve response). */
|
|
@@ -230,36 +313,448 @@ export type OfficeDetail = components['schemas']['OfficeDetailResponse'];
|
|
|
230
313
|
export type Jurisdiction = components['schemas']['Jurisdiction'];
|
|
231
314
|
/** Jurisdiction with detail (retrieve response). */
|
|
232
315
|
export type JurisdictionDetail = components['schemas']['JurisdictionDetailResponse'];
|
|
233
|
-
/** Canonical status with office mappings. */
|
|
234
|
-
export
|
|
316
|
+
/** Canonical status with office mappings (Phase 2 — manually typed while route is gated). */
|
|
317
|
+
export interface Status {
|
|
318
|
+
object: 'status_mapping';
|
|
319
|
+
office_code: string;
|
|
320
|
+
raw_code: string;
|
|
321
|
+
status_stage: string;
|
|
322
|
+
status_reason: string | null;
|
|
323
|
+
challenge_states: string[];
|
|
324
|
+
status_source: string;
|
|
325
|
+
confidence: number;
|
|
326
|
+
notes: string | null;
|
|
327
|
+
}
|
|
235
328
|
/** Event type code. */
|
|
236
329
|
export type EventType = components['schemas']['EventTypeMapping'];
|
|
237
330
|
/** Portfolio (retrieve response). */
|
|
238
|
-
export
|
|
331
|
+
export interface Portfolio {
|
|
332
|
+
id: string;
|
|
333
|
+
object: 'portfolio';
|
|
334
|
+
name: string;
|
|
335
|
+
description: string | null;
|
|
336
|
+
mark_count: number;
|
|
337
|
+
metadata: Record<string, string> | null;
|
|
338
|
+
created_at: string;
|
|
339
|
+
updated_at: string;
|
|
340
|
+
}
|
|
239
341
|
/** Saved search (retrieve response). */
|
|
240
|
-
export
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
342
|
+
export interface SavedSearch {
|
|
343
|
+
id: string;
|
|
344
|
+
object: 'saved_search';
|
|
345
|
+
name: string;
|
|
346
|
+
description: string | null;
|
|
347
|
+
query: Record<string, unknown>;
|
|
348
|
+
last_executed_at: string | null;
|
|
349
|
+
result_count: number | null;
|
|
350
|
+
metadata: Record<string, string> | null;
|
|
351
|
+
created_at: string;
|
|
352
|
+
updated_at: string;
|
|
353
|
+
}
|
|
354
|
+
/** One of the five watch types (VAL-PRODUCT-001). */
|
|
355
|
+
export type WatchType = 'mark' | 'portfolio' | 'owner' | 'class' | 'similarity';
|
|
356
|
+
/** Delivery cadence. */
|
|
357
|
+
export type WatchDeliveryMode = 'always_per_alert' | 'digest_above_threshold' | 'digest_only';
|
|
358
|
+
/** Watch lifecycle status. */
|
|
359
|
+
export type WatchStatus = 'active' | 'paused' | 'disabled';
|
|
360
|
+
/**
|
|
361
|
+
* Trigger event types — ingestion-emitted fact events a watch can subscribe to.
|
|
362
|
+
*
|
|
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`.
|
|
368
|
+
*/
|
|
369
|
+
export type WatchTriggerEvent = 'trademark.created' | 'trademark.updated' | 'trademark.status_changed';
|
|
370
|
+
/**
|
|
371
|
+
* Watch query DSL (v1). Five watch types share one shape — the
|
|
372
|
+
* `watch_type` selects which scoping field is required, but the body
|
|
373
|
+
* shape is identical to a trademark search body. See the
|
|
374
|
+
* [Watches guide](https://docs.signa.so/guides/monitoring/watches) for
|
|
375
|
+
* the per-type required-field table.
|
|
376
|
+
*
|
|
377
|
+
* `q` is a whitespace-separated keyword list (max 20, each ≥3 chars, no
|
|
378
|
+
* stop words). `filters` accepts the same vocabulary as the trademark
|
|
379
|
+
* 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.
|
|
382
|
+
*
|
|
383
|
+
* Forbidden DSL keys (`function_score`, `script`, `sort`, `cursor`,
|
|
384
|
+
* `aggregations`, `highlight`) are rejected with 400. `query.match` is
|
|
385
|
+
* rejected in ANY form (object or string) — earlier doc revisions described
|
|
386
|
+
* shapes that were never honored by the evaluator. Use `filters.ownerId`,
|
|
387
|
+
* `filters.trademarkIds`, `filters.niceClasses` for scoping and
|
|
388
|
+
* `score_threshold` for similarity precision. Unknown `filters` keys are
|
|
389
|
+
* rejected with 400 listing the allowed vocabulary; `filters.offices`
|
|
390
|
+
* accepts any casing and is stored lowercase.
|
|
391
|
+
*/
|
|
392
|
+
export interface WatchQuery {
|
|
393
|
+
/** Always `"v1"` for monitoring v1. */
|
|
394
|
+
version: 'v1';
|
|
395
|
+
/** Optional keyword query (required for similarity watches). Whitespace-separated; each ≥3 chars; no stop words. */
|
|
396
|
+
q?: string;
|
|
397
|
+
/** Filter object — same vocabulary as the trademark search API. Common keys: `trademarkIds`, `ownerId`, `niceClasses`, `jurisdictions`, `offices`, `statusPrimary`. */
|
|
398
|
+
filters?: Record<string, unknown>;
|
|
399
|
+
/** Restrict alert generation to specific trigger event types. */
|
|
400
|
+
trigger_events?: WatchTriggerEvent[];
|
|
401
|
+
/** Similarity score threshold (0..1). Only matches scoring at-or-above fire alerts. Valid for `watch_type: "similarity"`. */
|
|
402
|
+
score_threshold?: number;
|
|
403
|
+
}
|
|
404
|
+
/** Watch (retrieve / create / update response). */
|
|
405
|
+
export interface Watch {
|
|
406
|
+
id: string;
|
|
407
|
+
object: 'watch';
|
|
408
|
+
name: string;
|
|
409
|
+
watch_type: WatchType;
|
|
410
|
+
query: WatchQuery | Record<string, unknown>;
|
|
411
|
+
delivery_mode: WatchDeliveryMode;
|
|
412
|
+
status: WatchStatus;
|
|
413
|
+
/** Last 24h alert count when retrieving a single watch; null on list responses. */
|
|
414
|
+
alert_count_24h: number | null;
|
|
415
|
+
last_alerted_at: string | null;
|
|
416
|
+
metadata: Record<string, unknown>;
|
|
417
|
+
created_at: string;
|
|
418
|
+
updated_at: string;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Alert event types — what the API actually emits for `Alert.event_type`.
|
|
422
|
+
*
|
|
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.
|
|
433
|
+
*/
|
|
434
|
+
export type AlertEventType = 'trademark.created' | 'trademark.updated' | 'trademark.status_changed';
|
|
435
|
+
/** Alert severity. */
|
|
436
|
+
export type AlertSeverity = 'normal' | 'high' | 'critical';
|
|
437
|
+
/** Opposition-window state for the matched mark, when applicable. */
|
|
438
|
+
export type OppositionWindowStatus = 'open' | 'closing_soon' | 'critical' | 'closed';
|
|
439
|
+
/** Alert (immutable — no PATCH/dismiss in monitoring v1). */
|
|
440
|
+
export interface Alert {
|
|
441
|
+
id: string;
|
|
442
|
+
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;
|
|
459
|
+
}
|
|
460
|
+
/** Webhook event types delivered by the dispatcher. */
|
|
461
|
+
export type WebhookEventType = 'alert.created' | 'webhook.test';
|
|
462
|
+
/**
|
|
463
|
+
* What arrives at a customer webhook endpoint, in the body of the POST
|
|
464
|
+
* (Round 4 R4.5 — TSK-111 monitoring v1).
|
|
465
|
+
*
|
|
466
|
+
* Customers should verify the body with the `webhook-id`, `webhook-timestamp`,
|
|
467
|
+
* and `webhook-signature` headers using a Standard Webhooks library
|
|
468
|
+
* (`standardwebhooks` on npm, `svix-webhooks` for Python, etc.) before
|
|
469
|
+
* trusting `data`.
|
|
470
|
+
*
|
|
471
|
+
* `id` is a prefixed public ID (e.g. `alt_<uuid>` for `alert.created`) — the
|
|
472
|
+
* same value as the `webhook-id` header. `timestamp` is an ISO 8601 UTC
|
|
473
|
+
* instant captured at signing. `data` is the event-specific payload
|
|
474
|
+
* (see {@link AlertCreatedPayload}).
|
|
475
|
+
*/
|
|
476
|
+
export interface WebhookEvent<T = unknown> {
|
|
477
|
+
type: WebhookEventType;
|
|
478
|
+
/** Prefixed event ID — matches the `webhook-id` header. */
|
|
479
|
+
id: string;
|
|
480
|
+
/** ISO 8601 UTC timestamp. */
|
|
481
|
+
timestamp: string;
|
|
482
|
+
data: T;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Inner payload of an `alert.created` webhook delivery.
|
|
486
|
+
*
|
|
487
|
+
* IDs are prefixed (Round 4 R4.5) — `alert_id`, `watch_id`, and
|
|
488
|
+
* `trademark_record_id` feed straight into `GET /v1/alerts/{id}` etc.
|
|
489
|
+
* without conversion.
|
|
490
|
+
*
|
|
491
|
+
* Note the absence of `org_id`: the dispatcher omits it because the
|
|
492
|
+
* customer's webhook endpoint already implies the tenant, and
|
|
493
|
+
* cross-referencing internal tenant UUIDs is not part of the public API.
|
|
494
|
+
*/
|
|
495
|
+
export interface AlertCreatedPayload {
|
|
496
|
+
/** Prefixed alert ID, e.g. `alt_018f...`. */
|
|
497
|
+
alert_id: string;
|
|
498
|
+
/** Prefixed watch ID, e.g. `wat_018f...`. */
|
|
499
|
+
watch_id: string;
|
|
500
|
+
/**
|
|
501
|
+
* Prefixed trademark record ID, e.g. `tm_018f...` — same field name as the
|
|
502
|
+
* REST {@link Alert} resource (`trademark_id`), so webhook and REST
|
|
503
|
+
* consumers can share code. Optional: deliveries emitted before the
|
|
504
|
+
* dual-emit server deploy carry only `trademark_record_id`; prefer
|
|
505
|
+
* `payload.trademark_id ?? payload.trademark_record_id`.
|
|
506
|
+
*/
|
|
507
|
+
trademark_id?: string;
|
|
508
|
+
/**
|
|
509
|
+
* Prefixed trademark record ID, e.g. `tm_018f...`.
|
|
510
|
+
* @deprecated Same value as `trademark_id`. Will be REMOVED in API v1.1 —
|
|
511
|
+
* switch to `trademark_id` (matches the REST Alert resource).
|
|
512
|
+
*/
|
|
513
|
+
trademark_record_id: string;
|
|
514
|
+
event_type: AlertEventType;
|
|
515
|
+
/** Evaluator epoch — bumps via `/replay`. */
|
|
516
|
+
evaluation_epoch: number;
|
|
517
|
+
/** Snapshot of trademark version at evaluation time. */
|
|
518
|
+
content_version: number;
|
|
519
|
+
severity: AlertSeverity;
|
|
520
|
+
/** ISO 8601 UTC deadline for customer action; null when no deadline applies. */
|
|
521
|
+
must_act_by: string | null;
|
|
522
|
+
/** Current opposition-window state for this mark; null when no window applies. */
|
|
523
|
+
opposition_window_status: OppositionWindowStatus | null;
|
|
524
|
+
/** Hash of the source data payload that triggered the alert; null when not available. */
|
|
525
|
+
source_data_hash: string | null;
|
|
526
|
+
}
|
|
527
|
+
/** Webhook envelope for an `alert.created` delivery. */
|
|
528
|
+
export type AlertCreatedEvent = WebhookEvent<AlertCreatedPayload>;
|
|
529
|
+
/** Webhook endpoint status. */
|
|
530
|
+
export type WebhookStatus = 'active' | 'disabled';
|
|
531
|
+
/**
|
|
532
|
+
* Webhook endpoint (`whk_*`).
|
|
533
|
+
*
|
|
534
|
+
* The `secret` field is only present on the response of `webhooks.create()`
|
|
535
|
+
* and `webhooks.rotateSecret()`. List/retrieve responses redact it.
|
|
536
|
+
*/
|
|
537
|
+
/**
|
|
538
|
+
* Reason an endpoint transitioned to `status='disabled'`. Mirrors the
|
|
539
|
+
* `disabled_reason` slug surfaced by the API.
|
|
540
|
+
*
|
|
541
|
+
* `auto_consecutive_100` — dispatcher trigger A (100 consecutive failures)
|
|
542
|
+
* `auto_failure_rate_50_over_50` — dispatcher trigger B (>50% failure rate over 50 attempts)
|
|
543
|
+
* `manual` — PATCH status='disabled' or DELETE
|
|
544
|
+
* `null` — never disabled (or pre-FX3.B history)
|
|
545
|
+
*/
|
|
546
|
+
export type WebhookDisabledReason = 'auto_consecutive_100' | 'auto_failure_rate_50_over_50' | 'manual';
|
|
547
|
+
export interface Webhook {
|
|
548
|
+
id: string;
|
|
549
|
+
object: 'webhook_endpoint';
|
|
550
|
+
url: string;
|
|
551
|
+
description: string | null;
|
|
552
|
+
enabled_events: WebhookEventType[] | string[];
|
|
553
|
+
status: WebhookStatus;
|
|
554
|
+
secret_version: number;
|
|
555
|
+
consecutive_failures: number;
|
|
556
|
+
last_success_at: string | null;
|
|
557
|
+
last_failure_at: string | null;
|
|
558
|
+
/** When the endpoint last transitioned to `status='disabled'`. Null when never disabled. */
|
|
559
|
+
disabled_at: string | null;
|
|
560
|
+
/** Slug explaining the disable; null when never disabled. See {@link WebhookDisabledReason}. */
|
|
561
|
+
disabled_reason: WebhookDisabledReason | string | null;
|
|
562
|
+
metadata: Record<string, unknown>;
|
|
563
|
+
created_at: string;
|
|
564
|
+
updated_at: string;
|
|
565
|
+
/** Plaintext secret. Returned ONLY on create / rotate-secret responses. */
|
|
566
|
+
secret?: string;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Status of a single webhook delivery attempt.
|
|
570
|
+
*
|
|
571
|
+
* Mirrors the `webhook_deliveries_status_check` CHECK constraint in
|
|
572
|
+
* `packages/db/src/schema/enums.ts`. The dispatcher does NOT use a
|
|
573
|
+
* transient `'in_flight'` status — concurrent workers coordinate via
|
|
574
|
+
* `SELECT ... FOR UPDATE SKIP LOCKED` instead (see
|
|
575
|
+
* `workers/webhook-dispatcher/src/dispatcher.ts:988-995`).
|
|
576
|
+
*
|
|
577
|
+
* `pending` — queued or scheduled for retry; not yet a final outcome.
|
|
578
|
+
* `delivered` — receiver returned 2xx.
|
|
579
|
+
* `failed` — last attempt failed but more retries remain.
|
|
580
|
+
* `exhausted` — all 7 attempts failed; replay via /redeliver.
|
|
581
|
+
*/
|
|
582
|
+
export type WebhookDeliveryStatus = 'pending' | 'delivered' | 'failed' | 'exhausted';
|
|
583
|
+
/** A single delivery attempt audit row. */
|
|
584
|
+
export interface WebhookDelivery {
|
|
585
|
+
/** Raw UUID of the attempt row (deliveries are not prefixed-id resources). */
|
|
586
|
+
id: string;
|
|
587
|
+
object: 'webhook_delivery';
|
|
588
|
+
endpoint_id: string;
|
|
589
|
+
alert_id: string | null;
|
|
590
|
+
event_id: string;
|
|
591
|
+
event_type: string;
|
|
592
|
+
attempt: number;
|
|
593
|
+
delivery_attempt_id: string;
|
|
594
|
+
status: WebhookDeliveryStatus | string;
|
|
595
|
+
http_status: number | null;
|
|
596
|
+
response_body: string | null;
|
|
597
|
+
/**
|
|
598
|
+
* TSK-115b: terminal-error reason slug. Examples:
|
|
599
|
+
* `'endpoint_deleted'`, `'endpoint_disabled'`, `'event_unsubscribed'`,
|
|
600
|
+
* `'ssrf_blocked'`, `'non_2xx_500'`. NULL on happy-path delivered rows.
|
|
601
|
+
*/
|
|
602
|
+
error_reason: string | null;
|
|
603
|
+
signature_timestamp: string;
|
|
604
|
+
next_retry_at: string | null;
|
|
605
|
+
delivered_at: string | null;
|
|
606
|
+
created_at: string;
|
|
607
|
+
}
|
|
608
|
+
/** Result of `watches.preview()`. */
|
|
609
|
+
export interface WatchPreviewResponse {
|
|
610
|
+
object: 'watch_preview';
|
|
611
|
+
estimated_match_count: number;
|
|
612
|
+
trial_window_days: number;
|
|
613
|
+
/**
|
|
614
|
+
* Present ONLY when `estimated_match_count` is an upper-bound estimate
|
|
615
|
+
* rather than an exact count. One value, three triggers: the candidacy
|
|
616
|
+
* scan overflowed the server-side cap, search was temporarily
|
|
617
|
+
* unreachable, or the server-side time budget expired after candidates
|
|
618
|
+
* were found (partial result). Absent = exact count.
|
|
619
|
+
*/
|
|
620
|
+
estimate_basis?: 'candidacy_upper_bound';
|
|
621
|
+
request_id: string;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Lease state classification for the per-(watch, office) evaluator lease.
|
|
625
|
+
* Mirrors `LeaseState` in `api/src/services/watch-diagnostics-service.ts`.
|
|
626
|
+
*
|
|
627
|
+
* `held` — evaluator currently holds an active lease (started <15min ago).
|
|
628
|
+
* `released` — no lease, last evaluation completed cleanly.
|
|
629
|
+
* `abandoned` — stale lease awaiting takeover (>15min old).
|
|
630
|
+
* `epoch_raced` — checkpoint observed an evaluation_epoch lag (replay race).
|
|
631
|
+
* `cas_lost` — last release CAS matched 0 rows; another worker won.
|
|
632
|
+
*/
|
|
633
|
+
export type WatchDiagnosticsLeaseState = 'held' | 'released' | 'abandoned' | 'epoch_raced' | 'cas_lost';
|
|
634
|
+
/** Coarse opposition-window status surfaced under `WatchDiagnostics.opposition.window_status`. */
|
|
635
|
+
export type WatchDiagnosticsWindowStatus = 'open' | 'closed' | 'not_started' | 'unknown';
|
|
636
|
+
/**
|
|
637
|
+
* Response shape of `watches.diagnostics(id, { trademarkId })`. The 11-field
|
|
638
|
+
* explainable trace covering candidacy, trigger filter, match outcome,
|
|
639
|
+
* delivery mode, lease state, epoch provenance, opposition citation, and
|
|
640
|
+
* retention windows.
|
|
641
|
+
*
|
|
642
|
+
* Read-only: this endpoint never writes; it surfaces fields the evaluator
|
|
643
|
+
* and dispatchers already persisted. When data has aged out of retention
|
|
644
|
+
* (`data_window.diagnostic_freshness_horizon_days`), fields gracefully
|
|
645
|
+
* degrade to null/false and `reason` surfaces the freshness limit.
|
|
646
|
+
*/
|
|
647
|
+
export interface WatchDiagnostics {
|
|
648
|
+
object?: undefined;
|
|
649
|
+
watch_id: string;
|
|
650
|
+
trademark_id: string;
|
|
651
|
+
office_code: string;
|
|
652
|
+
evaluated: boolean;
|
|
653
|
+
office_in_scope: boolean;
|
|
654
|
+
candidacy_passed: boolean;
|
|
655
|
+
trigger_event_type: string | null;
|
|
656
|
+
trigger_event_in_filter: boolean;
|
|
657
|
+
opensearch_score: number | null;
|
|
658
|
+
score_threshold: number | null;
|
|
659
|
+
alert_fired: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* 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.
|
|
664
|
+
*/
|
|
665
|
+
reason: string;
|
|
666
|
+
delivery_mode_effective: 'per_alert' | 'digest' | null;
|
|
667
|
+
lease_state: WatchDiagnosticsLeaseState | null;
|
|
668
|
+
evaluation_epoch: number;
|
|
669
|
+
/** Alert's frozen `evaluation_epoch` when emitted under a replay-bumped epoch; null otherwise. */
|
|
670
|
+
replay_epoch_origin: number | null;
|
|
671
|
+
last_relevant_sync_run: {
|
|
672
|
+
id: string;
|
|
673
|
+
office_code: string;
|
|
674
|
+
completed_at: string | null;
|
|
675
|
+
search_indexed_at: string | null;
|
|
676
|
+
} | null;
|
|
677
|
+
/** `event_outbox` UUID — cross-reference against the `webhook-id` on delivery audit rows. */
|
|
678
|
+
outbox_event_id: string | null;
|
|
679
|
+
opposition: {
|
|
680
|
+
must_act_by: string | null;
|
|
681
|
+
rule_source: string | null;
|
|
682
|
+
rule_version: string | null;
|
|
683
|
+
window_status: WatchDiagnosticsWindowStatus | null;
|
|
684
|
+
} | null;
|
|
685
|
+
data_window: {
|
|
686
|
+
trademark_changes_retention_days: number;
|
|
687
|
+
outbox_retention_days: number;
|
|
688
|
+
indexing_status_retention_days: number;
|
|
689
|
+
deliveries_retention_days: number;
|
|
690
|
+
alerts_retention_days: number;
|
|
691
|
+
diagnostic_freshness_horizon_days: number;
|
|
692
|
+
};
|
|
693
|
+
request_id: string;
|
|
694
|
+
}
|
|
695
|
+
/** Options for `watches.diagnostics()`. */
|
|
696
|
+
export interface WatchDiagnosticsParams {
|
|
697
|
+
/** Required prefixed trademark ID (`tm_*`). */
|
|
698
|
+
trademarkId: string;
|
|
699
|
+
}
|
|
700
|
+
/** Result of `webhooks.test()`. */
|
|
701
|
+
export interface WebhookTestResponse {
|
|
702
|
+
object: 'webhook_test';
|
|
703
|
+
delivery_attempt_id: string;
|
|
704
|
+
request_id: string;
|
|
705
|
+
}
|
|
706
|
+
/** Result of `webhooks.redeliver()`. */
|
|
707
|
+
export interface WebhookRedeliveryResponse {
|
|
708
|
+
object: 'webhook_redelivery';
|
|
709
|
+
delivery_attempt_id: string;
|
|
710
|
+
request_id: string;
|
|
711
|
+
}
|
|
245
712
|
/** Org-level event list item. */
|
|
246
|
-
export
|
|
713
|
+
export interface OrgEvent {
|
|
714
|
+
id: number;
|
|
715
|
+
object: 'event';
|
|
716
|
+
event_type: string;
|
|
717
|
+
trademark_id: string;
|
|
718
|
+
office_code: string;
|
|
719
|
+
created_at: string;
|
|
720
|
+
}
|
|
247
721
|
/** Org-level event detail (with changes). */
|
|
248
|
-
export
|
|
249
|
-
|
|
722
|
+
export interface OrgEventDetail extends OrgEvent {
|
|
723
|
+
changes: Array<{
|
|
724
|
+
field: string;
|
|
725
|
+
before: unknown;
|
|
726
|
+
after: unknown;
|
|
727
|
+
}>;
|
|
728
|
+
}
|
|
729
|
+
/** Identity (GET /v1/organization/me). */
|
|
250
730
|
export type Identity = components['schemas']['Identity'];
|
|
251
|
-
/** Usage (GET /usage). */
|
|
731
|
+
/** Usage (GET /v1/organization/usage). */
|
|
252
732
|
export type Usage = components['schemas']['Usage'];
|
|
253
733
|
/** API key (list/retrieve). */
|
|
254
734
|
export type ApiKey = components['schemas']['ApiKey'];
|
|
255
735
|
/** API key with the raw key value (returned on create/rotate only). */
|
|
256
736
|
export type ApiKeyWithRawKey = components['schemas']['ApiKeyWithKey'];
|
|
737
|
+
/**
|
|
738
|
+
* Request log list item (GET /v1/organization/logs).
|
|
739
|
+
*
|
|
740
|
+
* Sourced from the inline list-item shape in `RequestLogList.data`. The
|
|
741
|
+
* detail response (`GET /v1/organization/logs/{request_id}`) is represented
|
|
742
|
+
* by `RequestLogDetail` and adds top-level `request_id`.
|
|
743
|
+
*/
|
|
744
|
+
export type RequestLog = components['schemas']['RequestLogList']['data'][number];
|
|
745
|
+
/** Request log detail (GET /v1/organization/logs/{request_id}). */
|
|
746
|
+
export type RequestLogDetail = components['schemas']['RequestLogDetail'];
|
|
747
|
+
/** Usage summary response (GET /v1/organization/usage/summary). */
|
|
748
|
+
export type UsageSummaryResponse = components['schemas']['UsageSummaryResponse'];
|
|
749
|
+
/** Usage summary item (row of `UsageSummaryResponse.data`). */
|
|
750
|
+
export type UsageSummaryItem = components['schemas']['UsageSummaryItem'];
|
|
751
|
+
/** Billing period context on a usage summary response. */
|
|
752
|
+
export type UsageBillingPeriod = components['schemas']['BillingPeriodContext'];
|
|
257
753
|
/** Generic delete confirmation. */
|
|
258
754
|
export interface DeletedResponse {
|
|
259
755
|
id: string;
|
|
260
756
|
object: string;
|
|
261
757
|
deleted: true;
|
|
262
|
-
livemode: boolean;
|
|
263
758
|
request_id: string;
|
|
264
759
|
}
|
|
265
760
|
/** Trademark source provenance (from raw_record_version). */
|
|
@@ -275,8 +770,19 @@ export interface SearchMeta {
|
|
|
275
770
|
search_id: string;
|
|
276
771
|
query: string;
|
|
277
772
|
strategies_used: string[];
|
|
278
|
-
|
|
279
|
-
|
|
773
|
+
/**
|
|
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.
|
|
778
|
+
*/
|
|
779
|
+
total_results?: number;
|
|
780
|
+
/**
|
|
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.
|
|
784
|
+
*/
|
|
785
|
+
total_count_exact?: boolean;
|
|
280
786
|
execution_time_ms: number;
|
|
281
787
|
}
|
|
282
788
|
/** API error body (RFC 9457-inspired). */
|
|
@@ -286,55 +792,127 @@ export interface APIErrorBody {
|
|
|
286
792
|
status: number;
|
|
287
793
|
detail: string;
|
|
288
794
|
instance?: string;
|
|
795
|
+
/**
|
|
796
|
+
* Server's explicit retryability verdict (PLN-119 C6b). When `false` the
|
|
797
|
+
* SDK will NOT auto-retry even on a normally-retryable status (e.g. the
|
|
798
|
+
* preview `504 preview_timeout` envelope — a blind retry re-runs the same
|
|
799
|
+
* over-budget work). Absent on older servers — status-based heuristics
|
|
800
|
+
* apply then.
|
|
801
|
+
*/
|
|
802
|
+
retryable?: boolean;
|
|
803
|
+
/** Server-suggested seconds to wait before retrying (body-level mirror of the Retry-After header). */
|
|
804
|
+
retry_after?: number;
|
|
289
805
|
}
|
|
290
806
|
export interface TrademarkRetrieveParams {
|
|
291
|
-
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
807
|
+
/**
|
|
808
|
+
* Optional relations to embed alongside the trademark detail.
|
|
809
|
+
*
|
|
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.
|
|
814
|
+
*/
|
|
815
|
+
include?: Array<'history'>;
|
|
295
816
|
}
|
|
296
817
|
export interface TrademarkListParams {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
818
|
+
/**
|
|
819
|
+
* Coarse status bucket. Accepts a single value or an array to match any of
|
|
820
|
+
* several values — passing `['active', 'pending']` yields TESS-style "live"
|
|
821
|
+
* results. Valid values: `pending`, `active`, `inactive`, `unknown`.
|
|
822
|
+
*/
|
|
823
|
+
status_primary?: string | string[];
|
|
824
|
+
status_stage?: string | string[];
|
|
825
|
+
status_reason?: string | string[];
|
|
826
|
+
challenge_states?: string | string[];
|
|
827
|
+
mark_feature_type?: string | string[];
|
|
828
|
+
mark_legal_category?: string | string[];
|
|
303
829
|
right_kind?: string;
|
|
304
|
-
|
|
305
|
-
|
|
830
|
+
filing_route?: string | string[];
|
|
831
|
+
scope_kind?: string | string[];
|
|
306
832
|
application_number?: string;
|
|
307
833
|
registration_number?: string;
|
|
308
834
|
ir_number?: string;
|
|
309
835
|
office?: string;
|
|
310
|
-
|
|
311
|
-
|
|
836
|
+
jurisdictions?: string | string[];
|
|
837
|
+
offices?: string | string[];
|
|
312
838
|
owner_country?: string;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
839
|
+
nice_classes?: number | number[];
|
|
840
|
+
vienna_codes?: string | string[];
|
|
841
|
+
filing_date_gte?: string;
|
|
842
|
+
filing_date_gt?: string;
|
|
843
|
+
filing_date_lte?: string;
|
|
844
|
+
filing_date_lt?: string;
|
|
845
|
+
registration_date_gte?: string;
|
|
846
|
+
registration_date_gt?: string;
|
|
847
|
+
registration_date_lte?: string;
|
|
848
|
+
registration_date_lt?: string;
|
|
849
|
+
expiry_date_gte?: string;
|
|
850
|
+
expiry_date_gt?: string;
|
|
851
|
+
expiry_date_lte?: string;
|
|
852
|
+
expiry_date_lt?: string;
|
|
853
|
+
renewal_due_date_gte?: string;
|
|
854
|
+
renewal_due_date_gt?: string;
|
|
855
|
+
renewal_due_date_lte?: string;
|
|
856
|
+
renewal_due_date_lt?: string;
|
|
857
|
+
publication_date_gte?: string;
|
|
858
|
+
publication_date_gt?: string;
|
|
859
|
+
publication_date_lte?: string;
|
|
860
|
+
publication_date_lt?: string;
|
|
861
|
+
termination_date_gte?: string;
|
|
862
|
+
termination_date_gt?: string;
|
|
863
|
+
termination_date_lte?: string;
|
|
864
|
+
termination_date_lt?: string;
|
|
865
|
+
updated_at_gte?: string;
|
|
866
|
+
updated_at_gt?: string;
|
|
867
|
+
updated_at_lte?: string;
|
|
868
|
+
updated_at_lt?: string;
|
|
329
869
|
owner_id?: string;
|
|
330
870
|
owner_name?: string;
|
|
871
|
+
owner_publicly_traded?: boolean;
|
|
872
|
+
owner_has_lei?: boolean;
|
|
873
|
+
owner_ticker?: string;
|
|
874
|
+
owner_lei?: string;
|
|
875
|
+
/**
|
|
876
|
+
* PLN-118 — resolved-entity filter (`ent_*`). The GLOBAL-portfolio feature:
|
|
877
|
+
* returns marks across ALL member owners of the entity (every office). Accepts
|
|
878
|
+
* a derived `ent_<owner-uuid>` (a singleton) too. Over the member cap → 422
|
|
879
|
+
* `entity_too_large`.
|
|
880
|
+
*/
|
|
881
|
+
entity_id?: string;
|
|
882
|
+
/**
|
|
883
|
+
* PLN-118 — entity-GROUP filter (`ent_*`). Returns marks across the whole
|
|
884
|
+
* GLEIF family group (root + all descendants) — "all Pfizer-group marks".
|
|
885
|
+
* Group-level, never identity. Over the union cap → 422 `entity_too_large`.
|
|
886
|
+
*/
|
|
887
|
+
entity_group?: string;
|
|
331
888
|
attorney_id?: string;
|
|
332
889
|
firm_id?: string;
|
|
333
|
-
has_media?:
|
|
334
|
-
has_proceedings?:
|
|
335
|
-
is_madrid?:
|
|
336
|
-
is_retracted?:
|
|
337
|
-
is_series_mark?:
|
|
890
|
+
has_media?: boolean;
|
|
891
|
+
has_proceedings?: boolean;
|
|
892
|
+
is_madrid?: boolean;
|
|
893
|
+
is_retracted?: boolean;
|
|
894
|
+
is_series_mark?: boolean;
|
|
895
|
+
/** Optional text query (triggers relevance ranking when no explicit sort). */
|
|
896
|
+
q?: string;
|
|
897
|
+
/** Search strategies to apply (e.g. 'exact', 'phonetic', 'fuzzy', 'prefix'). */
|
|
898
|
+
strategies?: string[];
|
|
899
|
+
/** Ranking profile to use. */
|
|
900
|
+
ranking_profile?: string;
|
|
901
|
+
/** When true, include total_count in pagination (adds latency). */
|
|
902
|
+
include_total?: boolean;
|
|
903
|
+
/** When true, include match highlight spans. */
|
|
904
|
+
highlights?: boolean;
|
|
905
|
+
/** When true, include execution timing in search_meta. */
|
|
906
|
+
include_timing?: boolean;
|
|
907
|
+
goods_services_text?: string;
|
|
908
|
+
origin_office_code?: string;
|
|
909
|
+
renewal_due_before?: string;
|
|
910
|
+
/**
|
|
911
|
+
* Sort spec. Prefix with `-` for descending. Comma-separated for multi-field.
|
|
912
|
+
* E.g. `-filing_date`, `registration_date`, `-filing_date,office_code`.
|
|
913
|
+
* When `q` is present and no sort is given, results are ranked by relevance.
|
|
914
|
+
* When no `q` and no sort, defaults to `-filing_date`.
|
|
915
|
+
*/
|
|
338
916
|
sort?: string;
|
|
339
917
|
limit?: number;
|
|
340
918
|
cursor?: string;
|
|
@@ -342,8 +920,8 @@ export interface TrademarkListParams {
|
|
|
342
920
|
export interface TrademarkHistoryParams {
|
|
343
921
|
event_type?: string;
|
|
344
922
|
event_scope?: string;
|
|
345
|
-
|
|
346
|
-
|
|
923
|
+
event_date_gte?: string;
|
|
924
|
+
event_date_lt?: string;
|
|
347
925
|
limit?: number;
|
|
348
926
|
cursor?: string;
|
|
349
927
|
}
|
|
@@ -359,9 +937,9 @@ export interface TrademarkRelatedParams {
|
|
|
359
937
|
}
|
|
360
938
|
export interface TrademarkSuggestParams {
|
|
361
939
|
q: string;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
940
|
+
jurisdictions?: string | string[];
|
|
941
|
+
nice_classes?: number | number[];
|
|
942
|
+
status_stage?: string | string[];
|
|
365
943
|
}
|
|
366
944
|
export interface TrademarkCoverageParams {
|
|
367
945
|
protection_status?: string;
|
|
@@ -378,48 +956,196 @@ export interface OwnerRelatedParams {
|
|
|
378
956
|
limit?: number;
|
|
379
957
|
cursor?: string;
|
|
380
958
|
}
|
|
959
|
+
/**
|
|
960
|
+
* Owner detail does not currently accept any query parameters; the server
|
|
961
|
+
* always returns the full detail tier (aliases, identifiers, stats, public
|
|
962
|
+
* companies). This empty params type is reserved for future use.
|
|
963
|
+
*/
|
|
381
964
|
export interface OwnerRetrieveParams {
|
|
382
|
-
|
|
965
|
+
}
|
|
966
|
+
/** Entity detail accepts no query parameters (reserved for future use). */
|
|
967
|
+
export interface EntityRetrieveParams {
|
|
968
|
+
}
|
|
969
|
+
export interface EntityListParams {
|
|
970
|
+
q?: string;
|
|
971
|
+
country_code?: string;
|
|
972
|
+
entity_type?: string;
|
|
973
|
+
publicly_traded?: boolean;
|
|
974
|
+
ticker?: string;
|
|
975
|
+
has_lei?: boolean;
|
|
976
|
+
lei?: string;
|
|
977
|
+
sort?: '-trademark_count' | 'trademark_count' | '-name' | 'name' | '-member_count' | 'member_count';
|
|
978
|
+
include_total?: boolean;
|
|
979
|
+
limit?: number;
|
|
980
|
+
cursor?: string;
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Trademark filters for `GET /v1/entities/{id}/trademarks` — the same
|
|
984
|
+
* Appendix-A filter set as the owner/attorney sub-resources (it runs through
|
|
985
|
+
* the same `listTrademarksViaSearch` path), fanned out across ALL member owners.
|
|
986
|
+
*/
|
|
987
|
+
export type EntityTrademarksParams = OwnerTrademarksParams;
|
|
988
|
+
export interface EntityFamilyParams {
|
|
383
989
|
}
|
|
384
990
|
export interface OwnerListParams {
|
|
385
991
|
q?: string;
|
|
386
992
|
country_code?: string;
|
|
387
993
|
entity_type?: string;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
994
|
+
ticker?: string;
|
|
995
|
+
lei?: string;
|
|
996
|
+
publicly_traded?: boolean;
|
|
997
|
+
has_lei?: boolean;
|
|
998
|
+
sort?: '-trademark_count' | 'trademark_count' | '-registration_rate' | 'registration_rate' | '-latest_filing' | 'latest_filing' | '-name' | 'name';
|
|
999
|
+
include_total?: boolean;
|
|
393
1000
|
limit?: number;
|
|
394
1001
|
cursor?: string;
|
|
395
1002
|
}
|
|
396
1003
|
export interface OwnerTrademarksParams {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
1004
|
+
/**
|
|
1005
|
+
* Coarse status bucket. Accepts a single value or an array to match any of
|
|
1006
|
+
* several values (e.g. `['active', 'pending']` for TESS-style "live" marks).
|
|
1007
|
+
* Valid values: `pending`, `active`, `inactive`, `unknown`.
|
|
1008
|
+
*/
|
|
1009
|
+
status_primary?: string | string[];
|
|
1010
|
+
status_stage?: string | string[];
|
|
1011
|
+
status_reason?: string | string[];
|
|
1012
|
+
challenge_states?: string | string[];
|
|
1013
|
+
mark_feature_type?: string | string[];
|
|
1014
|
+
mark_legal_category?: string | string[];
|
|
1015
|
+
right_kind?: string;
|
|
1016
|
+
filing_route?: string | string[];
|
|
1017
|
+
scope_kind?: string | string[];
|
|
1018
|
+
application_number?: string;
|
|
1019
|
+
registration_number?: string;
|
|
1020
|
+
ir_number?: string;
|
|
1021
|
+
office?: string;
|
|
1022
|
+
jurisdictions?: string | string[];
|
|
1023
|
+
offices?: string | string[];
|
|
1024
|
+
owner_country?: string;
|
|
1025
|
+
nice_classes?: number | number[];
|
|
1026
|
+
vienna_codes?: string | string[];
|
|
1027
|
+
filing_date_gte?: string;
|
|
1028
|
+
filing_date_gt?: string;
|
|
1029
|
+
filing_date_lte?: string;
|
|
1030
|
+
filing_date_lt?: string;
|
|
1031
|
+
registration_date_gte?: string;
|
|
1032
|
+
registration_date_gt?: string;
|
|
1033
|
+
registration_date_lte?: string;
|
|
1034
|
+
registration_date_lt?: string;
|
|
1035
|
+
expiry_date_gte?: string;
|
|
1036
|
+
expiry_date_gt?: string;
|
|
1037
|
+
expiry_date_lte?: string;
|
|
1038
|
+
expiry_date_lt?: string;
|
|
1039
|
+
renewal_due_date_gte?: string;
|
|
1040
|
+
renewal_due_date_gt?: string;
|
|
1041
|
+
renewal_due_date_lte?: string;
|
|
1042
|
+
renewal_due_date_lt?: string;
|
|
1043
|
+
publication_date_gte?: string;
|
|
1044
|
+
publication_date_gt?: string;
|
|
1045
|
+
publication_date_lte?: string;
|
|
1046
|
+
publication_date_lt?: string;
|
|
1047
|
+
termination_date_gte?: string;
|
|
1048
|
+
termination_date_gt?: string;
|
|
1049
|
+
termination_date_lte?: string;
|
|
1050
|
+
termination_date_lt?: string;
|
|
1051
|
+
updated_at_gte?: string;
|
|
1052
|
+
updated_at_gt?: string;
|
|
1053
|
+
updated_at_lte?: string;
|
|
1054
|
+
updated_at_lt?: string;
|
|
1055
|
+
owner_name?: string;
|
|
1056
|
+
owner_publicly_traded?: boolean;
|
|
1057
|
+
owner_has_lei?: boolean;
|
|
1058
|
+
owner_ticker?: string;
|
|
1059
|
+
owner_lei?: string;
|
|
1060
|
+
attorney_id?: string;
|
|
1061
|
+
firm_id?: string;
|
|
1062
|
+
has_media?: boolean;
|
|
1063
|
+
has_proceedings?: boolean;
|
|
1064
|
+
is_madrid?: boolean;
|
|
1065
|
+
is_retracted?: boolean;
|
|
1066
|
+
is_series_mark?: boolean;
|
|
400
1067
|
limit?: number;
|
|
401
1068
|
cursor?: string;
|
|
402
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Attorney detail does not currently accept any query parameters; the server
|
|
1072
|
+
* always returns the full detail tier (aliases, identifiers, scalar stats).
|
|
1073
|
+
* This empty params type is reserved for future use.
|
|
1074
|
+
*/
|
|
403
1075
|
export interface AttorneyRetrieveParams {
|
|
404
|
-
include?: Array<'recent_trademarks' | 'stats' | 'specializations' | 'top_clients' | 'jurisdictions' | 'trend'>;
|
|
405
1076
|
}
|
|
406
1077
|
export interface AttorneyListParams {
|
|
407
1078
|
q?: string;
|
|
408
|
-
firm?: string;
|
|
409
1079
|
firm_id?: string;
|
|
410
1080
|
country_code?: string;
|
|
411
|
-
sort?:
|
|
412
|
-
jurisdiction?: string;
|
|
413
|
-
nice_class?: number;
|
|
414
|
-
active_since?: string;
|
|
415
|
-
min_filings?: number;
|
|
1081
|
+
sort?: '-trademark_count' | 'trademark_count' | '-name' | 'name';
|
|
416
1082
|
limit?: number;
|
|
417
1083
|
cursor?: string;
|
|
418
1084
|
}
|
|
419
1085
|
export interface AttorneyTrademarksParams {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
1086
|
+
/**
|
|
1087
|
+
* Coarse status bucket. Accepts a single value or an array to match any of
|
|
1088
|
+
* several values (e.g. `['active', 'pending']` for TESS-style "live" marks).
|
|
1089
|
+
* Valid values: `pending`, `active`, `inactive`, `unknown`.
|
|
1090
|
+
*/
|
|
1091
|
+
status_primary?: string | string[];
|
|
1092
|
+
status_stage?: string | string[];
|
|
1093
|
+
status_reason?: string | string[];
|
|
1094
|
+
challenge_states?: string | string[];
|
|
1095
|
+
mark_feature_type?: string | string[];
|
|
1096
|
+
mark_legal_category?: string | string[];
|
|
1097
|
+
right_kind?: string;
|
|
1098
|
+
filing_route?: string | string[];
|
|
1099
|
+
scope_kind?: string | string[];
|
|
1100
|
+
application_number?: string;
|
|
1101
|
+
registration_number?: string;
|
|
1102
|
+
ir_number?: string;
|
|
1103
|
+
office?: string;
|
|
1104
|
+
jurisdictions?: string | string[];
|
|
1105
|
+
offices?: string | string[];
|
|
1106
|
+
owner_country?: string;
|
|
1107
|
+
nice_classes?: number | number[];
|
|
1108
|
+
vienna_codes?: string | string[];
|
|
1109
|
+
filing_date_gte?: string;
|
|
1110
|
+
filing_date_gt?: string;
|
|
1111
|
+
filing_date_lte?: string;
|
|
1112
|
+
filing_date_lt?: string;
|
|
1113
|
+
registration_date_gte?: string;
|
|
1114
|
+
registration_date_gt?: string;
|
|
1115
|
+
registration_date_lte?: string;
|
|
1116
|
+
registration_date_lt?: string;
|
|
1117
|
+
expiry_date_gte?: string;
|
|
1118
|
+
expiry_date_gt?: string;
|
|
1119
|
+
expiry_date_lte?: string;
|
|
1120
|
+
expiry_date_lt?: string;
|
|
1121
|
+
renewal_due_date_gte?: string;
|
|
1122
|
+
renewal_due_date_gt?: string;
|
|
1123
|
+
renewal_due_date_lte?: string;
|
|
1124
|
+
renewal_due_date_lt?: string;
|
|
1125
|
+
publication_date_gte?: string;
|
|
1126
|
+
publication_date_gt?: string;
|
|
1127
|
+
publication_date_lte?: string;
|
|
1128
|
+
publication_date_lt?: string;
|
|
1129
|
+
termination_date_gte?: string;
|
|
1130
|
+
termination_date_gt?: string;
|
|
1131
|
+
termination_date_lte?: string;
|
|
1132
|
+
termination_date_lt?: string;
|
|
1133
|
+
updated_at_gte?: string;
|
|
1134
|
+
updated_at_gt?: string;
|
|
1135
|
+
updated_at_lte?: string;
|
|
1136
|
+
updated_at_lt?: string;
|
|
1137
|
+
owner_name?: string;
|
|
1138
|
+
owner_id?: string;
|
|
1139
|
+
owner_publicly_traded?: boolean;
|
|
1140
|
+
owner_has_lei?: boolean;
|
|
1141
|
+
owner_ticker?: string;
|
|
1142
|
+
owner_lei?: string;
|
|
1143
|
+
firm_id?: string;
|
|
1144
|
+
has_media?: boolean;
|
|
1145
|
+
has_proceedings?: boolean;
|
|
1146
|
+
is_madrid?: boolean;
|
|
1147
|
+
is_retracted?: boolean;
|
|
1148
|
+
is_series_mark?: boolean;
|
|
423
1149
|
limit?: number;
|
|
424
1150
|
cursor?: string;
|
|
425
1151
|
}
|
|
@@ -428,53 +1154,145 @@ export interface AttorneyClientsParams {
|
|
|
428
1154
|
cursor?: string;
|
|
429
1155
|
}
|
|
430
1156
|
export interface FirmRetrieveParams {
|
|
431
|
-
include?: Array<'stats' | 'specializations' | '
|
|
1157
|
+
include?: Array<'stats' | 'specializations' | 'jurisdictions' | 'trend' | 'attorneys'>;
|
|
432
1158
|
}
|
|
433
1159
|
export interface FirmListParams {
|
|
434
1160
|
q?: string;
|
|
1161
|
+
country_code?: string;
|
|
435
1162
|
min_attorneys?: number;
|
|
436
1163
|
min_filings?: number;
|
|
437
|
-
|
|
438
|
-
nice_class?: number;
|
|
439
|
-
sort?: string;
|
|
1164
|
+
sort?: '-trademark_count' | 'trademark_count' | '-attorney_count' | 'attorney_count' | '-registration_rate' | 'registration_rate' | '-name' | 'name';
|
|
440
1165
|
limit?: number;
|
|
441
1166
|
cursor?: string;
|
|
442
1167
|
}
|
|
443
1168
|
export interface FirmAttorneysParams {
|
|
444
|
-
sort?: string;
|
|
445
1169
|
limit?: number;
|
|
446
1170
|
cursor?: string;
|
|
447
1171
|
}
|
|
448
1172
|
export interface FirmTrademarksParams {
|
|
449
|
-
|
|
450
|
-
|
|
1173
|
+
/**
|
|
1174
|
+
* Coarse status bucket. Accepts a single value or an array to match any of
|
|
1175
|
+
* several values (e.g. `['active', 'pending']` for TESS-style "live" marks).
|
|
1176
|
+
* Valid values: `pending`, `active`, `inactive`, `unknown`.
|
|
1177
|
+
*/
|
|
1178
|
+
status_primary?: string | string[];
|
|
1179
|
+
status_stage?: string | string[];
|
|
1180
|
+
status_reason?: string | string[];
|
|
1181
|
+
challenge_states?: string | string[];
|
|
1182
|
+
mark_feature_type?: string | string[];
|
|
1183
|
+
mark_legal_category?: string | string[];
|
|
1184
|
+
right_kind?: string;
|
|
1185
|
+
filing_route?: string | string[];
|
|
1186
|
+
scope_kind?: string | string[];
|
|
1187
|
+
application_number?: string;
|
|
1188
|
+
registration_number?: string;
|
|
1189
|
+
ir_number?: string;
|
|
1190
|
+
office?: string;
|
|
1191
|
+
jurisdictions?: string | string[];
|
|
1192
|
+
offices?: string | string[];
|
|
1193
|
+
owner_country?: string;
|
|
1194
|
+
nice_classes?: number | number[];
|
|
1195
|
+
vienna_codes?: string | string[];
|
|
1196
|
+
filing_date_gte?: string;
|
|
1197
|
+
filing_date_gt?: string;
|
|
1198
|
+
filing_date_lte?: string;
|
|
1199
|
+
filing_date_lt?: string;
|
|
1200
|
+
registration_date_gte?: string;
|
|
1201
|
+
registration_date_gt?: string;
|
|
1202
|
+
registration_date_lte?: string;
|
|
1203
|
+
registration_date_lt?: string;
|
|
1204
|
+
expiry_date_gte?: string;
|
|
1205
|
+
expiry_date_gt?: string;
|
|
1206
|
+
expiry_date_lte?: string;
|
|
1207
|
+
expiry_date_lt?: string;
|
|
1208
|
+
renewal_due_date_gte?: string;
|
|
1209
|
+
renewal_due_date_gt?: string;
|
|
1210
|
+
renewal_due_date_lte?: string;
|
|
1211
|
+
renewal_due_date_lt?: string;
|
|
1212
|
+
publication_date_gte?: string;
|
|
1213
|
+
publication_date_gt?: string;
|
|
1214
|
+
publication_date_lte?: string;
|
|
1215
|
+
publication_date_lt?: string;
|
|
1216
|
+
termination_date_gte?: string;
|
|
1217
|
+
termination_date_gt?: string;
|
|
1218
|
+
termination_date_lte?: string;
|
|
1219
|
+
termination_date_lt?: string;
|
|
1220
|
+
updated_at_gte?: string;
|
|
1221
|
+
updated_at_gt?: string;
|
|
1222
|
+
updated_at_lte?: string;
|
|
1223
|
+
updated_at_lt?: string;
|
|
1224
|
+
owner_name?: string;
|
|
1225
|
+
owner_id?: string;
|
|
1226
|
+
owner_publicly_traded?: boolean;
|
|
1227
|
+
owner_has_lei?: boolean;
|
|
1228
|
+
owner_ticker?: string;
|
|
1229
|
+
owner_lei?: string;
|
|
1230
|
+
attorney_id?: string;
|
|
1231
|
+
has_media?: boolean;
|
|
1232
|
+
has_proceedings?: boolean;
|
|
1233
|
+
is_madrid?: boolean;
|
|
1234
|
+
is_retracted?: boolean;
|
|
1235
|
+
is_series_mark?: boolean;
|
|
451
1236
|
limit?: number;
|
|
452
1237
|
cursor?: string;
|
|
453
1238
|
}
|
|
454
1239
|
export interface ProceedingListParams {
|
|
455
1240
|
trademark_id?: string;
|
|
456
|
-
|
|
1241
|
+
proceeding_type?: string;
|
|
457
1242
|
status?: string;
|
|
458
1243
|
q?: string;
|
|
1244
|
+
party_owner_id?: string;
|
|
1245
|
+
party_role?: 'opponent' | 'petitioner' | 'respondent' | 'intervener' | 'other';
|
|
1246
|
+
contested_class?: number;
|
|
459
1247
|
office_code?: string;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
1248
|
+
filed_date_gte?: string;
|
|
1249
|
+
filed_date_lt?: string;
|
|
1250
|
+
decision_date_gte?: string;
|
|
1251
|
+
decision_date_lt?: string;
|
|
1252
|
+
sort?: '-filed_date' | 'filed_date' | '-decided_date' | 'decided_date';
|
|
464
1253
|
limit?: number;
|
|
465
1254
|
cursor?: string;
|
|
466
1255
|
}
|
|
467
1256
|
export interface ClassificationListParams {
|
|
468
1257
|
q?: string;
|
|
469
1258
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
1259
|
+
/**
|
|
1260
|
+
* Request body for `POST /v1/classifications/suggest`.
|
|
1261
|
+
*
|
|
1262
|
+
* Deliberately does not accept `jurisdiction_code`: Nice Classification is a
|
|
1263
|
+
* WIPO international standard, so the 45-class assignment is the same in every
|
|
1264
|
+
* member jurisdiction. For jurisdiction-sensitive term wording, use
|
|
1265
|
+
* {@link GoodsServicesSuggestParams} on `goodsServices.suggest(...)`.
|
|
1266
|
+
*/
|
|
1267
|
+
export interface ClassificationSuggestParams {
|
|
1268
|
+
/** Natural-language business description (3-500 chars). */
|
|
1269
|
+
description: string;
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* POST body for `POST /v1/trademarks` (complex queries with filters, aggregations, strategies).
|
|
1273
|
+
*
|
|
1274
|
+
* This replaces the old `POST /v1/trademarks/search` endpoint.
|
|
1275
|
+
*/
|
|
1276
|
+
export interface DateRangeFilter {
|
|
1277
|
+
gte?: string;
|
|
1278
|
+
gt?: string;
|
|
1279
|
+
lte?: string;
|
|
1280
|
+
lt?: string;
|
|
1281
|
+
}
|
|
1282
|
+
export interface TrademarkSearchBody {
|
|
1283
|
+
/** Optional text query. When omitted, results are filter-only. */
|
|
1284
|
+
query?: string;
|
|
1285
|
+
/** Search strategies (e.g. 'exact', 'phonetic', 'fuzzy', 'prefix'). */
|
|
475
1286
|
strategies?: ('exact' | 'phonetic' | 'fuzzy' | 'prefix')[];
|
|
1287
|
+
/** Ranking profile to use. */
|
|
1288
|
+
ranking_profile?: string;
|
|
476
1289
|
filters?: {
|
|
477
|
-
|
|
1290
|
+
/**
|
|
1291
|
+
* Coarse status bucket. Accepts a single value or an array to match any
|
|
1292
|
+
* of several values (e.g. `['active', 'pending']` for TESS-style "live"
|
|
1293
|
+
* marks). Valid values: `pending`, `active`, `inactive`, `unknown`.
|
|
1294
|
+
*/
|
|
1295
|
+
status_primary?: string | string[];
|
|
478
1296
|
status_stage?: string[];
|
|
479
1297
|
status_reason?: string[];
|
|
480
1298
|
challenge_states?: string[];
|
|
@@ -489,36 +1307,19 @@ export interface SearchV2Body {
|
|
|
489
1307
|
nice_classes?: number[];
|
|
490
1308
|
vienna_codes?: string[];
|
|
491
1309
|
goods_services_text?: string;
|
|
492
|
-
filing_date?:
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
};
|
|
500
|
-
expiry_date?: {
|
|
501
|
-
gte?: string;
|
|
502
|
-
lt?: string;
|
|
503
|
-
};
|
|
504
|
-
renewal_due_date?: {
|
|
505
|
-
gte?: string;
|
|
506
|
-
lt?: string;
|
|
507
|
-
};
|
|
508
|
-
publication_date?: {
|
|
509
|
-
gte?: string;
|
|
510
|
-
lt?: string;
|
|
511
|
-
};
|
|
512
|
-
termination_date?: {
|
|
513
|
-
gte?: string;
|
|
514
|
-
lt?: string;
|
|
515
|
-
};
|
|
516
|
-
updated_at?: {
|
|
517
|
-
gte?: string;
|
|
518
|
-
lt?: string;
|
|
519
|
-
};
|
|
1310
|
+
filing_date?: DateRangeFilter;
|
|
1311
|
+
registration_date?: DateRangeFilter;
|
|
1312
|
+
expiry_date?: DateRangeFilter;
|
|
1313
|
+
renewal_due_date?: DateRangeFilter;
|
|
1314
|
+
publication_date?: DateRangeFilter;
|
|
1315
|
+
termination_date?: DateRangeFilter;
|
|
1316
|
+
updated_at?: DateRangeFilter;
|
|
520
1317
|
owner_id?: string;
|
|
521
1318
|
owner_name?: string;
|
|
1319
|
+
owner_publicly_traded?: boolean;
|
|
1320
|
+
owner_has_lei?: boolean;
|
|
1321
|
+
owner_ticker?: string;
|
|
1322
|
+
owner_lei?: string;
|
|
522
1323
|
attorney_id?: string;
|
|
523
1324
|
firm_id?: string;
|
|
524
1325
|
application_number?: string;
|
|
@@ -535,20 +1336,55 @@ export interface SearchV2Body {
|
|
|
535
1336
|
options?: {
|
|
536
1337
|
aggregations?: ('status_stage' | 'office_code' | 'jurisdiction_code' | 'nice_classes' | 'filing_year' | 'mark_feature_type' | 'mark_legal_category' | 'filing_route' | 'right_kind' | 'scope_kind')[];
|
|
537
1338
|
aggregations_only?: boolean;
|
|
1339
|
+
include_total?: boolean;
|
|
1340
|
+
highlights?: boolean;
|
|
1341
|
+
include_timing?: boolean;
|
|
1342
|
+
include_profile?: boolean;
|
|
538
1343
|
};
|
|
1344
|
+
/**
|
|
1345
|
+
* Sort spec. Prefix with `-` for descending. Comma-separated for multi-field.
|
|
1346
|
+
* When `query` is present and no sort is given, results are ranked by relevance.
|
|
1347
|
+
* When explicit sort is set with `query`, relevance scoring is disabled.
|
|
1348
|
+
*/
|
|
539
1349
|
sort?: string;
|
|
540
1350
|
limit?: number;
|
|
541
1351
|
cursor?: string;
|
|
542
1352
|
}
|
|
1353
|
+
/**
|
|
1354
|
+
* @deprecated Use `TrademarkSearchBody` instead. The `/v1/trademarks/search`
|
|
1355
|
+
* endpoint has been consolidated into `POST /v1/trademarks`.
|
|
1356
|
+
*/
|
|
1357
|
+
export type SearchV2Body = TrademarkSearchBody;
|
|
543
1358
|
export interface CrossEntitySuggestParams {
|
|
544
1359
|
q: string;
|
|
545
1360
|
type?: 'trademark' | 'owner' | 'attorney' | 'firm';
|
|
546
1361
|
}
|
|
547
|
-
|
|
548
|
-
|
|
1362
|
+
/**
|
|
1363
|
+
* Query parameters for `GET /v1/goods-services` (browse/search the accepted
|
|
1364
|
+
* terms catalog). At least one of `q` or `class` must be provided.
|
|
1365
|
+
*/
|
|
1366
|
+
export interface GoodsServicesListParams {
|
|
1367
|
+
/** Substring search across term text (2-200 characters). Optional if `class` is set. */
|
|
1368
|
+
q?: string;
|
|
1369
|
+
/** Nice class number (1-45). Optional if `q` is set. */
|
|
1370
|
+
class?: number;
|
|
549
1371
|
language?: string;
|
|
550
1372
|
harmonised_only?: boolean | null;
|
|
551
1373
|
limit?: number;
|
|
1374
|
+
cursor?: string;
|
|
1375
|
+
}
|
|
1376
|
+
/** Request body for `POST /v1/goods-services/suggest`. */
|
|
1377
|
+
export interface GoodsServicesSuggestParams {
|
|
1378
|
+
/** Natural-language description of goods, services, or business (3-500 chars). */
|
|
1379
|
+
description: string;
|
|
1380
|
+
/** Optional ISO-3166-1 alpha-2 jurisdiction code hint. */
|
|
1381
|
+
jurisdiction_code?: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Optional Nice class (1-45). When set, scopes the response to that
|
|
1384
|
+
* single class — useful for refining wording when the class has already
|
|
1385
|
+
* been chosen.
|
|
1386
|
+
*/
|
|
1387
|
+
class_number?: number;
|
|
552
1388
|
}
|
|
553
1389
|
export interface DesignCodeListParams {
|
|
554
1390
|
q?: string;
|
|
@@ -576,10 +1412,10 @@ export interface PortfolioRetrieveParams {
|
|
|
576
1412
|
limit?: number;
|
|
577
1413
|
cursor?: string;
|
|
578
1414
|
}
|
|
579
|
-
export interface
|
|
1415
|
+
export interface PortfolioAddTrademarksBody {
|
|
580
1416
|
trademark_ids: string[];
|
|
581
1417
|
}
|
|
582
|
-
export interface
|
|
1418
|
+
export interface PortfolioRemoveTrademarksBody {
|
|
583
1419
|
trademark_ids: string[];
|
|
584
1420
|
}
|
|
585
1421
|
export interface PortfolioDeadlineParams {
|
|
@@ -611,53 +1447,114 @@ export interface SavedSearchExecuteParams {
|
|
|
611
1447
|
limit?: number;
|
|
612
1448
|
cursor?: string;
|
|
613
1449
|
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Body for `watches.create(...)`.
|
|
1452
|
+
*
|
|
1453
|
+
* Either `query` or `from_saved_search` (passed via the second-arg
|
|
1454
|
+
* `RequestOptions`-style query — see `WatchCreateOptions`) must be set.
|
|
1455
|
+
*/
|
|
614
1456
|
export interface WatchCreateParams {
|
|
615
1457
|
name: string;
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
1458
|
+
watch_type: WatchType;
|
|
1459
|
+
/** v1 watch query DSL. Required unless hydrating from a saved search. */
|
|
1460
|
+
query?: WatchQuery | Record<string, unknown>;
|
|
1461
|
+
/**
|
|
1462
|
+
* v1 accepts only `'always_per_alert'` — the API rejects the digest modes
|
|
1463
|
+
* with 400 because digest batching is not built yet (planned for v1.1).
|
|
1464
|
+
* The response-side {@link Watch.delivery_mode} stays the wide
|
|
1465
|
+
* {@link WatchDeliveryMode} union for forward compatibility.
|
|
1466
|
+
*/
|
|
1467
|
+
delivery_mode?: 'always_per_alert';
|
|
1468
|
+
metadata?: Record<string, unknown>;
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* Optional query string params for `watches.create(...)`. Pass via the
|
|
1472
|
+
* SDK's `?from_saved_search=ssr_...` query string.
|
|
1473
|
+
*
|
|
1474
|
+
* Note: `backfill_days` was removed — the server rejects it with 400
|
|
1475
|
+
* (`unsupported_in_v1`). Historical replay-from-date arrives in v1.1; in
|
|
1476
|
+
* v1 only future sync_runs trigger evaluation.
|
|
1477
|
+
*/
|
|
1478
|
+
export interface WatchCreateQueryParams {
|
|
1479
|
+
/** Hydrate `query` from a saved search id (`ssr_...`). */
|
|
1480
|
+
from_saved_search?: string;
|
|
623
1481
|
}
|
|
624
1482
|
export interface WatchUpdateParams {
|
|
625
1483
|
name?: string;
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
metadata?: Record<string, string | null>;
|
|
1484
|
+
query?: WatchQuery | Record<string, unknown>;
|
|
1485
|
+
/** v1 accepts only `'always_per_alert'` (digest modes 400 until v1.1) — see {@link WatchCreateParams.delivery_mode}. */
|
|
1486
|
+
delivery_mode?: 'always_per_alert';
|
|
1487
|
+
/** PATCH supports active/paused only — use `pause()` / `resume()` for clarity. */
|
|
1488
|
+
status?: 'active' | 'paused';
|
|
1489
|
+
metadata?: Record<string, unknown>;
|
|
633
1490
|
}
|
|
634
1491
|
export interface WatchListParams {
|
|
635
|
-
status?:
|
|
636
|
-
watch_type?: string;
|
|
637
|
-
sort?: string;
|
|
1492
|
+
status?: WatchStatus;
|
|
638
1493
|
limit?: number;
|
|
639
1494
|
cursor?: string;
|
|
640
1495
|
}
|
|
1496
|
+
/**
|
|
1497
|
+
* Body for `watches.replay(id, body?)` — v1 accepts an EMPTY body only.
|
|
1498
|
+
*
|
|
1499
|
+
* `from_date` (historical replay-from-date) is reserved for v1.1; the server
|
|
1500
|
+
* unconditionally rejects it with 400 whether sent in the body or the query
|
|
1501
|
+
* string. It was removed from this type because it could never succeed.
|
|
1502
|
+
* v1 replay bumps `evaluation_epoch` and re-evaluates from the next
|
|
1503
|
+
* `sync_run.searchable` event forward only.
|
|
1504
|
+
*/
|
|
1505
|
+
export type WatchReplayParams = Record<string, never>;
|
|
1506
|
+
/** Body for `watches.preview(body)`. */
|
|
1507
|
+
export interface WatchPreviewParams {
|
|
1508
|
+
query: WatchQuery | Record<string, unknown>;
|
|
1509
|
+
/** Trial window for the dry-run match count (1..365 days). Default 7. */
|
|
1510
|
+
trial_window_days?: number;
|
|
1511
|
+
}
|
|
1512
|
+
/** Body for `watches.bulk(body)` — up to 100 watches in one call. */
|
|
1513
|
+
export interface WatchBulkParams {
|
|
1514
|
+
watches: WatchCreateParams[];
|
|
1515
|
+
}
|
|
641
1516
|
export interface AlertListParams {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
severity?: 'high' | 'medium' | 'low' | 'info';
|
|
645
|
-
trademark_id?: string;
|
|
646
|
-
event_type?: string;
|
|
647
|
-
sort?: string;
|
|
1517
|
+
severity?: AlertSeverity;
|
|
1518
|
+
event_type?: AlertEventType;
|
|
648
1519
|
limit?: number;
|
|
649
1520
|
cursor?: string;
|
|
650
1521
|
}
|
|
651
|
-
|
|
652
|
-
|
|
1522
|
+
/** Body for `alerts.lookup({ ids })`. Capped at 100 IDs. */
|
|
1523
|
+
export interface AlertLookupParams {
|
|
1524
|
+
ids: string[];
|
|
1525
|
+
}
|
|
1526
|
+
export interface WebhookCreateParams {
|
|
1527
|
+
url: string;
|
|
1528
|
+
description?: string;
|
|
1529
|
+
enabled_events: Array<WebhookEventType | string>;
|
|
1530
|
+
metadata?: Record<string, unknown>;
|
|
1531
|
+
}
|
|
1532
|
+
export interface WebhookUpdateParams {
|
|
1533
|
+
url?: string;
|
|
1534
|
+
description?: string | null;
|
|
1535
|
+
enabled_events?: Array<WebhookEventType | string>;
|
|
1536
|
+
status?: WebhookStatus;
|
|
1537
|
+
metadata?: Record<string, unknown>;
|
|
1538
|
+
}
|
|
1539
|
+
export interface WebhookListParams {
|
|
1540
|
+
limit?: number;
|
|
1541
|
+
cursor?: string;
|
|
653
1542
|
}
|
|
654
|
-
export interface
|
|
655
|
-
|
|
656
|
-
|
|
1543
|
+
export interface WebhookDeliveryListParams {
|
|
1544
|
+
limit?: number;
|
|
1545
|
+
cursor?: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* TSK-115d FX3.C: ISO 8601 timestamp lower bound (inclusive). Only
|
|
1548
|
+
* deliveries with `created_at >= since` are returned. Useful for
|
|
1549
|
+
* incremental polling — set `since = last_seen_created_at` and walk
|
|
1550
|
+
* pages until exhausted. 30-day retention applies regardless of the
|
|
1551
|
+
* `since` value.
|
|
1552
|
+
*/
|
|
1553
|
+
since?: string;
|
|
657
1554
|
}
|
|
658
1555
|
export interface OrgEventListParams {
|
|
659
|
-
|
|
660
|
-
|
|
1556
|
+
event_type?: string | string[];
|
|
1557
|
+
office_code?: string | string[];
|
|
661
1558
|
trademark_id?: string;
|
|
662
1559
|
since?: string;
|
|
663
1560
|
cursor?: string;
|
|
@@ -675,6 +1572,50 @@ export interface ApiKeyUpdateParams {
|
|
|
675
1572
|
expires_at?: string | null;
|
|
676
1573
|
metadata?: Record<string, string | null>;
|
|
677
1574
|
}
|
|
1575
|
+
/**
|
|
1576
|
+
* Query params for `GET /v1/organization/logs`.
|
|
1577
|
+
*
|
|
1578
|
+
* All filters are optional; dates default to the last 24 hours and results
|
|
1579
|
+
* are subject to per-plan retention windows (7/30/90 days).
|
|
1580
|
+
*/
|
|
1581
|
+
export interface LogListParams {
|
|
1582
|
+
/** Start of date range (ISO 8601, YYYY-MM-DD or full datetime). */
|
|
1583
|
+
start_date?: string;
|
|
1584
|
+
/** End of date range (ISO 8601). */
|
|
1585
|
+
end_date?: string;
|
|
1586
|
+
/** Alias for `start_date`. */
|
|
1587
|
+
from?: string;
|
|
1588
|
+
/** Alias for `end_date`. */
|
|
1589
|
+
to?: string;
|
|
1590
|
+
/** Filter by HTTP status code (100-599). */
|
|
1591
|
+
status_code?: number;
|
|
1592
|
+
/**
|
|
1593
|
+
* Filter by outcome: `true` returns succeeded requests (status < 400),
|
|
1594
|
+
* `false` returns failed requests (status >= 400).
|
|
1595
|
+
*/
|
|
1596
|
+
success?: boolean;
|
|
1597
|
+
/** Filter by HTTP method (GET, POST, etc.). */
|
|
1598
|
+
method?: string;
|
|
1599
|
+
/** Filter by API key ID (key_...). */
|
|
1600
|
+
api_key_id?: string;
|
|
1601
|
+
/** Filter by endpoint type (search, read, monitoring, screening, clearance, check, image_search, export, reference, utility). */
|
|
1602
|
+
endpoint_type?: string;
|
|
1603
|
+
/** Case-insensitive substring match against path or request ID. */
|
|
1604
|
+
search?: string;
|
|
1605
|
+
cursor?: string;
|
|
1606
|
+
limit?: number;
|
|
1607
|
+
}
|
|
1608
|
+
/** Query params for `GET /v1/organization/usage/summary`. */
|
|
1609
|
+
export interface UsageSummaryParams {
|
|
1610
|
+
/** Start of date range (YYYY-MM-DD). Required. */
|
|
1611
|
+
start_date: string;
|
|
1612
|
+
/** End of date range (YYYY-MM-DD), inclusive. Required. */
|
|
1613
|
+
end_date: string;
|
|
1614
|
+
/** Grouping dimension. Defaults to `day`. */
|
|
1615
|
+
group_by?: 'day' | 'endpoint_type' | 'api_key';
|
|
1616
|
+
/** Restrict summary to a specific endpoint type. */
|
|
1617
|
+
endpoint_type?: string;
|
|
1618
|
+
}
|
|
678
1619
|
/** Per-request overrides. Accepted as the last argument on every method. */
|
|
679
1620
|
export interface RequestOptions {
|
|
680
1621
|
/** Request timeout in ms. Overrides client default. */
|
|
@@ -700,6 +1641,15 @@ export interface ClientOptions {
|
|
|
700
1641
|
debug?: boolean;
|
|
701
1642
|
/** Custom fetch implementation (for testing or platform overrides). */
|
|
702
1643
|
fetch?: typeof globalThis.fetch;
|
|
1644
|
+
/**
|
|
1645
|
+
* Silence the browser-use warning. By default, constructing the SDK in an
|
|
1646
|
+
* environment where `window` is defined emits a `console.warn` because
|
|
1647
|
+
* Signa API keys are long-lived secrets that do not belong in client-side
|
|
1648
|
+
* code. Set this to `true` (or the `SIGNA_ALLOW_BROWSER=1` env var) if you
|
|
1649
|
+
* understand the exposure and are intentionally using the SDK in a
|
|
1650
|
+
* trusted browser context. Default: `false`.
|
|
1651
|
+
*/
|
|
1652
|
+
allowBrowser?: boolean;
|
|
703
1653
|
}
|
|
704
1654
|
/** API list response shape (before SDK wraps it as SignaList). */
|
|
705
1655
|
export interface ListResponseBody<T> {
|