@atproto/api 0.15.21 → 0.15.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/client/index.d.ts +21 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +58 -3
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +10972 -10140
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +446 -0
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/tools/ozone/safelink/addRule.d.ts +38 -0
  11. package/dist/client/types/tools/ozone/safelink/addRule.d.ts.map +1 -0
  12. package/dist/client/types/tools/ozone/safelink/addRule.js +34 -0
  13. package/dist/client/types/tools/ozone/safelink/addRule.js.map +1 -0
  14. package/dist/client/types/tools/ozone/safelink/defs.d.ts +47 -0
  15. package/dist/client/types/tools/ozone/safelink/defs.d.ts.map +1 -0
  16. package/dist/client/types/tools/ozone/safelink/defs.js +25 -0
  17. package/dist/client/types/tools/ozone/safelink/defs.js.map +1 -0
  18. package/dist/client/types/tools/ozone/safelink/queryEvents.d.ts +37 -0
  19. package/dist/client/types/tools/ozone/safelink/queryEvents.d.ts.map +1 -0
  20. package/dist/client/types/tools/ozone/safelink/queryEvents.js +11 -0
  21. package/dist/client/types/tools/ozone/safelink/queryEvents.js.map +1 -0
  22. package/dist/client/types/tools/ozone/safelink/queryRules.d.ts +43 -0
  23. package/dist/client/types/tools/ozone/safelink/queryRules.d.ts.map +1 -0
  24. package/dist/client/types/tools/ozone/safelink/queryRules.js +11 -0
  25. package/dist/client/types/tools/ozone/safelink/queryRules.js.map +1 -0
  26. package/dist/client/types/tools/ozone/safelink/removeRule.d.ts +33 -0
  27. package/dist/client/types/tools/ozone/safelink/removeRule.d.ts.map +1 -0
  28. package/dist/client/types/tools/ozone/safelink/removeRule.js +26 -0
  29. package/dist/client/types/tools/ozone/safelink/removeRule.js.map +1 -0
  30. package/dist/client/types/tools/ozone/safelink/updateRule.d.ts +35 -0
  31. package/dist/client/types/tools/ozone/safelink/updateRule.d.ts.map +1 -0
  32. package/dist/client/types/tools/ozone/safelink/updateRule.js +26 -0
  33. package/dist/client/types/tools/ozone/safelink/updateRule.js.map +1 -0
  34. package/package.json +1 -1
  35. package/src/client/index.ts +79 -0
  36. package/src/client/lexicons.ts +451 -0
  37. package/src/client/types/tools/ozone/safelink/addRule.ts +67 -0
  38. package/src/client/types/tools/ozone/safelink/defs.ts +76 -0
  39. package/src/client/types/tools/ozone/safelink/queryEvents.ts +55 -0
  40. package/src/client/types/tools/ozone/safelink/queryRules.ts +61 -0
  41. package/src/client/types/tools/ozone/safelink/removeRule.ts +58 -0
  42. package/src/client/types/tools/ozone/safelink/updateRule.ts +60 -0
  43. package/tsconfig.build.tsbuildinfo +1 -1
@@ -15386,6 +15386,451 @@ export const schemaDict = {
15386
15386
  },
15387
15387
  },
15388
15388
  },
15389
+ ToolsOzoneSafelinkAddRule: {
15390
+ lexicon: 1,
15391
+ id: 'tools.ozone.safelink.addRule',
15392
+ defs: {
15393
+ main: {
15394
+ type: 'procedure',
15395
+ description: 'Add a new URL safety rule',
15396
+ input: {
15397
+ encoding: 'application/json',
15398
+ schema: {
15399
+ type: 'object',
15400
+ required: ['url', 'pattern', 'action', 'reason'],
15401
+ properties: {
15402
+ url: {
15403
+ type: 'string',
15404
+ description: 'The URL or domain to apply the rule to',
15405
+ },
15406
+ pattern: {
15407
+ type: 'ref',
15408
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15409
+ },
15410
+ action: {
15411
+ type: 'ref',
15412
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15413
+ },
15414
+ reason: {
15415
+ type: 'ref',
15416
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15417
+ },
15418
+ comment: {
15419
+ type: 'string',
15420
+ description: 'Optional comment about the decision',
15421
+ },
15422
+ createdBy: {
15423
+ type: 'string',
15424
+ format: 'did',
15425
+ description: 'Author DID. Only respected when using admin auth',
15426
+ },
15427
+ },
15428
+ },
15429
+ },
15430
+ output: {
15431
+ encoding: 'application/json',
15432
+ schema: {
15433
+ type: 'ref',
15434
+ ref: 'lex:tools.ozone.safelink.defs#event',
15435
+ },
15436
+ },
15437
+ errors: [
15438
+ {
15439
+ name: 'InvalidUrl',
15440
+ description: 'The provided URL is invalid',
15441
+ },
15442
+ {
15443
+ name: 'RuleAlreadyExists',
15444
+ description: 'A rule for this URL/domain already exists',
15445
+ },
15446
+ ],
15447
+ },
15448
+ },
15449
+ },
15450
+ ToolsOzoneSafelinkDefs: {
15451
+ lexicon: 1,
15452
+ id: 'tools.ozone.safelink.defs',
15453
+ defs: {
15454
+ event: {
15455
+ type: 'object',
15456
+ description: 'An event for URL safety decisions',
15457
+ required: [
15458
+ 'id',
15459
+ 'eventType',
15460
+ 'url',
15461
+ 'pattern',
15462
+ 'action',
15463
+ 'reason',
15464
+ 'createdBy',
15465
+ 'createdAt',
15466
+ ],
15467
+ properties: {
15468
+ id: {
15469
+ type: 'integer',
15470
+ description: 'Auto-incrementing row ID',
15471
+ },
15472
+ eventType: {
15473
+ type: 'ref',
15474
+ ref: 'lex:tools.ozone.safelink.defs#eventType',
15475
+ },
15476
+ url: {
15477
+ type: 'string',
15478
+ description: 'The URL that this rule applies to',
15479
+ },
15480
+ pattern: {
15481
+ type: 'ref',
15482
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15483
+ },
15484
+ action: {
15485
+ type: 'ref',
15486
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15487
+ },
15488
+ reason: {
15489
+ type: 'ref',
15490
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15491
+ },
15492
+ createdBy: {
15493
+ type: 'string',
15494
+ format: 'did',
15495
+ description: 'DID of the user who created this rule',
15496
+ },
15497
+ createdAt: {
15498
+ type: 'string',
15499
+ format: 'datetime',
15500
+ },
15501
+ comment: {
15502
+ type: 'string',
15503
+ description: 'Optional comment about the decision',
15504
+ },
15505
+ },
15506
+ },
15507
+ eventType: {
15508
+ type: 'string',
15509
+ knownValues: ['addRule', 'updateRule', 'removeRule'],
15510
+ },
15511
+ patternType: {
15512
+ type: 'string',
15513
+ knownValues: ['domain', 'url'],
15514
+ },
15515
+ actionType: {
15516
+ type: 'string',
15517
+ knownValues: ['block', 'warn', 'whitelist'],
15518
+ },
15519
+ reasonType: {
15520
+ type: 'string',
15521
+ knownValues: ['csam', 'spam', 'phishing', 'none'],
15522
+ },
15523
+ urlRule: {
15524
+ type: 'object',
15525
+ description: 'Input for creating a URL safety rule',
15526
+ required: [
15527
+ 'url',
15528
+ 'pattern',
15529
+ 'action',
15530
+ 'reason',
15531
+ 'createdBy',
15532
+ 'createdAt',
15533
+ 'updatedAt',
15534
+ ],
15535
+ properties: {
15536
+ url: {
15537
+ type: 'string',
15538
+ description: 'The URL or domain to apply the rule to',
15539
+ },
15540
+ pattern: {
15541
+ type: 'ref',
15542
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15543
+ },
15544
+ action: {
15545
+ type: 'ref',
15546
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15547
+ },
15548
+ reason: {
15549
+ type: 'ref',
15550
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15551
+ },
15552
+ comment: {
15553
+ type: 'string',
15554
+ description: 'Optional comment about the decision',
15555
+ },
15556
+ createdBy: {
15557
+ type: 'string',
15558
+ format: 'did',
15559
+ description: 'DID of the user added the rule.',
15560
+ },
15561
+ createdAt: {
15562
+ type: 'string',
15563
+ format: 'datetime',
15564
+ description: 'Timestamp when the rule was created',
15565
+ },
15566
+ updatedAt: {
15567
+ type: 'string',
15568
+ format: 'datetime',
15569
+ description: 'Timestamp when the rule was last updated',
15570
+ },
15571
+ },
15572
+ },
15573
+ },
15574
+ },
15575
+ ToolsOzoneSafelinkQueryEvents: {
15576
+ lexicon: 1,
15577
+ id: 'tools.ozone.safelink.queryEvents',
15578
+ defs: {
15579
+ main: {
15580
+ type: 'procedure',
15581
+ description: 'Query URL safety audit events',
15582
+ input: {
15583
+ encoding: 'application/json',
15584
+ schema: {
15585
+ type: 'object',
15586
+ properties: {
15587
+ cursor: {
15588
+ type: 'string',
15589
+ description: 'Cursor for pagination',
15590
+ },
15591
+ limit: {
15592
+ type: 'integer',
15593
+ minimum: 1,
15594
+ maximum: 100,
15595
+ default: 50,
15596
+ description: 'Maximum number of results to return',
15597
+ },
15598
+ urls: {
15599
+ type: 'array',
15600
+ items: {
15601
+ type: 'string',
15602
+ },
15603
+ description: 'Filter by specific URLs or domains',
15604
+ },
15605
+ patternType: {
15606
+ type: 'string',
15607
+ description: 'Filter by pattern type',
15608
+ },
15609
+ sortDirection: {
15610
+ type: 'string',
15611
+ knownValues: ['asc', 'desc'],
15612
+ default: 'desc',
15613
+ description: 'Sort direction',
15614
+ },
15615
+ },
15616
+ },
15617
+ },
15618
+ output: {
15619
+ encoding: 'application/json',
15620
+ schema: {
15621
+ type: 'object',
15622
+ required: ['events'],
15623
+ properties: {
15624
+ cursor: {
15625
+ type: 'string',
15626
+ description:
15627
+ 'Next cursor for pagination. Only present if there are more results.',
15628
+ },
15629
+ events: {
15630
+ type: 'array',
15631
+ items: {
15632
+ type: 'ref',
15633
+ ref: 'lex:tools.ozone.safelink.defs#event',
15634
+ },
15635
+ },
15636
+ },
15637
+ },
15638
+ },
15639
+ },
15640
+ },
15641
+ },
15642
+ ToolsOzoneSafelinkQueryRules: {
15643
+ lexicon: 1,
15644
+ id: 'tools.ozone.safelink.queryRules',
15645
+ defs: {
15646
+ main: {
15647
+ type: 'procedure',
15648
+ description: 'Query URL safety rules',
15649
+ input: {
15650
+ encoding: 'application/json',
15651
+ schema: {
15652
+ type: 'object',
15653
+ properties: {
15654
+ cursor: {
15655
+ type: 'string',
15656
+ description: 'Cursor for pagination',
15657
+ },
15658
+ limit: {
15659
+ type: 'integer',
15660
+ minimum: 1,
15661
+ maximum: 100,
15662
+ default: 50,
15663
+ description: 'Maximum number of results to return',
15664
+ },
15665
+ urls: {
15666
+ type: 'array',
15667
+ items: {
15668
+ type: 'string',
15669
+ },
15670
+ description: 'Filter by specific URLs or domains',
15671
+ },
15672
+ patternType: {
15673
+ type: 'string',
15674
+ description: 'Filter by pattern type',
15675
+ },
15676
+ actions: {
15677
+ type: 'array',
15678
+ items: {
15679
+ type: 'string',
15680
+ },
15681
+ description: 'Filter by action types',
15682
+ },
15683
+ reason: {
15684
+ type: 'string',
15685
+ description: 'Filter by reason type',
15686
+ },
15687
+ createdBy: {
15688
+ type: 'string',
15689
+ format: 'did',
15690
+ description: 'Filter by rule creator',
15691
+ },
15692
+ sortDirection: {
15693
+ type: 'string',
15694
+ knownValues: ['asc', 'desc'],
15695
+ default: 'desc',
15696
+ description: 'Sort direction',
15697
+ },
15698
+ },
15699
+ },
15700
+ },
15701
+ output: {
15702
+ encoding: 'application/json',
15703
+ schema: {
15704
+ type: 'object',
15705
+ required: ['rules'],
15706
+ properties: {
15707
+ cursor: {
15708
+ type: 'string',
15709
+ description:
15710
+ 'Next cursor for pagination. Only present if there are more results.',
15711
+ },
15712
+ rules: {
15713
+ type: 'array',
15714
+ items: {
15715
+ type: 'ref',
15716
+ ref: 'lex:tools.ozone.safelink.defs#urlRule',
15717
+ },
15718
+ },
15719
+ },
15720
+ },
15721
+ },
15722
+ },
15723
+ },
15724
+ },
15725
+ ToolsOzoneSafelinkRemoveRule: {
15726
+ lexicon: 1,
15727
+ id: 'tools.ozone.safelink.removeRule',
15728
+ defs: {
15729
+ main: {
15730
+ type: 'procedure',
15731
+ description: 'Remove an existing URL safety rule',
15732
+ input: {
15733
+ encoding: 'application/json',
15734
+ schema: {
15735
+ type: 'object',
15736
+ required: ['url', 'pattern'],
15737
+ properties: {
15738
+ url: {
15739
+ type: 'string',
15740
+ description: 'The URL or domain to remove the rule for',
15741
+ },
15742
+ pattern: {
15743
+ type: 'ref',
15744
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15745
+ },
15746
+ comment: {
15747
+ type: 'string',
15748
+ description:
15749
+ 'Optional comment about why the rule is being removed',
15750
+ },
15751
+ createdBy: {
15752
+ type: 'string',
15753
+ format: 'did',
15754
+ description:
15755
+ 'Optional DID of the user. Only respected when using admin auth.',
15756
+ },
15757
+ },
15758
+ },
15759
+ },
15760
+ output: {
15761
+ encoding: 'application/json',
15762
+ schema: {
15763
+ type: 'ref',
15764
+ ref: 'lex:tools.ozone.safelink.defs#event',
15765
+ },
15766
+ },
15767
+ errors: [
15768
+ {
15769
+ name: 'RuleNotFound',
15770
+ description: 'No active rule found for this URL/domain',
15771
+ },
15772
+ ],
15773
+ },
15774
+ },
15775
+ },
15776
+ ToolsOzoneSafelinkUpdateRule: {
15777
+ lexicon: 1,
15778
+ id: 'tools.ozone.safelink.updateRule',
15779
+ defs: {
15780
+ main: {
15781
+ type: 'procedure',
15782
+ description: 'Update an existing URL safety rule',
15783
+ input: {
15784
+ encoding: 'application/json',
15785
+ schema: {
15786
+ type: 'object',
15787
+ required: ['url', 'pattern', 'action', 'reason'],
15788
+ properties: {
15789
+ url: {
15790
+ type: 'string',
15791
+ description: 'The URL or domain to update the rule for',
15792
+ },
15793
+ pattern: {
15794
+ type: 'ref',
15795
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15796
+ },
15797
+ action: {
15798
+ type: 'ref',
15799
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15800
+ },
15801
+ reason: {
15802
+ type: 'ref',
15803
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15804
+ },
15805
+ comment: {
15806
+ type: 'string',
15807
+ description: 'Optional comment about the update',
15808
+ },
15809
+ createdBy: {
15810
+ type: 'string',
15811
+ format: 'did',
15812
+ description:
15813
+ 'Optional DID to credit as the creator. Only respected for admin_token authentication.',
15814
+ },
15815
+ },
15816
+ },
15817
+ },
15818
+ output: {
15819
+ encoding: 'application/json',
15820
+ schema: {
15821
+ type: 'ref',
15822
+ ref: 'lex:tools.ozone.safelink.defs#event',
15823
+ },
15824
+ },
15825
+ errors: [
15826
+ {
15827
+ name: 'RuleNotFound',
15828
+ description: 'No active rule found for this URL/domain',
15829
+ },
15830
+ ],
15831
+ },
15832
+ },
15833
+ },
15389
15834
  ToolsOzoneServerGetConfig: {
15390
15835
  lexicon: 1,
15391
15836
  id: 'tools.ozone.server.getConfig',
@@ -17041,6 +17486,12 @@ export const ids = {
17041
17486
  ToolsOzoneModerationQueryEvents: 'tools.ozone.moderation.queryEvents',
17042
17487
  ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses',
17043
17488
  ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos',
17489
+ ToolsOzoneSafelinkAddRule: 'tools.ozone.safelink.addRule',
17490
+ ToolsOzoneSafelinkDefs: 'tools.ozone.safelink.defs',
17491
+ ToolsOzoneSafelinkQueryEvents: 'tools.ozone.safelink.queryEvents',
17492
+ ToolsOzoneSafelinkQueryRules: 'tools.ozone.safelink.queryRules',
17493
+ ToolsOzoneSafelinkRemoveRule: 'tools.ozone.safelink.removeRule',
17494
+ ToolsOzoneSafelinkUpdateRule: 'tools.ozone.safelink.updateRule',
17044
17495
  ToolsOzoneServerGetConfig: 'tools.ozone.server.getConfig',
17045
17496
  ToolsOzoneSetAddValues: 'tools.ozone.set.addValues',
17046
17497
  ToolsOzoneSetDefs: 'tools.ozone.set.defs',
@@ -0,0 +1,67 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneSafelinkDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.safelink.addRule'
18
+
19
+ export interface QueryParams {}
20
+
21
+ export interface InputSchema {
22
+ /** The URL or domain to apply the rule to */
23
+ url: string
24
+ pattern: ToolsOzoneSafelinkDefs.PatternType
25
+ action: ToolsOzoneSafelinkDefs.ActionType
26
+ reason: ToolsOzoneSafelinkDefs.ReasonType
27
+ /** Optional comment about the decision */
28
+ comment?: string
29
+ /** Author DID. Only respected when using admin auth */
30
+ createdBy?: string
31
+ }
32
+
33
+ export type OutputSchema = ToolsOzoneSafelinkDefs.Event
34
+
35
+ export interface CallOptions {
36
+ signal?: AbortSignal
37
+ headers?: HeadersMap
38
+ qp?: QueryParams
39
+ encoding?: 'application/json'
40
+ }
41
+
42
+ export interface Response {
43
+ success: boolean
44
+ headers: HeadersMap
45
+ data: OutputSchema
46
+ }
47
+
48
+ export class InvalidUrlError extends XRPCError {
49
+ constructor(src: XRPCError) {
50
+ super(src.status, src.error, src.message, src.headers, { cause: src })
51
+ }
52
+ }
53
+
54
+ export class RuleAlreadyExistsError extends XRPCError {
55
+ constructor(src: XRPCError) {
56
+ super(src.status, src.error, src.message, src.headers, { cause: src })
57
+ }
58
+ }
59
+
60
+ export function toKnownErr(e: any) {
61
+ if (e instanceof XRPCError) {
62
+ if (e.error === 'InvalidUrl') return new InvalidUrlError(e)
63
+ if (e.error === 'RuleAlreadyExists') return new RuleAlreadyExistsError(e)
64
+ }
65
+
66
+ return e
67
+ }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'tools.ozone.safelink.defs'
16
+
17
+ /** An event for URL safety decisions */
18
+ export interface Event {
19
+ $type?: 'tools.ozone.safelink.defs#event'
20
+ /** Auto-incrementing row ID */
21
+ id: number
22
+ eventType: EventType
23
+ /** The URL that this rule applies to */
24
+ url: string
25
+ pattern: PatternType
26
+ action: ActionType
27
+ reason: ReasonType
28
+ /** DID of the user who created this rule */
29
+ createdBy: string
30
+ createdAt: string
31
+ /** Optional comment about the decision */
32
+ comment?: string
33
+ }
34
+
35
+ const hashEvent = 'event'
36
+
37
+ export function isEvent<V>(v: V) {
38
+ return is$typed(v, id, hashEvent)
39
+ }
40
+
41
+ export function validateEvent<V>(v: V) {
42
+ return validate<Event & V>(v, id, hashEvent)
43
+ }
44
+
45
+ export type EventType = 'addRule' | 'updateRule' | 'removeRule' | (string & {})
46
+ export type PatternType = 'domain' | 'url' | (string & {})
47
+ export type ActionType = 'block' | 'warn' | 'whitelist' | (string & {})
48
+ export type ReasonType = 'csam' | 'spam' | 'phishing' | 'none' | (string & {})
49
+
50
+ /** Input for creating a URL safety rule */
51
+ export interface UrlRule {
52
+ $type?: 'tools.ozone.safelink.defs#urlRule'
53
+ /** The URL or domain to apply the rule to */
54
+ url: string
55
+ pattern: PatternType
56
+ action: ActionType
57
+ reason: ReasonType
58
+ /** Optional comment about the decision */
59
+ comment?: string
60
+ /** DID of the user added the rule. */
61
+ createdBy: string
62
+ /** Timestamp when the rule was created */
63
+ createdAt: string
64
+ /** Timestamp when the rule was last updated */
65
+ updatedAt: string
66
+ }
67
+
68
+ const hashUrlRule = 'urlRule'
69
+
70
+ export function isUrlRule<V>(v: V) {
71
+ return is$typed(v, id, hashUrlRule)
72
+ }
73
+
74
+ export function validateUrlRule<V>(v: V) {
75
+ return validate<UrlRule & V>(v, id, hashUrlRule)
76
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+ import type * as ToolsOzoneSafelinkDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.safelink.queryEvents'
18
+
19
+ export interface QueryParams {}
20
+
21
+ export interface InputSchema {
22
+ /** Cursor for pagination */
23
+ cursor?: string
24
+ /** Maximum number of results to return */
25
+ limit?: number
26
+ /** Filter by specific URLs or domains */
27
+ urls?: string[]
28
+ /** Filter by pattern type */
29
+ patternType?: string
30
+ /** Sort direction */
31
+ sortDirection?: 'asc' | 'desc' | (string & {})
32
+ }
33
+
34
+ export interface OutputSchema {
35
+ /** Next cursor for pagination. Only present if there are more results. */
36
+ cursor?: string
37
+ events: ToolsOzoneSafelinkDefs.Event[]
38
+ }
39
+
40
+ export interface CallOptions {
41
+ signal?: AbortSignal
42
+ headers?: HeadersMap
43
+ qp?: QueryParams
44
+ encoding?: 'application/json'
45
+ }
46
+
47
+ export interface Response {
48
+ success: boolean
49
+ headers: HeadersMap
50
+ data: OutputSchema
51
+ }
52
+
53
+ export function toKnownErr(e: any) {
54
+ return e
55
+ }