@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.
- package/CHANGELOG.md +22 -0
- package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/sendEmail.js +2 -7
- package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountEmail.js +1 -2
- package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/admin/updateAccountPassword.js +1 -2
- package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js +2 -7
- package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/signPlcOperation.js +2 -7
- package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
- package/dist/api/com/atproto/identity/updateHandle.js +2 -7
- package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/applyWrites.js +12 -7
- package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/createRecord.js +12 -8
- package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/deleteRecord.js +12 -7
- package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/listRecords.js +1 -3
- package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/repo/putRecord.js +11 -8
- package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/activateAccount.js +1 -2
- package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/confirmEmail.js +2 -7
- package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/createAppPassword.js +2 -7
- package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/createSession.js +1 -1
- package/dist/api/com/atproto/server/createSession.js.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deactivateAccount.js +1 -2
- package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteAccount.js +1 -2
- package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/api/com/atproto/server/deleteSession.js +2 -3
- package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
- package/dist/api/com/atproto/server/getAccountInviteCodes.js +2 -7
- package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
- package/dist/api/com/atproto/server/getSession.js +1 -1
- package/dist/api/com/atproto/server/getSession.js.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
- package/dist/api/com/atproto/server/listAppPasswords.js +2 -7
- package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/api/com/atproto/server/refreshSession.js +1 -1
- package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestAccountDelete.js +2 -7
- package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailConfirmation.js +2 -7
- package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestEmailUpdate.js +2 -7
- package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
- package/dist/api/com/atproto/server/requestPasswordReset.js +1 -2
- package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/resetPassword.js +1 -2
- package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
- package/dist/api/com/atproto/server/revokeAppPassword.js +2 -7
- package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
- package/dist/api/com/atproto/server/updateEmail.js +2 -7
- package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/api/com/atproto/sync/getRecord.js +1 -4
- package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js +1 -1
- package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
- package/dist/api/proxy.d.ts +7 -8
- package/dist/api/proxy.d.ts.map +1 -1
- package/dist/api/proxy.js +14 -6
- package/dist/api/proxy.js.map +1 -1
- package/dist/context.d.ts +7 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +12 -0
- package/dist/context.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +108 -28
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +54 -14
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/defs.d.ts +7 -0
- package/dist/lexicon/types/app/bsky/labeler/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/service.d.ts +7 -0
- package/dist/lexicon/types/app/bsky/labeler/service.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/labeler/service.js.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +2 -0
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts +0 -4
- package/dist/lexicon/types/com/atproto/repo/listRecords.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts +0 -2
- package/dist/lexicon/types/com/atproto/sync/getRecord.d.ts.map +1 -1
- package/dist/oauth/provider.d.ts +2 -2
- package/dist/oauth/provider.d.ts.map +1 -1
- package/dist/oauth/provider.js +2 -1
- package/dist/oauth/provider.js.map +1 -1
- package/package.json +5 -5
- package/src/api/com/atproto/admin/sendEmail.ts +3 -5
- package/src/api/com/atproto/admin/updateAccountEmail.ts +1 -2
- package/src/api/com/atproto/admin/updateAccountPassword.ts +1 -2
- package/src/api/com/atproto/identity/requestPlcOperationSignature.ts +3 -5
- package/src/api/com/atproto/identity/signPlcOperation.ts +3 -5
- package/src/api/com/atproto/identity/updateHandle.ts +3 -6
- package/src/api/com/atproto/repo/applyWrites.ts +21 -11
- package/src/api/com/atproto/repo/createRecord.ts +19 -14
- package/src/api/com/atproto/repo/deleteRecord.ts +26 -14
- package/src/api/com/atproto/repo/listRecords.ts +1 -11
- package/src/api/com/atproto/repo/putRecord.ts +24 -16
- package/src/api/com/atproto/server/activateAccount.ts +1 -2
- package/src/api/com/atproto/server/confirmEmail.ts +3 -5
- package/src/api/com/atproto/server/createAppPassword.ts +3 -6
- package/src/api/com/atproto/server/createSession.ts +2 -2
- package/src/api/com/atproto/server/deactivateAccount.ts +1 -2
- package/src/api/com/atproto/server/deleteAccount.ts +1 -2
- package/src/api/com/atproto/server/deleteSession.ts +2 -3
- package/src/api/com/atproto/server/getAccountInviteCodes.ts +3 -5
- package/src/api/com/atproto/server/getSession.ts +2 -2
- package/src/api/com/atproto/server/listAppPasswords.ts +3 -5
- package/src/api/com/atproto/server/refreshSession.ts +2 -2
- package/src/api/com/atproto/server/requestAccountDelete.ts +3 -5
- package/src/api/com/atproto/server/requestEmailConfirmation.ts +3 -5
- package/src/api/com/atproto/server/requestEmailUpdate.ts +3 -5
- package/src/api/com/atproto/server/requestPasswordReset.ts +1 -2
- package/src/api/com/atproto/server/resetPassword.ts +1 -2
- package/src/api/com/atproto/server/revokeAppPassword.ts +3 -5
- package/src/api/com/atproto/server/updateEmail.ts +3 -5
- package/src/api/com/atproto/sync/getRecord.ts +1 -3
- package/src/api/com/atproto/temp/checkSignupQueue.ts +2 -2
- package/src/api/proxy.ts +19 -19
- package/src/context.ts +19 -0
- package/src/index.ts +1 -1
- package/src/lexicon/lexicons.ts +60 -17
- package/src/lexicon/types/app/bsky/labeler/defs.ts +7 -0
- package/src/lexicon/types/app/bsky/labeler/service.ts +7 -0
- package/src/lexicon/types/com/atproto/moderation/defs.ts +3 -0
- package/src/lexicon/types/com/atproto/repo/listRecords.ts +0 -4
- package/src/lexicon/types/com/atproto/sync/getRecord.ts +0 -2
- 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
|
}
|
package/src/oauth/provider.ts
CHANGED
@@ -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
|