@atproto/api 0.15.4 → 0.15.5

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 (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/client/index.d.ts +16 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +35 -2
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +672 -12
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +353 -0
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/tools/ozone/server/getConfig.d.ts +3 -1
  11. package/dist/client/types/tools/ozone/server/getConfig.d.ts.map +1 -1
  12. package/dist/client/types/tools/ozone/server/getConfig.js.map +1 -1
  13. package/dist/client/types/tools/ozone/setting/defs.d.ts +1 -1
  14. package/dist/client/types/tools/ozone/setting/defs.d.ts.map +1 -1
  15. package/dist/client/types/tools/ozone/setting/defs.js.map +1 -1
  16. package/dist/client/types/tools/ozone/setting/upsertOption.d.ts +1 -1
  17. package/dist/client/types/tools/ozone/setting/upsertOption.d.ts.map +1 -1
  18. package/dist/client/types/tools/ozone/setting/upsertOption.js.map +1 -1
  19. package/dist/client/types/tools/ozone/team/addMember.d.ts +1 -1
  20. package/dist/client/types/tools/ozone/team/addMember.d.ts.map +1 -1
  21. package/dist/client/types/tools/ozone/team/addMember.js.map +1 -1
  22. package/dist/client/types/tools/ozone/team/defs.d.ts +3 -1
  23. package/dist/client/types/tools/ozone/team/defs.d.ts.map +1 -1
  24. package/dist/client/types/tools/ozone/team/defs.js +3 -1
  25. package/dist/client/types/tools/ozone/team/defs.js.map +1 -1
  26. package/dist/client/types/tools/ozone/team/updateMember.d.ts +1 -1
  27. package/dist/client/types/tools/ozone/team/updateMember.d.ts.map +1 -1
  28. package/dist/client/types/tools/ozone/team/updateMember.js.map +1 -1
  29. package/dist/client/types/tools/ozone/verification/defs.d.ts +43 -0
  30. package/dist/client/types/tools/ozone/verification/defs.d.ts.map +1 -0
  31. package/dist/client/types/tools/ozone/verification/defs.js +16 -0
  32. package/dist/client/types/tools/ozone/verification/defs.js.map +1 -0
  33. package/dist/client/types/tools/ozone/verification/grantVerifications.d.ts +52 -0
  34. package/dist/client/types/tools/ozone/verification/grantVerifications.d.ts.map +1 -0
  35. package/dist/client/types/tools/ozone/verification/grantVerifications.js +29 -0
  36. package/dist/client/types/tools/ozone/verification/grantVerifications.js.map +1 -0
  37. package/dist/client/types/tools/ozone/verification/listVerifications.d.ts +39 -0
  38. package/dist/client/types/tools/ozone/verification/listVerifications.d.ts.map +1 -0
  39. package/dist/client/types/tools/ozone/verification/listVerifications.js +11 -0
  40. package/dist/client/types/tools/ozone/verification/listVerifications.js.map +1 -0
  41. package/dist/client/types/tools/ozone/verification/revokeVerifications.d.ts +42 -0
  42. package/dist/client/types/tools/ozone/verification/revokeVerifications.d.ts.map +1 -0
  43. package/dist/client/types/tools/ozone/verification/revokeVerifications.js +20 -0
  44. package/dist/client/types/tools/ozone/verification/revokeVerifications.js.map +1 -0
  45. package/package.json +1 -1
  46. package/src/client/index.ts +55 -0
  47. package/src/client/lexicons.ts +372 -0
  48. package/src/client/types/tools/ozone/server/getConfig.ts +3 -0
  49. package/src/client/types/tools/ozone/setting/defs.ts +1 -0
  50. package/src/client/types/tools/ozone/setting/upsertOption.ts +1 -0
  51. package/src/client/types/tools/ozone/team/addMember.ts +1 -0
  52. package/src/client/types/tools/ozone/team/defs.ts +3 -0
  53. package/src/client/types/tools/ozone/team/updateMember.ts +1 -0
  54. package/src/client/types/tools/ozone/verification/defs.ts +59 -0
  55. package/src/client/types/tools/ozone/verification/grantVerifications.ts +87 -0
  56. package/src/client/types/tools/ozone/verification/listVerifications.ts +58 -0
  57. package/src/client/types/tools/ozone/verification/revokeVerifications.ts +68 -0
  58. package/tsconfig.build.tsbuildinfo +1 -1
@@ -14652,6 +14652,11 @@ export const schemaDict = {
14652
14652
  type: 'ref',
14653
14653
  ref: 'lex:tools.ozone.server.getConfig#viewerConfig',
14654
14654
  },
14655
+ verifierDid: {
14656
+ type: 'string',
14657
+ format: 'did',
14658
+ description: 'The did of the verifier used for verification.',
14659
+ },
14655
14660
  },
14656
14661
  },
14657
14662
  },
@@ -14674,6 +14679,7 @@ export const schemaDict = {
14674
14679
  'tools.ozone.team.defs#roleAdmin',
14675
14680
  'tools.ozone.team.defs#roleModerator',
14676
14681
  'tools.ozone.team.defs#roleTriage',
14682
+ 'tools.ozone.team.defs#roleVerifier',
14677
14683
  ],
14678
14684
  },
14679
14685
  },
@@ -15019,6 +15025,7 @@ export const schemaDict = {
15019
15025
  'tools.ozone.team.defs#roleModerator',
15020
15026
  'tools.ozone.team.defs#roleTriage',
15021
15027
  'tools.ozone.team.defs#roleAdmin',
15028
+ 'tools.ozone.team.defs#roleVerifier',
15022
15029
  ],
15023
15030
  },
15024
15031
  scope: {
@@ -15171,6 +15178,7 @@ export const schemaDict = {
15171
15178
  knownValues: [
15172
15179
  'tools.ozone.team.defs#roleModerator',
15173
15180
  'tools.ozone.team.defs#roleTriage',
15181
+ 'tools.ozone.team.defs#roleVerifier',
15174
15182
  'tools.ozone.team.defs#roleAdmin',
15175
15183
  ],
15176
15184
  },
@@ -15390,6 +15398,7 @@ export const schemaDict = {
15390
15398
  knownValues: [
15391
15399
  'tools.ozone.team.defs#roleAdmin',
15392
15400
  'tools.ozone.team.defs#roleModerator',
15401
+ 'tools.ozone.team.defs#roleVerifier',
15393
15402
  'tools.ozone.team.defs#roleTriage',
15394
15403
  ],
15395
15404
  },
@@ -15448,6 +15457,7 @@ export const schemaDict = {
15448
15457
  'lex:tools.ozone.team.defs#roleAdmin',
15449
15458
  'lex:tools.ozone.team.defs#roleModerator',
15450
15459
  'lex:tools.ozone.team.defs#roleTriage',
15460
+ 'lex:tools.ozone.team.defs#roleVerifier',
15451
15461
  ],
15452
15462
  },
15453
15463
  },
@@ -15466,6 +15476,10 @@ export const schemaDict = {
15466
15476
  description:
15467
15477
  'Triage role. Mostly intended for monitoring and escalating issues.',
15468
15478
  },
15479
+ roleVerifier: {
15480
+ type: 'token',
15481
+ description: 'Verifier role. Only allowed to issue verifications.',
15482
+ },
15469
15483
  },
15470
15484
  },
15471
15485
  ToolsOzoneTeamDeleteMember: {
@@ -15582,6 +15596,7 @@ export const schemaDict = {
15582
15596
  knownValues: [
15583
15597
  'tools.ozone.team.defs#roleAdmin',
15584
15598
  'tools.ozone.team.defs#roleModerator',
15599
+ 'tools.ozone.team.defs#roleVerifier',
15585
15600
  'tools.ozone.team.defs#roleTriage',
15586
15601
  ],
15587
15602
  },
@@ -15604,6 +15619,356 @@ export const schemaDict = {
15604
15619
  },
15605
15620
  },
15606
15621
  },
15622
+ ToolsOzoneVerificationDefs: {
15623
+ lexicon: 1,
15624
+ id: 'tools.ozone.verification.defs',
15625
+ defs: {
15626
+ verificationView: {
15627
+ type: 'object',
15628
+ description: 'Verification data for the associated subject.',
15629
+ required: [
15630
+ 'issuer',
15631
+ 'uri',
15632
+ 'subject',
15633
+ 'handle',
15634
+ 'displayName',
15635
+ 'createdAt',
15636
+ ],
15637
+ properties: {
15638
+ issuer: {
15639
+ type: 'string',
15640
+ description: 'The user who issued this verification.',
15641
+ format: 'did',
15642
+ },
15643
+ uri: {
15644
+ type: 'string',
15645
+ description: 'The AT-URI of the verification record.',
15646
+ format: 'at-uri',
15647
+ },
15648
+ subject: {
15649
+ type: 'string',
15650
+ format: 'did',
15651
+ description: 'The subject of the verification.',
15652
+ },
15653
+ handle: {
15654
+ type: 'string',
15655
+ description:
15656
+ 'Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.',
15657
+ format: 'handle',
15658
+ },
15659
+ displayName: {
15660
+ type: 'string',
15661
+ description:
15662
+ 'Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.',
15663
+ },
15664
+ createdAt: {
15665
+ type: 'string',
15666
+ description: 'Timestamp when the verification was created.',
15667
+ format: 'datetime',
15668
+ },
15669
+ revokeReason: {
15670
+ type: 'string',
15671
+ description:
15672
+ 'Describes the reason for revocation, also indicating that the verification is no longer valid.',
15673
+ },
15674
+ revokedAt: {
15675
+ type: 'string',
15676
+ description: 'Timestamp when the verification was revoked.',
15677
+ format: 'datetime',
15678
+ },
15679
+ revokedBy: {
15680
+ type: 'string',
15681
+ description: 'The user who revoked this verification.',
15682
+ format: 'did',
15683
+ },
15684
+ subjectProfile: {
15685
+ type: 'union',
15686
+ refs: [],
15687
+ },
15688
+ issuerProfile: {
15689
+ type: 'union',
15690
+ refs: [],
15691
+ },
15692
+ subjectRepo: {
15693
+ type: 'union',
15694
+ refs: [
15695
+ 'lex:tools.ozone.moderation.defs#repoViewDetail',
15696
+ 'lex:tools.ozone.moderation.defs#repoViewNotFound',
15697
+ ],
15698
+ },
15699
+ issuerRepo: {
15700
+ type: 'union',
15701
+ refs: [
15702
+ 'lex:tools.ozone.moderation.defs#repoViewDetail',
15703
+ 'lex:tools.ozone.moderation.defs#repoViewNotFound',
15704
+ ],
15705
+ },
15706
+ },
15707
+ },
15708
+ },
15709
+ },
15710
+ ToolsOzoneVerificationGrantVerifications: {
15711
+ lexicon: 1,
15712
+ id: 'tools.ozone.verification.grantVerifications',
15713
+ defs: {
15714
+ main: {
15715
+ type: 'procedure',
15716
+ description:
15717
+ 'Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.',
15718
+ input: {
15719
+ encoding: 'application/json',
15720
+ schema: {
15721
+ type: 'object',
15722
+ required: ['verifications'],
15723
+ properties: {
15724
+ verifications: {
15725
+ type: 'array',
15726
+ description: 'Array of verification requests to process',
15727
+ maxLength: 100,
15728
+ items: {
15729
+ type: 'ref',
15730
+ ref: 'lex:tools.ozone.verification.grantVerifications#verificationInput',
15731
+ },
15732
+ },
15733
+ },
15734
+ },
15735
+ },
15736
+ output: {
15737
+ encoding: 'application/json',
15738
+ schema: {
15739
+ type: 'object',
15740
+ required: ['verifications', 'failedVerifications'],
15741
+ properties: {
15742
+ verifications: {
15743
+ type: 'array',
15744
+ items: {
15745
+ type: 'ref',
15746
+ ref: 'lex:tools.ozone.verification.defs#verificationView',
15747
+ },
15748
+ },
15749
+ failedVerifications: {
15750
+ type: 'array',
15751
+ items: {
15752
+ type: 'ref',
15753
+ ref: 'lex:tools.ozone.verification.grantVerifications#grantError',
15754
+ },
15755
+ },
15756
+ },
15757
+ },
15758
+ },
15759
+ },
15760
+ verificationInput: {
15761
+ type: 'object',
15762
+ required: ['subject', 'handle', 'displayName'],
15763
+ properties: {
15764
+ subject: {
15765
+ type: 'string',
15766
+ description: 'The did of the subject being verified',
15767
+ format: 'did',
15768
+ },
15769
+ handle: {
15770
+ type: 'string',
15771
+ description:
15772
+ 'Handle of the subject the verification applies to at the moment of verifying.',
15773
+ format: 'handle',
15774
+ },
15775
+ displayName: {
15776
+ type: 'string',
15777
+ description:
15778
+ 'Display name of the subject the verification applies to at the moment of verifying.',
15779
+ },
15780
+ createdAt: {
15781
+ type: 'string',
15782
+ description:
15783
+ 'Timestamp for verification record. Defaults to current time when not specified.',
15784
+ },
15785
+ },
15786
+ },
15787
+ grantError: {
15788
+ type: 'object',
15789
+ description: 'Error object for failed verifications.',
15790
+ required: ['error', 'subject'],
15791
+ properties: {
15792
+ error: {
15793
+ type: 'string',
15794
+ description: 'Error message describing the reason for failure.',
15795
+ },
15796
+ subject: {
15797
+ type: 'string',
15798
+ description: 'The did of the subject being verified',
15799
+ format: 'did',
15800
+ },
15801
+ },
15802
+ },
15803
+ },
15804
+ },
15805
+ ToolsOzoneVerificationListVerifications: {
15806
+ lexicon: 1,
15807
+ id: 'tools.ozone.verification.listVerifications',
15808
+ defs: {
15809
+ main: {
15810
+ type: 'query',
15811
+ description: 'List verifications',
15812
+ parameters: {
15813
+ type: 'params',
15814
+ properties: {
15815
+ cursor: {
15816
+ type: 'string',
15817
+ description: 'Pagination cursor',
15818
+ },
15819
+ limit: {
15820
+ type: 'integer',
15821
+ description: 'Maximum number of results to return',
15822
+ minimum: 1,
15823
+ maximum: 100,
15824
+ default: 50,
15825
+ },
15826
+ createdAfter: {
15827
+ type: 'string',
15828
+ format: 'datetime',
15829
+ description:
15830
+ 'Filter to verifications created after this timestamp',
15831
+ },
15832
+ createdBefore: {
15833
+ type: 'string',
15834
+ format: 'datetime',
15835
+ description:
15836
+ 'Filter to verifications created before this timestamp',
15837
+ },
15838
+ issuers: {
15839
+ type: 'array',
15840
+ maxLength: 100,
15841
+ description: 'Filter to verifications from specific issuers',
15842
+ items: {
15843
+ type: 'string',
15844
+ format: 'did',
15845
+ },
15846
+ },
15847
+ subjects: {
15848
+ type: 'array',
15849
+ description: 'Filter to specific verified DIDs',
15850
+ maxLength: 100,
15851
+ items: {
15852
+ type: 'string',
15853
+ format: 'did',
15854
+ },
15855
+ },
15856
+ sortDirection: {
15857
+ type: 'string',
15858
+ description: 'Sort direction for creation date',
15859
+ enum: ['asc', 'desc'],
15860
+ default: 'desc',
15861
+ },
15862
+ isRevoked: {
15863
+ type: 'boolean',
15864
+ description:
15865
+ 'Filter to verifications that are revoked or not. By default, includes both.',
15866
+ },
15867
+ },
15868
+ },
15869
+ output: {
15870
+ encoding: 'application/json',
15871
+ schema: {
15872
+ type: 'object',
15873
+ required: ['verifications'],
15874
+ properties: {
15875
+ cursor: {
15876
+ type: 'string',
15877
+ },
15878
+ verifications: {
15879
+ type: 'array',
15880
+ items: {
15881
+ type: 'ref',
15882
+ ref: 'lex:tools.ozone.verification.defs#verificationView',
15883
+ },
15884
+ },
15885
+ },
15886
+ },
15887
+ },
15888
+ },
15889
+ },
15890
+ },
15891
+ ToolsOzoneVerificationRevokeVerifications: {
15892
+ lexicon: 1,
15893
+ id: 'tools.ozone.verification.revokeVerifications',
15894
+ defs: {
15895
+ main: {
15896
+ type: 'procedure',
15897
+ description:
15898
+ 'Revoke previously granted verifications in batches of up to 100.',
15899
+ input: {
15900
+ encoding: 'application/json',
15901
+ schema: {
15902
+ type: 'object',
15903
+ required: ['uris'],
15904
+ properties: {
15905
+ uris: {
15906
+ type: 'array',
15907
+ description: 'Array of verification record uris to revoke',
15908
+ maxLength: 100,
15909
+ items: {
15910
+ type: 'string',
15911
+ description:
15912
+ 'The AT-URI of the verification record to revoke.',
15913
+ format: 'at-uri',
15914
+ },
15915
+ },
15916
+ revokeReason: {
15917
+ type: 'string',
15918
+ description:
15919
+ 'Reason for revoking the verification. This is optional and can be omitted if not needed.',
15920
+ maxLength: 1000,
15921
+ },
15922
+ },
15923
+ },
15924
+ },
15925
+ output: {
15926
+ encoding: 'application/json',
15927
+ schema: {
15928
+ type: 'object',
15929
+ required: ['revokedVerifications', 'failedRevocations'],
15930
+ properties: {
15931
+ revokedVerifications: {
15932
+ type: 'array',
15933
+ description: 'List of verification uris successfully revoked',
15934
+ items: {
15935
+ type: 'string',
15936
+ format: 'at-uri',
15937
+ },
15938
+ },
15939
+ failedRevocations: {
15940
+ type: 'array',
15941
+ description:
15942
+ "List of verification uris that couldn't be revoked, including failure reasons",
15943
+ items: {
15944
+ type: 'ref',
15945
+ ref: 'lex:tools.ozone.verification.revokeVerifications#revokeError',
15946
+ },
15947
+ },
15948
+ },
15949
+ },
15950
+ },
15951
+ },
15952
+ revokeError: {
15953
+ type: 'object',
15954
+ description: 'Error object for failed revocations',
15955
+ required: ['uri', 'error'],
15956
+ properties: {
15957
+ uri: {
15958
+ type: 'string',
15959
+ description:
15960
+ 'The AT-URI of the verification record that failed to revoke.',
15961
+ format: 'at-uri',
15962
+ },
15963
+ error: {
15964
+ type: 'string',
15965
+ description:
15966
+ 'Description of the error that occurred during revocation.',
15967
+ },
15968
+ },
15969
+ },
15970
+ },
15971
+ },
15607
15972
  } as const satisfies Record<string, LexiconDoc>
15608
15973
  export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]
15609
15974
  export const lexicons: Lexicons = new Lexicons(schemas)
@@ -15920,4 +16285,11 @@ export const ids = {
15920
16285
  ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember',
15921
16286
  ToolsOzoneTeamListMembers: 'tools.ozone.team.listMembers',
15922
16287
  ToolsOzoneTeamUpdateMember: 'tools.ozone.team.updateMember',
16288
+ ToolsOzoneVerificationDefs: 'tools.ozone.verification.defs',
16289
+ ToolsOzoneVerificationGrantVerifications:
16290
+ 'tools.ozone.verification.grantVerifications',
16291
+ ToolsOzoneVerificationListVerifications:
16292
+ 'tools.ozone.verification.listVerifications',
16293
+ ToolsOzoneVerificationRevokeVerifications:
16294
+ 'tools.ozone.verification.revokeVerifications',
15923
16295
  } as const
@@ -25,6 +25,8 @@ export interface OutputSchema {
25
25
  blobDivert?: ServiceConfig
26
26
  chat?: ServiceConfig
27
27
  viewer?: ViewerConfig
28
+ /** The did of the verifier used for verification. */
29
+ verifierDid?: string
28
30
  }
29
31
 
30
32
  export interface CallOptions {
@@ -63,6 +65,7 @@ export interface ViewerConfig {
63
65
  | 'tools.ozone.team.defs#roleAdmin'
64
66
  | 'tools.ozone.team.defs#roleModerator'
65
67
  | 'tools.ozone.team.defs#roleTriage'
68
+ | 'tools.ozone.team.defs#roleVerifier'
66
69
  | (string & {})
67
70
  }
68
71
 
@@ -26,6 +26,7 @@ export interface Option {
26
26
  | 'tools.ozone.team.defs#roleModerator'
27
27
  | 'tools.ozone.team.defs#roleTriage'
28
28
  | 'tools.ozone.team.defs#roleAdmin'
29
+ | 'tools.ozone.team.defs#roleVerifier'
29
30
  | (string & {})
30
31
  scope: 'instance' | 'personal' | (string & {})
31
32
  createdBy: string
@@ -26,6 +26,7 @@ export interface InputSchema {
26
26
  managerRole?:
27
27
  | 'tools.ozone.team.defs#roleModerator'
28
28
  | 'tools.ozone.team.defs#roleTriage'
29
+ | 'tools.ozone.team.defs#roleVerifier'
29
30
  | 'tools.ozone.team.defs#roleAdmin'
30
31
  | (string & {})
31
32
  }
@@ -23,6 +23,7 @@ export interface InputSchema {
23
23
  role:
24
24
  | 'tools.ozone.team.defs#roleAdmin'
25
25
  | 'tools.ozone.team.defs#roleModerator'
26
+ | 'tools.ozone.team.defs#roleVerifier'
26
27
  | 'tools.ozone.team.defs#roleTriage'
27
28
  | (string & {})
28
29
  }
@@ -27,6 +27,7 @@ export interface Member {
27
27
  | 'lex:tools.ozone.team.defs#roleAdmin'
28
28
  | 'lex:tools.ozone.team.defs#roleModerator'
29
29
  | 'lex:tools.ozone.team.defs#roleTriage'
30
+ | 'lex:tools.ozone.team.defs#roleVerifier'
30
31
  | (string & {})
31
32
  }
32
33
 
@@ -46,3 +47,5 @@ export const ROLEADMIN = `${id}#roleAdmin`
46
47
  export const ROLEMODERATOR = `${id}#roleModerator`
47
48
  /** Triage role. Mostly intended for monitoring and escalating issues. */
48
49
  export const ROLETRIAGE = `${id}#roleTriage`
50
+ /** Verifier role. Only allowed to issue verifications. */
51
+ export const ROLEVERIFIER = `${id}#roleVerifier`
@@ -24,6 +24,7 @@ export interface InputSchema {
24
24
  role?:
25
25
  | 'tools.ozone.team.defs#roleAdmin'
26
26
  | 'tools.ozone.team.defs#roleModerator'
27
+ | 'tools.ozone.team.defs#roleVerifier'
27
28
  | 'tools.ozone.team.defs#roleTriage'
28
29
  | (string & {})
29
30
  }
@@ -0,0 +1,59 @@
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
+ import type * as ToolsOzoneModerationDefs from '../moderation/defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'tools.ozone.verification.defs'
17
+
18
+ /** Verification data for the associated subject. */
19
+ export interface VerificationView {
20
+ $type?: 'tools.ozone.verification.defs#verificationView'
21
+ /** The user who issued this verification. */
22
+ issuer: string
23
+ /** The AT-URI of the verification record. */
24
+ uri: string
25
+ /** The subject of the verification. */
26
+ subject: string
27
+ /** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. */
28
+ handle: string
29
+ /** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. */
30
+ displayName: string
31
+ /** Timestamp when the verification was created. */
32
+ createdAt: string
33
+ /** Describes the reason for revocation, also indicating that the verification is no longer valid. */
34
+ revokeReason?: string
35
+ /** Timestamp when the verification was revoked. */
36
+ revokedAt?: string
37
+ /** The user who revoked this verification. */
38
+ revokedBy?: string
39
+ subjectProfile?: { $type: string }
40
+ issuerProfile?: { $type: string }
41
+ subjectRepo?:
42
+ | $Typed<ToolsOzoneModerationDefs.RepoViewDetail>
43
+ | $Typed<ToolsOzoneModerationDefs.RepoViewNotFound>
44
+ | { $type: string }
45
+ issuerRepo?:
46
+ | $Typed<ToolsOzoneModerationDefs.RepoViewDetail>
47
+ | $Typed<ToolsOzoneModerationDefs.RepoViewNotFound>
48
+ | { $type: string }
49
+ }
50
+
51
+ const hashVerificationView = 'verificationView'
52
+
53
+ export function isVerificationView<V>(v: V) {
54
+ return is$typed(v, id, hashVerificationView)
55
+ }
56
+
57
+ export function validateVerificationView<V>(v: V) {
58
+ return validate<VerificationView & V>(v, id, hashVerificationView)
59
+ }
@@ -0,0 +1,87 @@
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 ToolsOzoneVerificationDefs from './defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'tools.ozone.verification.grantVerifications'
18
+
19
+ export interface QueryParams {}
20
+
21
+ export interface InputSchema {
22
+ /** Array of verification requests to process */
23
+ verifications: VerificationInput[]
24
+ }
25
+
26
+ export interface OutputSchema {
27
+ verifications: ToolsOzoneVerificationDefs.VerificationView[]
28
+ failedVerifications: GrantError[]
29
+ }
30
+
31
+ export interface CallOptions {
32
+ signal?: AbortSignal
33
+ headers?: HeadersMap
34
+ qp?: QueryParams
35
+ encoding?: 'application/json'
36
+ }
37
+
38
+ export interface Response {
39
+ success: boolean
40
+ headers: HeadersMap
41
+ data: OutputSchema
42
+ }
43
+
44
+ export function toKnownErr(e: any) {
45
+ return e
46
+ }
47
+
48
+ export interface VerificationInput {
49
+ $type?: 'tools.ozone.verification.grantVerifications#verificationInput'
50
+ /** The did of the subject being verified */
51
+ subject: string
52
+ /** Handle of the subject the verification applies to at the moment of verifying. */
53
+ handle: string
54
+ /** Display name of the subject the verification applies to at the moment of verifying. */
55
+ displayName: string
56
+ /** Timestamp for verification record. Defaults to current time when not specified. */
57
+ createdAt?: string
58
+ }
59
+
60
+ const hashVerificationInput = 'verificationInput'
61
+
62
+ export function isVerificationInput<V>(v: V) {
63
+ return is$typed(v, id, hashVerificationInput)
64
+ }
65
+
66
+ export function validateVerificationInput<V>(v: V) {
67
+ return validate<VerificationInput & V>(v, id, hashVerificationInput)
68
+ }
69
+
70
+ /** Error object for failed verifications. */
71
+ export interface GrantError {
72
+ $type?: 'tools.ozone.verification.grantVerifications#grantError'
73
+ /** Error message describing the reason for failure. */
74
+ error: string
75
+ /** The did of the subject being verified */
76
+ subject: string
77
+ }
78
+
79
+ const hashGrantError = 'grantError'
80
+
81
+ export function isGrantError<V>(v: V) {
82
+ return is$typed(v, id, hashGrantError)
83
+ }
84
+
85
+ export function validateGrantError<V>(v: V) {
86
+ return validate<GrantError & V>(v, id, hashGrantError)
87
+ }