@atproto/bsky 0.0.31 → 0.0.33

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 +14 -0
  2. package/dist/db/index.js.map +2 -2
  3. package/dist/index.js +1276 -591
  4. package/dist/index.js.map +3 -3
  5. package/dist/indexer/subscription.d.ts +1 -0
  6. package/dist/lexicon/index.d.ts +22 -6
  7. package/dist/lexicon/lexicons.d.ts +419 -110
  8. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +21 -1
  9. package/dist/lexicon/types/com/atproto/admin/updateAccountPassword.d.ts +26 -0
  10. package/dist/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.d.ts +33 -0
  11. package/dist/lexicon/types/com/atproto/identity/requestPlcOperationSignature.d.ts +19 -0
  12. package/dist/lexicon/types/com/atproto/{temp/transferAccount.d.ts → identity/signPlcOperation.d.ts} +6 -8
  13. package/dist/lexicon/types/com/atproto/identity/submitPlcOperation.d.ts +25 -0
  14. package/dist/lexicon/types/com/atproto/{temp/pushBlob.d.ts → repo/importRepo.d.ts} +1 -2
  15. package/dist/lexicon/types/com/atproto/repo/listMissingBlobs.d.ts +41 -0
  16. package/dist/lexicon/types/com/atproto/server/activateAccount.d.ts +19 -0
  17. package/dist/lexicon/types/com/atproto/server/checkAccountStatus.d.ts +38 -0
  18. package/dist/lexicon/types/com/atproto/server/deactivateAccount.d.ts +25 -0
  19. package/dist/lexicon/types/com/atproto/server/describeServer.d.ts +1 -0
  20. package/dist/lexicon/types/com/atproto/{temp/importRepo.d.ts → server/getServiceAuth.d.ts} +8 -9
  21. package/dist/lexicon/types/com/atproto/sync/subscribeRepos.d.ts +9 -1
  22. package/dist/subscription/util.d.ts +1 -1
  23. package/package.json +6 -6
  24. package/src/indexer/subscription.ts +6 -0
  25. package/src/ingester/subscription.ts +2 -0
  26. package/src/lexicon/index.ts +136 -36
  27. package/src/lexicon/lexicons.ts +460 -138
  28. package/src/lexicon/types/app/bsky/actor/defs.ts +61 -0
  29. package/src/lexicon/types/app/bsky/feed/post.ts +1 -1
  30. package/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts +39 -0
  31. package/src/lexicon/types/com/atproto/identity/getRecommendedDidCredentials.ts +47 -0
  32. package/src/lexicon/types/com/atproto/identity/requestPlcOperationSignature.ts +31 -0
  33. package/src/lexicon/types/com/atproto/{temp/transferAccount.ts → identity/signPlcOperation.ts} +8 -15
  34. package/src/lexicon/types/com/atproto/identity/submitPlcOperation.ts +38 -0
  35. package/src/lexicon/types/com/atproto/{temp/pushBlob.ts → repo/importRepo.ts} +2 -5
  36. package/src/lexicon/types/com/atproto/repo/listMissingBlobs.ts +65 -0
  37. package/src/lexicon/types/com/atproto/server/activateAccount.ts +31 -0
  38. package/src/lexicon/types/com/atproto/server/checkAccountStatus.ts +51 -0
  39. package/src/lexicon/types/com/atproto/server/deactivateAccount.ts +39 -0
  40. package/src/lexicon/types/com/atproto/server/describeServer.ts +1 -0
  41. package/src/lexicon/types/com/atproto/{temp/importRepo.ts → server/getServiceAuth.ts} +10 -9
  42. package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +24 -3
  43. package/tests/auto-moderator/labeler.test.ts +2 -1
@@ -1695,6 +1695,32 @@ export declare const schemaDict: {
1695
1695
  };
1696
1696
  };
1697
1697
  };
1698
+ ComAtprotoAdminUpdateAccountPassword: {
1699
+ lexicon: number;
1700
+ id: string;
1701
+ defs: {
1702
+ main: {
1703
+ type: string;
1704
+ description: string;
1705
+ input: {
1706
+ encoding: string;
1707
+ schema: {
1708
+ type: string;
1709
+ required: string[];
1710
+ properties: {
1711
+ did: {
1712
+ type: string;
1713
+ format: string;
1714
+ };
1715
+ password: {
1716
+ type: string;
1717
+ };
1718
+ };
1719
+ };
1720
+ };
1721
+ };
1722
+ };
1723
+ };
1698
1724
  ComAtprotoAdminUpdateCommunicationTemplate: {
1699
1725
  lexicon: number;
1700
1726
  id: string;
@@ -1789,6 +1815,53 @@ export declare const schemaDict: {
1789
1815
  };
1790
1816
  };
1791
1817
  };
1818
+ ComAtprotoIdentityGetRecommendedDidCredentials: {
1819
+ lexicon: number;
1820
+ id: string;
1821
+ defs: {
1822
+ main: {
1823
+ type: string;
1824
+ description: string;
1825
+ output: {
1826
+ encoding: string;
1827
+ schema: {
1828
+ type: string;
1829
+ properties: {
1830
+ rotationKeys: {
1831
+ description: string;
1832
+ type: string;
1833
+ items: {
1834
+ type: string;
1835
+ };
1836
+ };
1837
+ alsoKnownAs: {
1838
+ type: string;
1839
+ items: {
1840
+ type: string;
1841
+ };
1842
+ };
1843
+ verificationMethods: {
1844
+ type: string;
1845
+ };
1846
+ services: {
1847
+ type: string;
1848
+ };
1849
+ };
1850
+ };
1851
+ };
1852
+ };
1853
+ };
1854
+ };
1855
+ ComAtprotoIdentityRequestPlcOperationSignature: {
1856
+ lexicon: number;
1857
+ id: string;
1858
+ defs: {
1859
+ main: {
1860
+ type: string;
1861
+ description: string;
1862
+ };
1863
+ };
1864
+ };
1792
1865
  ComAtprotoIdentityResolveHandle: {
1793
1866
  lexicon: number;
1794
1867
  id: string;
@@ -1823,6 +1896,81 @@ export declare const schemaDict: {
1823
1896
  };
1824
1897
  };
1825
1898
  };
1899
+ ComAtprotoIdentitySignPlcOperation: {
1900
+ lexicon: number;
1901
+ id: string;
1902
+ defs: {
1903
+ main: {
1904
+ type: string;
1905
+ description: string;
1906
+ input: {
1907
+ encoding: string;
1908
+ schema: {
1909
+ type: string;
1910
+ properties: {
1911
+ token: {
1912
+ description: string;
1913
+ type: string;
1914
+ };
1915
+ rotationKeys: {
1916
+ type: string;
1917
+ items: {
1918
+ type: string;
1919
+ };
1920
+ };
1921
+ alsoKnownAs: {
1922
+ type: string;
1923
+ items: {
1924
+ type: string;
1925
+ };
1926
+ };
1927
+ verificationMethods: {
1928
+ type: string;
1929
+ };
1930
+ services: {
1931
+ type: string;
1932
+ };
1933
+ };
1934
+ };
1935
+ };
1936
+ output: {
1937
+ encoding: string;
1938
+ schema: {
1939
+ type: string;
1940
+ required: string[];
1941
+ properties: {
1942
+ operation: {
1943
+ type: string;
1944
+ description: string;
1945
+ };
1946
+ };
1947
+ };
1948
+ };
1949
+ };
1950
+ };
1951
+ };
1952
+ ComAtprotoIdentitySubmitPlcOperation: {
1953
+ lexicon: number;
1954
+ id: string;
1955
+ defs: {
1956
+ main: {
1957
+ type: string;
1958
+ description: string;
1959
+ input: {
1960
+ encoding: string;
1961
+ schema: {
1962
+ type: string;
1963
+ required: string[];
1964
+ properties: {
1965
+ operation: {
1966
+ type: string;
1967
+ };
1968
+ };
1969
+ };
1970
+ };
1971
+ };
1972
+ };
1973
+ };
1826
1974
  ComAtprotoIdentityUpdateHandle: {
1827
1975
  lexicon: number;
1828
1976
  id: string;
@@ -2454,6 +2602,76 @@ export declare const schemaDict: {
2454
2602
  };
2455
2603
  };
2456
2604
  };
2605
+ ComAtprotoRepoImportRepo: {
2606
+ lexicon: number;
2607
+ id: string;
2608
+ defs: {
2609
+ main: {
2610
+ type: string;
2611
+ description: string;
2612
+ input: {
2613
+ encoding: string;
2614
+ };
2615
+ };
2616
+ };
2617
+ };
2618
+ ComAtprotoRepoListMissingBlobs: {
2619
+ lexicon: number;
2620
+ id: string;
2621
+ defs: {
2622
+ main: {
2623
+ type: string;
2624
+ description: string;
2625
+ parameters: {
2626
+ type: string;
2627
+ properties: {
2628
+ limit: {
2629
+ type: string;
2630
+ minimum: number;
2631
+ maximum: number;
2632
+ default: number;
2633
+ };
2634
+ cursor: {
2635
+ type: string;
2636
+ };
2637
+ };
2638
+ };
2639
+ output: {
2640
+ encoding: string;
2641
+ schema: {
2642
+ type: string;
2643
+ required: string[];
2644
+ properties: {
2645
+ cursor: {
2646
+ type: string;
2647
+ };
2648
+ blobs: {
2649
+ type: string;
2650
+ items: {
2651
+ type: string;
2652
+ ref: string;
2653
+ };
2654
+ };
2655
+ };
2656
+ };
2657
+ };
2658
+ };
2659
+ recordBlob: {
2660
+ type: string;
2661
+ required: string[];
2662
+ properties: {
2663
+ cid: {
2664
+ type: string;
2665
+ format: string;
2666
+ };
2667
+ recordUri: {
2668
+ type: string;
2669
+ format: string;
2670
+ };
2671
+ };
2672
+ };
2673
+ };
2674
+ };
2457
2675
  ComAtprotoRepoListRecords: {
2458
2676
  lexicon: number;
2459
2677
  id: string;
@@ -2658,6 +2876,63 @@ export declare const schemaDict: {
2658
2876
  };
2659
2877
  };
2660
2878
  };
2879
+ ComAtprotoServerActivateAccount: {
2880
+ lexicon: number;
2881
+ id: string;
2882
+ defs: {
2883
+ main: {
2884
+ type: string;
2885
+ description: string;
2886
+ };
2887
+ };
2888
+ };
2889
+ ComAtprotoServerCheckAccountStatus: {
2890
+ lexicon: number;
2891
+ id: string;
2892
+ defs: {
2893
+ main: {
2894
+ type: string;
2895
+ description: string;
2896
+ output: {
2897
+ encoding: string;
2898
+ schema: {
2899
+ type: string;
2900
+ required: string[];
2901
+ properties: {
2902
+ activated: {
2903
+ type: string;
2904
+ };
2905
+ validDid: {
2906
+ type: string;
2907
+ };
2908
+ repoCommit: {
2909
+ type: string;
2910
+ format: string;
2911
+ };
2912
+ repoRev: {
2913
+ type: string;
2914
+ };
2915
+ repoBlocks: {
2916
+ type: string;
2917
+ };
2918
+ indexedRecords: {
2919
+ type: string;
2920
+ };
2921
+ privateStateValues: {
2922
+ type: string;
2923
+ };
2924
+ expectedBlobs: {
2925
+ type: string;
2926
+ };
2927
+ importedBlobs: {
2928
+ type: string;
2929
+ };
2930
+ };
2931
+ };
2932
+ };
2933
+ };
2934
+ };
2935
+ };
2661
2936
  ComAtprotoServerConfirmEmail: {
2662
2937
  lexicon: number;
2663
2938
  id: string;
@@ -2983,6 +3258,29 @@ export declare const schemaDict: {
2983
3258
  };
2984
3259
  };
2985
3260
  };
3261
+ ComAtprotoServerDeactivateAccount: {
3262
+ lexicon: number;
3263
+ id: string;
3264
+ defs: {
3265
+ main: {
3266
+ type: string;
3267
+ description: string;
3268
+ input: {
3269
+ encoding: string;
3270
+ schema: {
3271
+ type: string;
3272
+ properties: {
3273
+ deleteAfter: {
3274
+ type: string;
3275
+ format: string;
3276
+ description: string;
3277
+ };
3278
+ };
3279
+ };
3280
+ };
3281
+ };
3282
+ };
3283
+ };
2986
3284
  ComAtprotoServerDefs: {
2987
3285
  lexicon: number;
2988
3286
  id: string;
@@ -3110,6 +3408,10 @@ export declare const schemaDict: {
3110
3408
  description: string;
3111
3409
  ref: string;
3112
3410
  };
3411
+ did: {
3412
+ type: string;
3413
+ format: string;
3414
+ };
3113
3415
  };
3114
3416
  };
3115
3417
  };
@@ -3170,6 +3472,39 @@ export declare const schemaDict: {
3170
3472
  };
3171
3473
  };
3172
3474
  };
3475
+ ComAtprotoServerGetServiceAuth: {
3476
+ lexicon: number;
3477
+ id: string;
3478
+ defs: {
3479
+ main: {
3480
+ type: string;
3481
+ description: string;
3482
+ parameters: {
3483
+ type: string;
3484
+ required: string[];
3485
+ properties: {
3486
+ aud: {
3487
+ type: string;
3488
+ format: string;
3489
+ description: string;
3490
+ };
3491
+ };
3492
+ };
3493
+ output: {
3494
+ encoding: string;
3495
+ schema: {
3496
+ type: string;
3497
+ required: string[];
3498
+ properties: {
3499
+ token: {
3500
+ type: string;
3501
+ };
3502
+ };
3503
+ };
3504
+ };
3505
+ };
3506
+ };
3507
+ };
3173
3508
  ComAtprotoServerGetSession: {
3174
3509
  lexicon: number;
3175
3510
  id: string;
@@ -3949,6 +4284,24 @@ export declare const schemaDict: {
3949
4284
  };
3950
4285
  };
3951
4286
  };
4287
+ identity: {
4288
+ type: string;
4289
+ description: string;
4290
+ required: string[];
4291
+ properties: {
4292
+ seq: {
4293
+ type: string;
4294
+ };
4295
+ did: {
4296
+ type: string;
4297
+ format: string;
4298
+ };
4299
+ time: {
4300
+ type: string;
4301
+ format: string;
4302
+ };
4303
+ };
4304
+ };
3952
4305
  handle: {
3953
4306
  type: string;
3954
4307
  description: string;
@@ -4113,57 +4466,6 @@ export declare const schemaDict: {
4113
4466
  };
4114
4467
  };
4115
4468
  };
4116
- ComAtprotoTempImportRepo: {
4117
- lexicon: number;
4118
- id: string;
4119
- defs: {
4120
- main: {
4121
- type: string;
4122
- description: string;
4123
- parameters: {
4124
- type: string;
4125
- required: string[];
4126
- properties: {
4127
- did: {
4128
- type: string;
4129
- format: string;
4130
- description: string;
4131
- };
4132
- };
4133
- };
4134
- input: {
4135
- encoding: string;
4136
- };
4137
- output: {
4138
- encoding: string;
4139
- };
4140
- };
4141
- };
4142
- };
4143
- ComAtprotoTempPushBlob: {
4144
- lexicon: number;
4145
- id: string;
4146
- defs: {
4147
- main: {
4148
- type: string;
4149
- description: string;
4150
- parameters: {
4151
- type: string;
4152
- required: string[];
4153
- properties: {
4154
- did: {
4155
- type: string;
4156
- format: string;
4157
- description: string;
4158
- };
4159
- };
4160
- };
4161
- input: {
4162
- encoding: string;
4163
- };
4164
- };
4165
- };
4166
- };
4167
4469
  ComAtprotoTempRequestPhoneVerification: {
4168
4470
  lexicon: number;
4169
4471
  id: string;
@@ -4186,62 +4488,6 @@ export declare const schemaDict: {
4186
4488
  };
4187
4489
  };
4188
4490
  };
4189
- ComAtprotoTempTransferAccount: {
4190
- lexicon: number;
4191
- id: string;
4192
- defs: {
4193
- main: {
4194
- type: string;
4195
- description: string;
4196
- input: {
4197
- encoding: string;
4198
- schema: {
4199
- type: string;
4200
- required: string[];
4201
- properties: {
4202
- handle: {
4203
- type: string;
4204
- format: string;
4205
- };
4206
- did: {
4207
- type: string;
4208
- format: string;
4209
- };
4210
- plcOp: {
4211
- type: string;
4212
- };
4213
- };
4214
- };
4215
- };
4216
- output: {
4217
- encoding: string;
4218
- schema: {
4219
- type: string;
4220
- required: string[];
4221
- properties: {
4222
- accessJwt: {
4223
- type: string;
4224
- };
4225
- refreshJwt: {
4226
- type: string;
4227
- };
4228
- handle: {
4229
- type: string;
4230
- format: string;
4231
- };
4232
- did: {
4233
- type: string;
4234
- format: string;
4235
- };
4236
- };
4237
- };
4238
- };
4239
- errors: {
4240
- name: string;
4241
- }[];
4242
- };
4243
- };
4244
- };
4245
4491
  AppBskyActorDefs: {
4246
4492
  lexicon: number;
4247
4493
  id: string;
@@ -4530,6 +4776,61 @@ export declare const schemaDict: {
4530
4776
  };
4531
4777
  };
4532
4778
  };
4779
+ mutedWordTarget: {
4780
+ type: string;
4781
+ knownValues: string[];
4782
+ maxLength: number;
4783
+ maxGraphemes: number;
4784
+ };
4785
+ mutedWord: {
4786
+ type: string;
4787
+ description: string;
4788
+ required: string[];
4789
+ properties: {
4790
+ value: {
4791
+ type: string;
4792
+ description: string;
4793
+ maxLength: number;
4794
+ maxGraphemes: number;
4795
+ };
4796
+ targets: {
4797
+ type: string;
4798
+ description: string;
4799
+ items: {
4800
+ type: string;
4801
+ ref: string;
4802
+ };
4803
+ };
4804
+ };
4805
+ };
4806
+ mutedWordsPref: {
4807
+ type: string;
4808
+ required: string[];
4809
+ properties: {
4810
+ items: {
4811
+ type: string;
4812
+ items: {
4813
+ type: string;
4814
+ ref: string;
4815
+ };
4816
+ description: string;
4817
+ };
4818
+ };
4819
+ };
4820
+ hiddenPostsPref: {
4821
+ type: string;
4822
+ required: string[];
4823
+ properties: {
4824
+ items: {
4825
+ type: string;
4826
+ items: {
4827
+ type: string;
4828
+ format: string;
4829
+ };
4830
+ description: string;
4831
+ };
4832
+ };
4833
+ };
4533
4834
  };
4534
4835
  };
4535
4836
  AppBskyActorGetPreferences: {
@@ -7930,9 +8231,14 @@ export declare const ids: {
7930
8231
  ComAtprotoAdminSendEmail: string;
7931
8232
  ComAtprotoAdminUpdateAccountEmail: string;
7932
8233
  ComAtprotoAdminUpdateAccountHandle: string;
8234
+ ComAtprotoAdminUpdateAccountPassword: string;
7933
8235
  ComAtprotoAdminUpdateCommunicationTemplate: string;
7934
8236
  ComAtprotoAdminUpdateSubjectStatus: string;
8237
+ ComAtprotoIdentityGetRecommendedDidCredentials: string;
8238
+ ComAtprotoIdentityRequestPlcOperationSignature: string;
7935
8239
  ComAtprotoIdentityResolveHandle: string;
8240
+ ComAtprotoIdentitySignPlcOperation: string;
8241
+ ComAtprotoIdentitySubmitPlcOperation: string;
7936
8242
  ComAtprotoIdentityUpdateHandle: string;
7937
8243
  ComAtprotoLabelDefs: string;
7938
8244
  ComAtprotoLabelQueryLabels: string;
@@ -7944,21 +8250,27 @@ export declare const ids: {
7944
8250
  ComAtprotoRepoDeleteRecord: string;
7945
8251
  ComAtprotoRepoDescribeRepo: string;
7946
8252
  ComAtprotoRepoGetRecord: string;
8253
+ ComAtprotoRepoImportRepo: string;
8254
+ ComAtprotoRepoListMissingBlobs: string;
7947
8255
  ComAtprotoRepoListRecords: string;
7948
8256
  ComAtprotoRepoPutRecord: string;
7949
8257
  ComAtprotoRepoStrongRef: string;
7950
8258
  ComAtprotoRepoUploadBlob: string;
8259
+ ComAtprotoServerActivateAccount: string;
8260
+ ComAtprotoServerCheckAccountStatus: string;
7951
8261
  ComAtprotoServerConfirmEmail: string;
7952
8262
  ComAtprotoServerCreateAccount: string;
7953
8263
  ComAtprotoServerCreateAppPassword: string;
7954
8264
  ComAtprotoServerCreateInviteCode: string;
7955
8265
  ComAtprotoServerCreateInviteCodes: string;
7956
8266
  ComAtprotoServerCreateSession: string;
8267
+ ComAtprotoServerDeactivateAccount: string;
7957
8268
  ComAtprotoServerDefs: string;
7958
8269
  ComAtprotoServerDeleteAccount: string;
7959
8270
  ComAtprotoServerDeleteSession: string;
7960
8271
  ComAtprotoServerDescribeServer: string;
7961
8272
  ComAtprotoServerGetAccountInviteCodes: string;
8273
+ ComAtprotoServerGetServiceAuth: string;
7962
8274
  ComAtprotoServerGetSession: string;
7963
8275
  ComAtprotoServerListAppPasswords: string;
7964
8276
  ComAtprotoServerRefreshSession: string;
@@ -7984,10 +8296,7 @@ export declare const ids: {
7984
8296
  ComAtprotoSyncSubscribeRepos: string;
7985
8297
  ComAtprotoTempCheckSignupQueue: string;
7986
8298
  ComAtprotoTempFetchLabels: string;
7987
- ComAtprotoTempImportRepo: string;
7988
- ComAtprotoTempPushBlob: string;
7989
8299
  ComAtprotoTempRequestPhoneVerification: string;
7990
- ComAtprotoTempTransferAccount: string;
7991
8300
  AppBskyActorDefs: string;
7992
8301
  AppBskyActorGetPreferences: string;
7993
8302
  AppBskyActorGetProfile: string;
@@ -54,7 +54,7 @@ export interface ViewerState {
54
54
  }
55
55
  export declare function isViewerState(v: unknown): v is ViewerState;
56
56
  export declare function validateViewerState(v: unknown): ValidationResult;
57
- export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | InterestsPref | {
57
+ export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | InterestsPref | MutedWordsPref | HiddenPostsPref | {
58
58
  $type: string;
59
59
  [k: string]: unknown;
60
60
  })[];
@@ -109,3 +109,23 @@ export interface InterestsPref {
109
109
  }
110
110
  export declare function isInterestsPref(v: unknown): v is InterestsPref;
111
111
  export declare function validateInterestsPref(v: unknown): ValidationResult;
112
+ export type MutedWordTarget = 'content' | 'tag' | (string & {});
113
+ export interface MutedWord {
114
+ value: string;
115
+ targets: MutedWordTarget[];
116
+ [k: string]: unknown;
117
+ }
118
+ export declare function isMutedWord(v: unknown): v is MutedWord;
119
+ export declare function validateMutedWord(v: unknown): ValidationResult;
120
+ export interface MutedWordsPref {
121
+ items: MutedWord[];
122
+ [k: string]: unknown;
123
+ }
124
+ export declare function isMutedWordsPref(v: unknown): v is MutedWordsPref;
125
+ export declare function validateMutedWordsPref(v: unknown): ValidationResult;
126
+ export interface HiddenPostsPref {
127
+ items: string[];
128
+ [k: string]: unknown;
129
+ }
130
+ export declare function isHiddenPostsPref(v: unknown): v is HiddenPostsPref;
131
+ export declare function validateHiddenPostsPref(v: unknown): ValidationResult;
@@ -0,0 +1,26 @@
1
+ import express from 'express';
2
+ import { HandlerAuth } from '@atproto/xrpc-server';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ did: string;
7
+ password: string;
8
+ [k: string]: unknown;
9
+ }
10
+ export interface HandlerInput {
11
+ encoding: 'application/json';
12
+ body: InputSchema;
13
+ }
14
+ export interface HandlerError {
15
+ status: number;
16
+ message?: string;
17
+ }
18
+ export type HandlerOutput = HandlerError | void;
19
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
20
+ auth: HA;
21
+ params: QueryParams;
22
+ input: HandlerInput;
23
+ req: express.Request;
24
+ res: express.Response;
25
+ };
26
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;