@bisibility/sdk 0.1.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.
@@ -0,0 +1,793 @@
1
+ export type Device = "desktop" | "mobile";
2
+ export type RankCheckFrequency = "paused" | "manual" | "daily" | "weekly" | "custom_cron";
3
+ export type JsonObject = Record<string, unknown>;
4
+ export type RequestHeaders = HeadersInit;
5
+ export interface ProblemDetails {
6
+ detail?: string;
7
+ docs_url?: string;
8
+ errors?: unknown;
9
+ instance?: string;
10
+ status?: number;
11
+ title?: string;
12
+ type?: string;
13
+ }
14
+ export interface ListMeta {
15
+ next_cursor: string | null;
16
+ [key: string]: unknown;
17
+ }
18
+ export interface ListResponse<T> {
19
+ data: T[];
20
+ meta: ListMeta;
21
+ }
22
+ export interface DataResponse<T> {
23
+ data: T;
24
+ meta?: JsonObject;
25
+ }
26
+ export interface PaginationOptions {
27
+ cursor?: string;
28
+ limit?: number;
29
+ }
30
+ export type ProjectWriteMode = "active" | "migration_hold";
31
+ export interface Project {
32
+ created_at: string;
33
+ domain: string;
34
+ id: string;
35
+ name: string;
36
+ updated_at: string;
37
+ write_mode: ProjectWriteMode;
38
+ }
39
+ export interface UpdateProjectInput {
40
+ domain?: string;
41
+ name?: string;
42
+ }
43
+ export interface ProjectDefaults {
44
+ auto_schedule: boolean;
45
+ city: string | null;
46
+ country: string;
47
+ cron_expression: string | null;
48
+ device: Device;
49
+ frequency: RankCheckFrequency;
50
+ jitter_minutes: number;
51
+ last_checked_at: string | null;
52
+ location_key: string;
53
+ next_check_at: string | null;
54
+ project_id: string;
55
+ timezone: string;
56
+ updated_at: string | null;
57
+ }
58
+ export interface ProjectDefaultsPatch {
59
+ auto_schedule?: boolean;
60
+ city?: string | null;
61
+ country?: string;
62
+ cron_expression?: string | null;
63
+ device?: Device;
64
+ frequency?: RankCheckFrequency;
65
+ jitter_minutes?: number;
66
+ location_key?: string;
67
+ timezone?: string;
68
+ }
69
+ export type TrackingScope = "city" | "country";
70
+ export interface CreateProjectInput {
71
+ /** Initial rank-check schedule defaults for the project. */
72
+ defaults?: ProjectDefaultsPatch;
73
+ domain: string;
74
+ name: string;
75
+ /** Location granularity for rank tracking. Defaults to "country" on the server. */
76
+ trackingScope?: TrackingScope;
77
+ }
78
+ export interface ApiKey {
79
+ created_at: string;
80
+ id: string;
81
+ last_used_at: string | null;
82
+ name: string;
83
+ prefix: string;
84
+ revoked_at: string | null;
85
+ }
86
+ export interface CreatedApiKey extends ApiKey {
87
+ masked_value: string;
88
+ token: string;
89
+ }
90
+ export type MembershipRole = "admin" | "auditor" | "member" | "owner" | "viewer";
91
+ export interface MeProject {
92
+ domain: string;
93
+ id: string;
94
+ name: string;
95
+ role: MembershipRole;
96
+ }
97
+ export interface Me {
98
+ email: string;
99
+ id: string;
100
+ name: string;
101
+ projects: MeProject[];
102
+ }
103
+ export interface UpdateMeInput {
104
+ name: string;
105
+ }
106
+ export type PersonalAccessTokenScope = "admin" | "read" | "write";
107
+ export interface PersonalAccessToken {
108
+ created_at: string;
109
+ expires_at: string | null;
110
+ id: string;
111
+ last_used_at: string | null;
112
+ name: string;
113
+ prefix: string;
114
+ revoked_at: string | null;
115
+ scope: PersonalAccessTokenScope;
116
+ }
117
+ export interface CreatedPersonalAccessToken extends PersonalAccessToken {
118
+ masked_value: string;
119
+ token: string;
120
+ }
121
+ export interface CreateMyTokenInput {
122
+ /** Days until the token expires, or null for no expiry. Defaults to null. */
123
+ expiresInDays?: 30 | 90 | 365 | null;
124
+ name: string;
125
+ /** Token scope. Defaults to "read" on the server. */
126
+ scope?: PersonalAccessTokenScope;
127
+ }
128
+ export interface Webhook {
129
+ created_at: string;
130
+ description: string | null;
131
+ enabled: boolean;
132
+ id: string;
133
+ last_delivery_at: string | null;
134
+ updated_at: string;
135
+ url: string;
136
+ }
137
+ export interface CreateWebhookInput {
138
+ description?: string | null;
139
+ enabled?: boolean;
140
+ /** HMAC signing secret (minimum 16 characters). Write-only; never returned by the API. */
141
+ hmac_secret: string;
142
+ url: string;
143
+ }
144
+ export interface UpdateWebhookInput {
145
+ description?: string | null;
146
+ enabled?: boolean;
147
+ /** HMAC signing secret (minimum 16 characters). Write-only; never returned by the API. */
148
+ hmac_secret?: string;
149
+ url?: string;
150
+ }
151
+ export interface KeywordSchedule {
152
+ auto_schedule: boolean;
153
+ cron_expression: string | null;
154
+ frequency: RankCheckFrequency;
155
+ jitter_minutes: number;
156
+ last_checked_at: string | null;
157
+ next_check_at: string | null;
158
+ timezone: string;
159
+ }
160
+ export interface Keyword {
161
+ country: string;
162
+ created_at: string;
163
+ device: Device;
164
+ id: string;
165
+ intent: string | null;
166
+ latest_position: number | null;
167
+ location: string;
168
+ previous_position: number | null;
169
+ project_id: string;
170
+ ranking_url: string | null;
171
+ schedule: KeywordSchedule | null;
172
+ tags: string[];
173
+ target_url: string | null;
174
+ text: string;
175
+ topic: string | null;
176
+ updated_at: string;
177
+ }
178
+ export interface KeywordScheduleInput {
179
+ autoSchedule?: boolean;
180
+ cronExpression: string | null;
181
+ frequency: RankCheckFrequency;
182
+ jitterMinutes?: number;
183
+ timezone?: string;
184
+ }
185
+ export interface CreateKeywordInput {
186
+ city?: string | null;
187
+ country?: string;
188
+ device?: Device;
189
+ intent?: string | null;
190
+ keyword: string;
191
+ location?: string;
192
+ location_key?: string;
193
+ schedule?: KeywordScheduleInput;
194
+ tags?: readonly string[];
195
+ target_url?: string | null;
196
+ topic?: string | null;
197
+ }
198
+ export type CreateKeywordItem = string | CreateKeywordInput;
199
+ export type CreateKeywordsInput = CreateKeywordInput | readonly CreateKeywordInput[] | {
200
+ keywords: readonly CreateKeywordItem[];
201
+ };
202
+ type OpenString<T extends string> = T | (string & Record<never, never>);
203
+ export interface CreateKeywordResult {
204
+ keyword: Keyword;
205
+ status: OpenString<"created" | "skipped">;
206
+ warning?: string;
207
+ }
208
+ export interface CreateKeywordsResponse {
209
+ created: number;
210
+ results: CreateKeywordResult[];
211
+ skipped: number;
212
+ warnings?: string[];
213
+ }
214
+ export interface UpdateKeywordInput {
215
+ city?: string | null;
216
+ country?: string;
217
+ device?: Device;
218
+ frequency?: RankCheckFrequency;
219
+ intent?: string | null;
220
+ keyword?: string;
221
+ location?: string;
222
+ location_key?: string;
223
+ schedule?: KeywordScheduleInput;
224
+ tags?: readonly string[];
225
+ target_url?: string | null;
226
+ topic?: string | null;
227
+ }
228
+ export type KeywordBulkOperation = "add_tags" | "delete" | "remove_tags" | "set_frequency" | "set_target_url";
229
+ export type KeywordBulkInput = {
230
+ keyword_ids: readonly string[];
231
+ operation: "add_tags" | "remove_tags";
232
+ tags: readonly string[];
233
+ } | {
234
+ keyword_ids: readonly string[];
235
+ operation: "delete";
236
+ } | {
237
+ keyword_ids: readonly string[];
238
+ operation: "set_frequency";
239
+ frequency?: RankCheckFrequency;
240
+ schedule?: KeywordScheduleInput;
241
+ } | {
242
+ keyword_ids: readonly string[];
243
+ operation: "set_target_url";
244
+ target_url?: string | null;
245
+ };
246
+ export interface KeywordBulkItemResult {
247
+ keyword_id: string;
248
+ status: OpenString<"deleted" | "not_found" | "updated">;
249
+ }
250
+ export interface KeywordBulkResponse {
251
+ operation: KeywordBulkOperation;
252
+ results: KeywordBulkItemResult[];
253
+ }
254
+ export interface ListKeywordsOptions extends PaginationOptions {
255
+ country?: string;
256
+ device?: Device;
257
+ intent?: string;
258
+ positionGt?: number;
259
+ positionLt?: number;
260
+ search?: string;
261
+ sort?: "created_at" | "-created_at" | "keyword" | "-keyword" | "text" | "-text" | "updated_at" | "-updated_at";
262
+ tag?: string;
263
+ topic?: string;
264
+ }
265
+ export type RankCheckStatus = "completed" | "failed" | "running";
266
+ export interface RankCheckAttempt {
267
+ message: string;
268
+ provider: string;
269
+ }
270
+ export interface RankCheck {
271
+ attempts: RankCheckAttempt[] | null;
272
+ checked_at: string;
273
+ cost_cents: number | null;
274
+ error: string | null;
275
+ id: string;
276
+ keyword_id: string;
277
+ position: number | null;
278
+ previous_position: number | null;
279
+ provider: string;
280
+ ranking_url: string | null;
281
+ status: RankCheckStatus;
282
+ }
283
+ export interface ListRankChecksOptions extends PaginationOptions {
284
+ since?: Date | string;
285
+ status?: RankCheckStatus;
286
+ until?: Date | string;
287
+ }
288
+ export interface RunRankCheckInput {
289
+ provider_id?: ProviderId;
290
+ }
291
+ export interface RunRankCheckOptions extends RequestOptions {
292
+ async?: boolean;
293
+ }
294
+ export type AlertConditionType = "change_pct" | "competitor_overtake" | "enters_top_n" | "exits_top_n" | "serp_feature" | "threshold";
295
+ export type AlertChannel = "email" | "slack" | "webhook";
296
+ export type AlertTargetType = "all" | "keyword" | "tag";
297
+ export type AlertSeverity = "info" | "urgent" | "warning";
298
+ export interface AlertRuleTarget {
299
+ created_at?: string;
300
+ id: string;
301
+ keyword_id?: string | null;
302
+ rule_id?: string;
303
+ tag_id?: string | null;
304
+ updated_at?: string;
305
+ }
306
+ export interface AlertRule {
307
+ change_pct?: number | string | null;
308
+ channel?: string;
309
+ channels: AlertChannel[];
310
+ condition?: string;
311
+ condition_type: AlertConditionType;
312
+ competitor_domain?: string | null;
313
+ created_at?: string;
314
+ created_by_id?: string | null;
315
+ enabled: boolean;
316
+ fires?: string;
317
+ id: string;
318
+ name: string;
319
+ period?: string;
320
+ project_id?: string;
321
+ scope?: string;
322
+ serp_feature?: string | null;
323
+ severity?: AlertSeverity;
324
+ status?: OpenString<"active" | "paused">;
325
+ target_ids?: string[];
326
+ target_type: AlertTargetType;
327
+ targets?: AlertRuleTarget[];
328
+ threshold_position?: number | null;
329
+ top_n?: number | null;
330
+ updated_at?: string;
331
+ }
332
+ export interface AlertRuleInput {
333
+ change_pct?: number | null;
334
+ channels?: readonly AlertChannel[];
335
+ condition_type: AlertConditionType;
336
+ competitor_domain?: string | null;
337
+ enabled?: boolean;
338
+ name: string;
339
+ serp_feature?: string | null;
340
+ target_ids?: readonly string[];
341
+ target_type?: AlertTargetType;
342
+ threshold_position?: number | null;
343
+ top_n?: number | null;
344
+ }
345
+ export type CreateAlertRuleInput = AlertRuleInput;
346
+ export type UpdateAlertRuleInput = AlertRuleInput;
347
+ export interface DeleteAlertRuleResponse {
348
+ deleted: boolean;
349
+ }
350
+ export interface TriggeredAlert {
351
+ action: string;
352
+ ctas: string[];
353
+ current: string;
354
+ headline: string;
355
+ id: string;
356
+ keyword: string;
357
+ previous: string;
358
+ rule: string;
359
+ severity: AlertSeverity;
360
+ unread: boolean;
361
+ when: string;
362
+ }
363
+ export type TeamRole = "admin" | "member" | "owner" | "viewer";
364
+ export type TeamRoleLabel = "Admin" | "Editor" | "Owner" | "Viewer";
365
+ export interface TeamMember {
366
+ color: OpenString<"accent" | "blue" | "purple">;
367
+ email: string;
368
+ id: string;
369
+ initials: string;
370
+ name: string;
371
+ role: TeamRoleLabel;
372
+ role_value: TeamRole;
373
+ }
374
+ export interface TeamInvite {
375
+ email: string;
376
+ expires_label: string;
377
+ id: string;
378
+ invited_label: string;
379
+ role: TeamRoleLabel;
380
+ role_value: Exclude<TeamRole, "owner">;
381
+ }
382
+ export interface CreateTeamInviteInput {
383
+ email: string;
384
+ role: Exclude<TeamRole, "owner">;
385
+ }
386
+ export interface CreatedTeamInvite {
387
+ expires_at: string;
388
+ id: string;
389
+ invite_link: string;
390
+ }
391
+ export interface RevokedTeamInvite {
392
+ id: string;
393
+ }
394
+ export type ProviderId = "dataforseo" | "ga4" | "gsc" | "plausible" | "serpapi";
395
+ export type ProviderKind = "analytics" | "enrichment" | "serp";
396
+ export type ProviderStatus = OpenString<"connected" | "optional" | "planned" | "ready">;
397
+ export type ProviderIconName = "chart" | "database" | "globe" | "link" | "magnifier" | "table" | "trend";
398
+ export interface ProviderMetaRow {
399
+ label: string;
400
+ value: string;
401
+ }
402
+ export interface ProviderCredentialField {
403
+ label: string;
404
+ name: OpenString<"login" | "secret">;
405
+ placeholder: string;
406
+ type?: OpenString<"password" | "text">;
407
+ }
408
+ export interface ProviderDrawerDefaults {
409
+ cost_per_check: number;
410
+ depth: string;
411
+ device: string;
412
+ enabled?: boolean;
413
+ language: string;
414
+ location: string;
415
+ login: string;
416
+ primary: boolean;
417
+ priority?: number;
418
+ secret: string;
419
+ }
420
+ export interface ProviderDrawer {
421
+ activities: ProviderMetaRow[];
422
+ cost_help: string;
423
+ credential_fields: ProviderCredentialField[];
424
+ defaults: ProviderDrawerDefaults;
425
+ env_hint: string;
426
+ primary_toggle_label: string;
427
+ }
428
+ export interface Provider {
429
+ category_id: string;
430
+ category_title: string;
431
+ description: string;
432
+ drawer: ProviderDrawer;
433
+ enabled?: boolean;
434
+ icon: ProviderIconName;
435
+ id: OpenString<ProviderId>;
436
+ logo_domain?: string;
437
+ meta: ProviderMetaRow[];
438
+ name: string;
439
+ primary?: boolean;
440
+ priority?: number;
441
+ secondary_action?: string;
442
+ status: ProviderStatus;
443
+ tint: string;
444
+ }
445
+ export interface ProviderCredentialsInput {
446
+ api_key?: string;
447
+ endpoint?: string;
448
+ login?: string;
449
+ secret?: string;
450
+ }
451
+ export interface ConnectProviderInput {
452
+ cost_per_check?: number;
453
+ credentials?: ProviderCredentialsInput;
454
+ enabled?: boolean;
455
+ login?: string;
456
+ primary?: boolean;
457
+ priority?: number;
458
+ secret?: string;
459
+ }
460
+ export interface TestProviderConnectionInput {
461
+ credentials?: ProviderCredentialsInput;
462
+ login?: string;
463
+ secret?: string;
464
+ }
465
+ export interface ProviderSettingsInput {
466
+ enabled?: boolean;
467
+ primary?: boolean;
468
+ priority?: number;
469
+ }
470
+ export interface ProviderConnection {
471
+ cost_per_check_cents: number | string | null;
472
+ created_at: string;
473
+ credentials_hash?: string | null;
474
+ enabled: boolean;
475
+ id: string;
476
+ is_primary: boolean;
477
+ kind: ProviderKind;
478
+ last_used_at: string | null;
479
+ priority: number;
480
+ project_id: string;
481
+ provider: OpenString<ProviderId>;
482
+ status: ProviderStatus;
483
+ updated_at: string;
484
+ }
485
+ export interface ProviderTestResult {
486
+ balance?: number;
487
+ message: string;
488
+ ok: boolean;
489
+ }
490
+ export interface ProviderDisconnectResponse {
491
+ ok: boolean;
492
+ }
493
+ export type SavedViewFilterChange = "any" | "down" | "lost" | "new" | "up";
494
+ export type SavedViewFilterCountry = "all" | "de" | "gb" | "pl" | "us";
495
+ export type SavedViewFilterDevice = "all" | Device;
496
+ export type SavedViewPositionFilter = "11-50" | "51-100" | "top10" | "top3";
497
+ export type SavedViewSerpFilter = "ai" | "featured" | "image" | "paa" | "sitelinks" | "video";
498
+ export interface SavedViewFilters {
499
+ change: SavedViewFilterChange;
500
+ contains: string;
501
+ country: SavedViewFilterCountry;
502
+ device: SavedViewFilterDevice;
503
+ position: SavedViewPositionFilter[];
504
+ serp: SavedViewSerpFilter[];
505
+ tags: string[];
506
+ vol_max: number;
507
+ vol_min: number;
508
+ wrong_url: boolean;
509
+ }
510
+ export interface SavedViewConfig {
511
+ filters: SavedViewFilters;
512
+ search: string;
513
+ }
514
+ export interface CreateSavedViewInput {
515
+ config: SavedViewConfig;
516
+ name: string;
517
+ }
518
+ export interface SavedView {
519
+ config: SavedViewConfig;
520
+ created_at: string;
521
+ created_by_id: string | null;
522
+ id: string;
523
+ name: string;
524
+ }
525
+ export interface DeleteSavedViewResponse {
526
+ deleted: boolean;
527
+ }
528
+ export interface Competitor {
529
+ domain: string;
530
+ id: string;
531
+ initials?: string;
532
+ label: string | null;
533
+ }
534
+ export interface AddCompetitorInput {
535
+ domain: string;
536
+ label?: string;
537
+ }
538
+ export interface RemoveCompetitorResponse {
539
+ removed: boolean;
540
+ }
541
+ export type CompetitorKind = "Managed" | "You";
542
+ export interface CompetitorColumn {
543
+ domain: string;
544
+ id?: string;
545
+ kind: CompetitorKind;
546
+ label: string;
547
+ }
548
+ export interface CompetitorShare {
549
+ color: string;
550
+ domain: string;
551
+ id?: string;
552
+ initials: string;
553
+ kind: CompetitorKind;
554
+ label: string;
555
+ share_of_voice: number;
556
+ shared_keywords: number;
557
+ }
558
+ export interface HeadToHeadRow {
559
+ gap: number | null;
560
+ keyword: string;
561
+ ranks: Record<string, number | null>;
562
+ }
563
+ export interface CompetitorMarket {
564
+ checked_keyword_count: number;
565
+ columns: CompetitorColumn[];
566
+ competitor_count: number;
567
+ country: string;
568
+ device: string;
569
+ engine: string;
570
+ has_rank_data: boolean;
571
+ key: string;
572
+ rows: HeadToHeadRow[];
573
+ shares: CompetitorShare[];
574
+ shared_keyword_count: number;
575
+ tracked_keyword_count: number;
576
+ }
577
+ export interface SuggestedCompetitor {
578
+ domain: string;
579
+ initials: string;
580
+ overlap: number;
581
+ }
582
+ export interface CompetitorListMeta extends ListMeta {
583
+ markets: CompetitorMarket[];
584
+ suggestions: SuggestedCompetitor[];
585
+ }
586
+ export interface CompetitorListResponse extends ListResponse<Competitor> {
587
+ meta: CompetitorListMeta;
588
+ }
589
+ export interface NotificationPreferences {
590
+ alert_email: boolean;
591
+ alert_in_app: boolean;
592
+ alert_slack: boolean;
593
+ alert_webhook: boolean;
594
+ check_email: boolean;
595
+ check_in_app: boolean;
596
+ email?: string;
597
+ email_verification?: "unverified" | "verified";
598
+ import_email: boolean;
599
+ import_in_app: boolean;
600
+ invite_email: boolean;
601
+ invite_in_app: boolean;
602
+ project_id: string;
603
+ slack_available?: boolean;
604
+ webhook_available?: boolean;
605
+ }
606
+ export type UpdateNotificationPreferencesInput = Partial<Pick<NotificationPreferences, "alert_email" | "alert_in_app" | "alert_slack" | "alert_webhook" | "check_email" | "check_in_app" | "import_email" | "import_in_app" | "invite_email" | "invite_in_app">>;
607
+ export type MigrationScope = "full" | "keywords";
608
+ export type CloudImportState = "done" | "failed" | "idle" | "importing" | "receiving";
609
+ export interface CloudImportJob {
610
+ counts: unknown;
611
+ created_at: string | null;
612
+ error: string | null;
613
+ finished_at: string | null;
614
+ id: string | null;
615
+ progress: number;
616
+ started_at: string | null;
617
+ state: CloudImportState;
618
+ }
619
+ export interface ActiveMigrationToken {
620
+ created_at: string;
621
+ created_by?: {
622
+ email: string;
623
+ name: string;
624
+ };
625
+ expires_at: string;
626
+ id: string;
627
+ scope: MigrationScope;
628
+ single_use: boolean;
629
+ }
630
+ export interface IssuedMigrationToken extends ActiveMigrationToken {
631
+ import_job: CloudImportJob;
632
+ token: string;
633
+ }
634
+ export interface MintMigrationTokenInput {
635
+ scope?: MigrationScope;
636
+ }
637
+ export interface RevokedMigrationToken {
638
+ id: string;
639
+ revoked_at: string;
640
+ }
641
+ export interface MigrationTokenListMeta extends ListMeta {
642
+ import_job: CloudImportJob;
643
+ }
644
+ export interface MigrationTokenListResponse extends ListResponse<ActiveMigrationToken> {
645
+ meta: MigrationTokenListMeta;
646
+ }
647
+ export type SignalSource = "api" | "cms" | "deploy" | "manual" | "rank_tracker" | "search_analytics" | "search_engine_status" | "sitemap" | "url_inspection";
648
+ export type CreateSignalSource = "api" | "cms" | "deploy";
649
+ export type SignalSeverity = "critical" | "info" | "warning";
650
+ export interface Signal {
651
+ created_at: string;
652
+ happened_at: string;
653
+ id: string;
654
+ keyword_id: string | null;
655
+ payload: JsonObject | null;
656
+ project_id: string;
657
+ public_id: string;
658
+ severity: SignalSeverity;
659
+ source: SignalSource;
660
+ type: string;
661
+ url: string | null;
662
+ }
663
+ export interface CreateSignalInput {
664
+ /** ISO-8601 date-time when the signal happened. Defaults to now on the server. */
665
+ happened_at?: string;
666
+ keyword_id?: string;
667
+ /** JSON object payload. Ingestion rejects serialized payloads above 8KB. */
668
+ payload?: JsonObject;
669
+ severity?: SignalSeverity;
670
+ source: CreateSignalSource;
671
+ /** Dot-separated signal type such as "deploy.completed" (`^[a-z_]+\.[a-z_]+$`). */
672
+ type: string;
673
+ url?: string;
674
+ }
675
+ export interface ListSignalsOptions extends PaginationOptions {
676
+ from?: Date | string;
677
+ source?: SignalSource;
678
+ to?: Date | string;
679
+ type?: string;
680
+ }
681
+ export type CostEstimateFrequency = "daily" | "monthly" | "weekly";
682
+ export type PricingModel = "flat" | "plan";
683
+ export interface GetCostEstimateOptions {
684
+ /** Device count per keyword (1 or 2). Defaults to 1. */
685
+ devices?: number;
686
+ /** Rank-check frequency used to estimate monthly checks. Defaults to "daily". */
687
+ frequency?: CostEstimateFrequency;
688
+ /** Keyword count. Required; integer between 0 and 100000. */
689
+ keywords: number;
690
+ /** Location count per keyword. Defaults to 1; maximum 100. */
691
+ locations?: number;
692
+ /** Flat-rate provider option key, for example "standard", "priority", or "live". */
693
+ option?: string;
694
+ /** Plan-model provider plan key; unknown values use auto selection. */
695
+ plan?: string;
696
+ /** Provider rate card to use. Defaults to "dataforseo". */
697
+ provider?: string;
698
+ }
699
+ export interface ProviderRateOption {
700
+ key: string;
701
+ label: string;
702
+ short_label: string;
703
+ turnaround: string;
704
+ unit_cost_cents: number;
705
+ unit_cost_usd: number;
706
+ }
707
+ export interface ProviderRatePlan {
708
+ included_checks: number;
709
+ label: string;
710
+ monthly_price_cents: number;
711
+ monthly_price_usd: number;
712
+ plan_key: string;
713
+ }
714
+ export interface ProviderRateBase {
715
+ checked_at: string;
716
+ label: string;
717
+ notes?: string;
718
+ provider_id: string;
719
+ source_url: string;
720
+ }
721
+ export interface FlatProviderRate extends ProviderRateBase {
722
+ options: ProviderRateOption[];
723
+ pricing_model: "flat";
724
+ }
725
+ export interface PlanProviderRate extends ProviderRateBase {
726
+ plans: ProviderRatePlan[];
727
+ pricing_model: "plan";
728
+ }
729
+ export type ProviderRate = FlatProviderRate | PlanProviderRate;
730
+ export interface CostEstimateBase {
731
+ checks_per_run: number;
732
+ effective_cost_per_check_cents: number;
733
+ exceeds_largest_plan: boolean;
734
+ exceeds_selected_plan: boolean;
735
+ monthly_checks: number;
736
+ monthly_cost_cents: number;
737
+ monthly_cost_usd: number;
738
+ provider_id: string;
739
+ rate_checked_at: string;
740
+ rate_source_url: string;
741
+ }
742
+ export interface FlatCostEstimate extends CostEstimateBase {
743
+ pricing_model: "flat";
744
+ selected_option: ProviderRateOption;
745
+ }
746
+ export interface PlanCostEstimate extends CostEstimateBase {
747
+ pricing_model: "plan";
748
+ selected_plan: ProviderRatePlan;
749
+ }
750
+ export type CostEstimate = FlatCostEstimate | PlanCostEstimate;
751
+ export interface HealthResponse {
752
+ checked_at: string;
753
+ providers: {
754
+ serp: string[];
755
+ };
756
+ services: {
757
+ app: string;
758
+ database: OpenString<"degraded" | "ok">;
759
+ };
760
+ status: OpenString<"degraded" | "ok">;
761
+ }
762
+ export interface Capability {
763
+ description: string;
764
+ input_schema: JsonObject;
765
+ name: string;
766
+ operationId: string;
767
+ }
768
+ export interface OpenApiDocument extends JsonObject {
769
+ info: JsonObject;
770
+ openapi: string;
771
+ paths: JsonObject;
772
+ }
773
+ export interface RequestOptions {
774
+ headers?: RequestHeaders;
775
+ idempotencyKey?: string;
776
+ signal?: AbortSignal;
777
+ /** Milliseconds before the request is aborted. Composed with any user-provided signal. */
778
+ timeout?: number;
779
+ }
780
+ export interface BisibilityClientConfig {
781
+ apiKey?: string;
782
+ baseUrl?: string | URL;
783
+ fetch?: FetchLike;
784
+ headers?: RequestHeaders;
785
+ /**
786
+ * Project id or public id sent as the X-Bisibility-Project header on every request.
787
+ * Targets personal access token requests at a project on routes without one in the path.
788
+ */
789
+ projectId?: string;
790
+ }
791
+ export type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
792
+ export {};
793
+ //# sourceMappingURL=types.d.ts.map