@atproto/pds 0.4.102 → 0.4.104

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 (163) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
  3. package/dist/api/com/atproto/admin/sendEmail.js +2 -7
  4. package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
  5. package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
  6. package/dist/api/com/atproto/admin/updateAccountEmail.js +1 -2
  7. package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
  8. package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
  9. package/dist/api/com/atproto/admin/updateAccountPassword.js +1 -2
  10. package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
  11. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
  12. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +2 -7
  13. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
  14. package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
  15. package/dist/api/com/atproto/identity/signPlcOperation.js +2 -7
  16. package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
  17. package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
  18. package/dist/api/com/atproto/identity/updateHandle.js +2 -7
  19. package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
  20. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  21. package/dist/api/com/atproto/repo/applyWrites.js +12 -7
  22. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  23. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  24. package/dist/api/com/atproto/repo/createRecord.js +12 -8
  25. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  26. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  27. package/dist/api/com/atproto/repo/deleteRecord.js +12 -7
  28. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  29. package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
  30. package/dist/api/com/atproto/repo/listRecords.js +1 -3
  31. package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
  32. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  33. package/dist/api/com/atproto/repo/putRecord.js +11 -8
  34. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  35. package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
  36. package/dist/api/com/atproto/server/activateAccount.js +1 -2
  37. package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
  38. package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
  39. package/dist/api/com/atproto/server/confirmEmail.js +2 -7
  40. package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
  41. package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
  42. package/dist/api/com/atproto/server/createAppPassword.js +2 -7
  43. package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
  44. package/dist/api/com/atproto/server/createSession.js +1 -1
  45. package/dist/api/com/atproto/server/createSession.js.map +1 -1
  46. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  47. package/dist/api/com/atproto/server/deactivateAccount.js +1 -2
  48. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  49. package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
  50. package/dist/api/com/atproto/server/deleteAccount.js +1 -2
  51. package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
  52. package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
  53. package/dist/api/com/atproto/server/deleteSession.js +2 -3
  54. package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
  55. package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
  56. package/dist/api/com/atproto/server/getAccountInviteCodes.js +2 -7
  57. package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
  58. package/dist/api/com/atproto/server/getSession.js +1 -1
  59. package/dist/api/com/atproto/server/getSession.js.map +1 -1
  60. package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
  61. package/dist/api/com/atproto/server/listAppPasswords.js +2 -7
  62. package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
  63. package/dist/api/com/atproto/server/refreshSession.js +1 -1
  64. package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
  65. package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
  66. package/dist/api/com/atproto/server/requestAccountDelete.js +2 -7
  67. package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
  68. package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
  69. package/dist/api/com/atproto/server/requestEmailConfirmation.js +2 -7
  70. package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
  71. package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
  72. package/dist/api/com/atproto/server/requestEmailUpdate.js +2 -7
  73. package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
  74. package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
  75. package/dist/api/com/atproto/server/requestPasswordReset.js +1 -2
  76. package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
  77. package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
  78. package/dist/api/com/atproto/server/resetPassword.js +1 -2
  79. package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
  80. package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
  81. package/dist/api/com/atproto/server/revokeAppPassword.js +2 -7
  82. package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
  83. package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
  84. package/dist/api/com/atproto/server/updateEmail.js +2 -7
  85. package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
  86. package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
  87. package/dist/api/com/atproto/sync/getRecord.js +1 -4
  88. package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
  89. package/dist/api/com/atproto/temp/checkSignupQueue.js +1 -1
  90. package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
  91. package/dist/api/proxy.d.ts +7 -8
  92. package/dist/api/proxy.d.ts.map +1 -1
  93. package/dist/api/proxy.js +14 -6
  94. package/dist/api/proxy.js.map +1 -1
  95. package/dist/context.d.ts +7 -0
  96. package/dist/context.d.ts.map +1 -1
  97. package/dist/context.js +12 -0
  98. package/dist/context.js.map +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/index.js.map +1 -1
  101. package/dist/lexicon/lexicons.d.ts +108 -28
  102. package/dist/lexicon/lexicons.d.ts.map +1 -1
  103. package/dist/lexicon/lexicons.js +54 -14
  104. package/dist/lexicon/lexicons.js.map +1 -1
  105. package/dist/lexicon/types/app/bsky/labeler/defs.d.ts +7 -0
  106. package/dist/lexicon/types/app/bsky/labeler/defs.d.ts.map +1 -1
  107. package/dist/lexicon/types/app/bsky/labeler/defs.js.map +1 -1
  108. package/dist/lexicon/types/app/bsky/labeler/service.d.ts +7 -0
  109. package/dist/lexicon/types/app/bsky/labeler/service.d.ts.map +1 -1
  110. package/dist/lexicon/types/app/bsky/labeler/service.js.map +1 -1
  111. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +2 -0
  112. package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
  113. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +0 -4
  114. package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts.map +1 -1
  115. package/dist/lexicon/types/com/atproto/repo/listRecords.js.map +1 -1
  116. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +0 -2
  117. package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
  118. package/dist/oauth/provider.d.ts +2 -2
  119. package/dist/oauth/provider.d.ts.map +1 -1
  120. package/dist/oauth/provider.js +2 -1
  121. package/dist/oauth/provider.js.map +1 -1
  122. package/package.json +5 -5
  123. package/src/api/com/atproto/admin/sendEmail.ts +3 -5
  124. package/src/api/com/atproto/admin/updateAccountEmail.ts +1 -2
  125. package/src/api/com/atproto/admin/updateAccountPassword.ts +1 -2
  126. package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +3 -5
  127. package/src/api/com/atproto/identity/signPlcOperation.ts +3 -5
  128. package/src/api/com/atproto/identity/updateHandle.ts +3 -6
  129. package/src/api/com/atproto/repo/applyWrites.ts +21 -11
  130. package/src/api/com/atproto/repo/createRecord.ts +19 -14
  131. package/src/api/com/atproto/repo/deleteRecord.ts +26 -14
  132. package/src/api/com/atproto/repo/listRecords.ts +1 -11
  133. package/src/api/com/atproto/repo/putRecord.ts +24 -16
  134. package/src/api/com/atproto/server/activateAccount.ts +1 -2
  135. package/src/api/com/atproto/server/confirmEmail.ts +3 -5
  136. package/src/api/com/atproto/server/createAppPassword.ts +3 -6
  137. package/src/api/com/atproto/server/createSession.ts +2 -2
  138. package/src/api/com/atproto/server/deactivateAccount.ts +1 -2
  139. package/src/api/com/atproto/server/deleteAccount.ts +1 -2
  140. package/src/api/com/atproto/server/deleteSession.ts +2 -3
  141. package/src/api/com/atproto/server/getAccountInviteCodes.ts +3 -5
  142. package/src/api/com/atproto/server/getSession.ts +2 -2
  143. package/src/api/com/atproto/server/listAppPasswords.ts +3 -5
  144. package/src/api/com/atproto/server/refreshSession.ts +2 -2
  145. package/src/api/com/atproto/server/requestAccountDelete.ts +3 -5
  146. package/src/api/com/atproto/server/requestEmailConfirmation.ts +3 -5
  147. package/src/api/com/atproto/server/requestEmailUpdate.ts +3 -5
  148. package/src/api/com/atproto/server/requestPasswordReset.ts +1 -2
  149. package/src/api/com/atproto/server/resetPassword.ts +1 -2
  150. package/src/api/com/atproto/server/revokeAppPassword.ts +3 -5
  151. package/src/api/com/atproto/server/updateEmail.ts +3 -5
  152. package/src/api/com/atproto/sync/getRecord.ts +1 -3
  153. package/src/api/com/atproto/temp/checkSignupQueue.ts +2 -2
  154. package/src/api/proxy.ts +19 -19
  155. package/src/context.ts +19 -0
  156. package/src/index.ts +1 -1
  157. package/src/lexicon/lexicons.ts +60 -17
  158. package/src/lexicon/types/app/bsky/labeler/defs.ts +7 -0
  159. package/src/lexicon/types/app/bsky/labeler/service.ts +7 -0
  160. package/src/lexicon/types/com/atproto/moderation/defs.ts +3 -0
  161. package/src/lexicon/types/com/atproto/repo/listRecords.ts +0 -4
  162. package/src/lexicon/types/com/atproto/sync/getRecord.ts +0 -2
  163. package/src/oauth/provider.ts +3 -1
@@ -7,6 +7,7 @@ import { validate as _validate } from '../../../../lexicons'
7
7
  import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
8
8
  import type * as AppBskyActorDefs from '../actor/defs.js'
9
9
  import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+ import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js'
10
11
 
11
12
  const is$typed = _is$typed,
12
13
  validate = _validate
@@ -43,6 +44,12 @@ export interface LabelerViewDetailed {
43
44
  viewer?: LabelerViewerState
44
45
  indexedAt: string
45
46
  labels?: ComAtprotoLabelDefs.Label[]
47
+ /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */
48
+ reasonTypes?: ComAtprotoModerationDefs.ReasonType[]
49
+ /** The set of subject types (account, record, etc) this service accepts reports on. */
50
+ subjectTypes?: ComAtprotoModerationDefs.SubjectType[]
51
+ /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */
52
+ subjectCollections?: string[]
46
53
  }
47
54
 
48
55
  const hashLabelerViewDetailed = 'labelerViewDetailed'
@@ -7,6 +7,7 @@ import { validate as _validate } from '../../../../lexicons'
7
7
  import { $Typed, is$typed as _is$typed, OmitKey } from '../../../../util'
8
8
  import type * as AppBskyLabelerDefs from './defs.js'
9
9
  import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
10
+ import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js'
10
11
 
11
12
  const is$typed = _is$typed,
12
13
  validate = _validate
@@ -17,6 +18,12 @@ export interface Record {
17
18
  policies: AppBskyLabelerDefs.LabelerPolicies
18
19
  labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }
19
20
  createdAt: string
21
+ /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */
22
+ reasonTypes?: ComAtprotoModerationDefs.ReasonType[]
23
+ /** The set of subject types (account, record, etc) this service accepts reports on. */
24
+ subjectTypes?: ComAtprotoModerationDefs.SubjectType[]
25
+ /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */
26
+ subjectCollections?: string[]
20
27
  [k: string]: unknown
21
28
  }
22
29
 
@@ -34,3 +34,6 @@ export const REASONRUDE = `${id}#reasonRude`
34
34
  export const REASONOTHER = `${id}#reasonOther`
35
35
  /** Appeal: appeal a previously taken moderation action */
36
36
  export const REASONAPPEAL = `${id}#reasonAppeal`
37
+
38
+ /** Tag describing a type of subject that might be reported. */
39
+ export type SubjectType = 'account' | 'record' | 'chat' | (string & {})
@@ -20,10 +20,6 @@ export interface QueryParams {
20
20
  /** The number of records to return. */
21
21
  limit: number
22
22
  cursor?: string
23
- /** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
24
- rkeyStart?: string
25
- /** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
26
- rkeyEnd?: string
27
23
  /** Flag to reverse the order of the returned records. */
28
24
  reverse?: boolean
29
25
  }
@@ -19,8 +19,6 @@ export interface QueryParams {
19
19
  collection: string
20
20
  /** Record Key */
21
21
  rkey: string
22
- /** DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit */
23
- commit?: string
24
22
  }
25
23
 
26
24
  export type InputSchema = undefined
@@ -10,7 +10,7 @@ export type AuthProviderOptions = {
10
10
  accountManager: AccountManager
11
11
  } & Pick<
12
12
  OAuthProviderOptions,
13
- 'issuer' | 'redis' | 'keyset' | 'dpopSecret' | 'customization'
13
+ 'issuer' | 'redis' | 'keyset' | 'dpopSecret' | 'customization' | 'trustProxy'
14
14
  > &
15
15
  Required<Pick<OAuthProviderOptions, 'safeFetch'>>
16
16
 
@@ -23,6 +23,7 @@ export class PdsOAuthProvider extends OAuthProvider {
23
23
  issuer,
24
24
  customization,
25
25
  safeFetch,
26
+ trustProxy,
26
27
  }: AuthProviderOptions) {
27
28
  super({
28
29
  issuer,
@@ -32,6 +33,7 @@ export class PdsOAuthProvider extends OAuthProvider {
32
33
  safeFetch,
33
34
  customization,
34
35
  store: accountManager,
36
+ trustProxy,
35
37
  metadata: {
36
38
  // PdsOAuthProvider is used when the PDS is both an authorization server
37
39
  // & resource server, in which case the issuer origin is also the