@atproto/api
Advanced tools
Comparing version 0.12.21 to 0.12.22-next.0
@@ -15,2 +15,3 @@ /** | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
createdAt?: string; | ||
[k: string]: unknown; | ||
@@ -28,2 +29,3 @@ } | ||
indexedAt?: string; | ||
createdAt?: string; | ||
viewer?: ViewerState; | ||
@@ -46,3 +48,5 @@ labels?: ComAtprotoLabelDefs.Label[]; | ||
associated?: ProfileAssociated; | ||
joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic; | ||
indexedAt?: string; | ||
createdAt?: string; | ||
viewer?: ViewerState; | ||
@@ -57,2 +61,3 @@ labels?: ComAtprotoLabelDefs.Label[]; | ||
feedgens?: number; | ||
starterPacks?: number; | ||
labeler?: boolean; | ||
@@ -59,0 +64,0 @@ chat?: ProfileAssociatedChat; |
@@ -6,2 +6,3 @@ /** | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'; | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'; | ||
export interface Record { | ||
@@ -19,2 +20,4 @@ displayName?: string; | ||
}; | ||
joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main; | ||
createdAt?: string; | ||
[k: string]: unknown; | ||
@@ -21,0 +24,0 @@ } |
@@ -8,2 +8,3 @@ /** | ||
import * as AppBskyRichtextFacet from '../richtext/facet'; | ||
import * as AppBskyFeedDefs from '../feed/defs'; | ||
export interface ListViewBasic { | ||
@@ -15,2 +16,3 @@ uri: string; | ||
avatar?: string; | ||
listItemCount?: number; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
@@ -32,2 +34,3 @@ viewer?: ListViewerState; | ||
avatar?: string; | ||
listItemCount?: number; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
@@ -47,3 +50,33 @@ viewer?: ListViewerState; | ||
export declare function validateListItemView(v: unknown): ValidationResult; | ||
export type ListPurpose = 'app.bsky.graph.defs#modlist' | 'app.bsky.graph.defs#curatelist' | (string & {}); | ||
export interface StarterPackView { | ||
uri: string; | ||
cid: string; | ||
record: {}; | ||
creator: AppBskyActorDefs.ProfileViewBasic; | ||
list?: ListViewBasic; | ||
listItemsSample?: ListItemView[]; | ||
feeds?: AppBskyFeedDefs.GeneratorView[]; | ||
joinedWeekCount?: number; | ||
joinedAllTimeCount?: number; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
indexedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isStarterPackView(v: unknown): v is StarterPackView; | ||
export declare function validateStarterPackView(v: unknown): ValidationResult; | ||
export interface StarterPackViewBasic { | ||
uri: string; | ||
cid: string; | ||
record: {}; | ||
creator: AppBskyActorDefs.ProfileViewBasic; | ||
listItemCount?: number; | ||
joinedWeekCount?: number; | ||
joinedAllTimeCount?: number; | ||
labels?: ComAtprotoLabelDefs.Label[]; | ||
indexedAt: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isStarterPackViewBasic(v: unknown): v is StarterPackViewBasic; | ||
export declare function validateStarterPackViewBasic(v: unknown): ValidationResult; | ||
export type ListPurpose = 'app.bsky.graph.defs#modlist' | 'app.bsky.graph.defs#curatelist' | 'app.bsky.graph.defs#referencelist' | (string & {}); | ||
/** A list of actors to apply an aggregate moderation action (mute/block) on. */ | ||
@@ -53,2 +86,4 @@ export declare const MODLIST = "app.bsky.graph.defs#modlist"; | ||
export declare const CURATELIST = "app.bsky.graph.defs#curatelist"; | ||
/** A list of actors used for only for reference purposes such as within a starter pack. */ | ||
export declare const REFERENCELIST = "app.bsky.graph.defs#referencelist"; | ||
export interface ListViewerState { | ||
@@ -55,0 +90,0 @@ muted?: boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateRelationship = exports.isRelationship = exports.validateNotFoundActor = exports.isNotFoundActor = exports.validateListViewerState = exports.isListViewerState = exports.CURATELIST = exports.MODLIST = exports.validateListItemView = exports.isListItemView = exports.validateListView = exports.isListView = exports.validateListViewBasic = exports.isListViewBasic = void 0; | ||
exports.validateRelationship = exports.isRelationship = exports.validateNotFoundActor = exports.isNotFoundActor = exports.validateListViewerState = exports.isListViewerState = exports.REFERENCELIST = exports.CURATELIST = exports.MODLIST = exports.validateStarterPackViewBasic = exports.isStarterPackViewBasic = exports.validateStarterPackView = exports.isStarterPackView = exports.validateListItemView = exports.isListItemView = exports.validateListView = exports.isListView = exports.validateListViewBasic = exports.isListViewBasic = void 0; | ||
const util_1 = require("../../../../util"); | ||
@@ -36,2 +36,22 @@ const lexicons_1 = require("../../../../lexicons"); | ||
exports.validateListItemView = validateListItemView; | ||
function isStarterPackView(v) { | ||
return ((0, util_1.isObj)(v) && | ||
(0, util_1.hasProp)(v, '$type') && | ||
v.$type === 'app.bsky.graph.defs#starterPackView'); | ||
} | ||
exports.isStarterPackView = isStarterPackView; | ||
function validateStarterPackView(v) { | ||
return lexicons_1.lexicons.validate('app.bsky.graph.defs#starterPackView', v); | ||
} | ||
exports.validateStarterPackView = validateStarterPackView; | ||
function isStarterPackViewBasic(v) { | ||
return ((0, util_1.isObj)(v) && | ||
(0, util_1.hasProp)(v, '$type') && | ||
v.$type === 'app.bsky.graph.defs#starterPackViewBasic'); | ||
} | ||
exports.isStarterPackViewBasic = isStarterPackViewBasic; | ||
function validateStarterPackViewBasic(v) { | ||
return lexicons_1.lexicons.validate('app.bsky.graph.defs#starterPackViewBasic', v); | ||
} | ||
exports.validateStarterPackViewBasic = validateStarterPackViewBasic; | ||
/** A list of actors to apply an aggregate moderation action (mute/block) on. */ | ||
@@ -41,2 +61,4 @@ exports.MODLIST = 'app.bsky.graph.defs#modlist'; | ||
exports.CURATELIST = 'app.bsky.graph.defs#curatelist'; | ||
/** A list of actors used for only for reference purposes such as within a starter pack. */ | ||
exports.REFERENCELIST = 'app.bsky.graph.defs#referencelist'; | ||
function isListViewerState(v) { | ||
@@ -43,0 +65,0 @@ return ((0, util_1.isObj)(v) && |
@@ -33,4 +33,4 @@ /** | ||
author: AppBskyActorDefs.ProfileView; | ||
/** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', and 'quote'. */ | ||
reason: 'like' | 'repost' | 'follow' | 'mention' | 'reply' | 'quote' | (string & {}); | ||
/** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. */ | ||
reason: 'like' | 'repost' | 'follow' | 'mention' | 'reply' | 'quote' | 'starterpack-joined' | (string & {}); | ||
reasonSubject?: string; | ||
@@ -37,0 +37,0 @@ record: {}; |
@@ -23,3 +23,6 @@ /** | ||
} | ||
export declare class CannotDeleteSelfError extends XRPCError { | ||
constructor(src: XRPCError); | ||
} | ||
export declare function toKnownErr(e: any): any; | ||
//# sourceMappingURL=deleteMember.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toKnownErr = exports.MemberNotFoundError = void 0; | ||
exports.toKnownErr = exports.CannotDeleteSelfError = exports.MemberNotFoundError = void 0; | ||
/** | ||
@@ -14,2 +14,8 @@ * GENERATED CODE - DO NOT MODIFY | ||
exports.MemberNotFoundError = MemberNotFoundError; | ||
class CannotDeleteSelfError extends xrpc_1.XRPCError { | ||
constructor(src) { | ||
super(src.status, src.error, src.message, src.headers); | ||
} | ||
} | ||
exports.CannotDeleteSelfError = CannotDeleteSelfError; | ||
function toKnownErr(e) { | ||
@@ -19,2 +25,4 @@ if (e instanceof xrpc_1.XRPCError) { | ||
return new MemberNotFoundError(e); | ||
if (e.error === 'CannotDeleteSelf') | ||
return new CannotDeleteSelfError(e); | ||
} | ||
@@ -21,0 +29,0 @@ return e; |
{ | ||
"name": "@atproto/api", | ||
"version": "0.12.21", | ||
"version": "0.12.22-next.0", | ||
"license": "MIT", | ||
@@ -22,6 +22,6 @@ "description": "Client library for atproto and Bluesky", | ||
"tlds": "^1.234.0", | ||
"@atproto/common-web": "^0.3.0", | ||
"@atproto/lexicon": "^0.4.0", | ||
"@atproto/syntax": "^0.3.0", | ||
"@atproto/xrpc": "^0.5.0" | ||
"@atproto/xrpc": "^0.5.0", | ||
"@atproto/common-web": "^0.3.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "devDependencies": { |
@@ -19,2 +19,3 @@ /** | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
createdAt?: string | ||
[k: string]: unknown | ||
@@ -43,2 +44,3 @@ } | ||
indexedAt?: string | ||
createdAt?: string | ||
viewer?: ViewerState | ||
@@ -72,3 +74,5 @@ labels?: ComAtprotoLabelDefs.Label[] | ||
associated?: ProfileAssociated | ||
joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic | ||
indexedAt?: string | ||
createdAt?: string | ||
viewer?: ViewerState | ||
@@ -94,2 +98,3 @@ labels?: ComAtprotoLabelDefs.Label[] | ||
feedgens?: number | ||
starterPacks?: number | ||
labeler?: boolean | ||
@@ -96,0 +101,0 @@ chat?: ProfileAssociatedChat |
@@ -9,2 +9,3 @@ /** | ||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' | ||
@@ -22,2 +23,4 @@ export interface Record { | ||
| { $type: string; [k: string]: unknown } | ||
joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main | ||
createdAt?: string | ||
[k: string]: unknown | ||
@@ -24,0 +27,0 @@ } |
@@ -11,2 +11,3 @@ /** | ||
import * as AppBskyRichtextFacet from '../richtext/facet' | ||
import * as AppBskyFeedDefs from '../feed/defs' | ||
@@ -19,2 +20,3 @@ export interface ListViewBasic { | ||
avatar?: string | ||
listItemCount?: number | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
@@ -47,2 +49,3 @@ viewer?: ListViewerState | ||
avatar?: string | ||
listItemCount?: number | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
@@ -84,5 +87,58 @@ viewer?: ListViewerState | ||
export interface StarterPackView { | ||
uri: string | ||
cid: string | ||
record: {} | ||
creator: AppBskyActorDefs.ProfileViewBasic | ||
list?: ListViewBasic | ||
listItemsSample?: ListItemView[] | ||
feeds?: AppBskyFeedDefs.GeneratorView[] | ||
joinedWeekCount?: number | ||
joinedAllTimeCount?: number | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
indexedAt: string | ||
[k: string]: unknown | ||
} | ||
export function isStarterPackView(v: unknown): v is StarterPackView { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'app.bsky.graph.defs#starterPackView' | ||
) | ||
} | ||
export function validateStarterPackView(v: unknown): ValidationResult { | ||
return lexicons.validate('app.bsky.graph.defs#starterPackView', v) | ||
} | ||
export interface StarterPackViewBasic { | ||
uri: string | ||
cid: string | ||
record: {} | ||
creator: AppBskyActorDefs.ProfileViewBasic | ||
listItemCount?: number | ||
joinedWeekCount?: number | ||
joinedAllTimeCount?: number | ||
labels?: ComAtprotoLabelDefs.Label[] | ||
indexedAt: string | ||
[k: string]: unknown | ||
} | ||
export function isStarterPackViewBasic(v: unknown): v is StarterPackViewBasic { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'app.bsky.graph.defs#starterPackViewBasic' | ||
) | ||
} | ||
export function validateStarterPackViewBasic(v: unknown): ValidationResult { | ||
return lexicons.validate('app.bsky.graph.defs#starterPackViewBasic', v) | ||
} | ||
export type ListPurpose = | ||
| 'app.bsky.graph.defs#modlist' | ||
| 'app.bsky.graph.defs#curatelist' | ||
| 'app.bsky.graph.defs#referencelist' | ||
| (string & {}) | ||
@@ -94,2 +150,4 @@ | ||
export const CURATELIST = 'app.bsky.graph.defs#curatelist' | ||
/** A list of actors used for only for reference purposes such as within a starter pack. */ | ||
export const REFERENCELIST = 'app.bsky.graph.defs#referencelist' | ||
@@ -96,0 +154,0 @@ export interface ListViewerState { |
@@ -47,3 +47,3 @@ /** | ||
author: AppBskyActorDefs.ProfileView | ||
/** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', and 'quote'. */ | ||
/** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. */ | ||
reason: | ||
@@ -56,2 +56,3 @@ | 'like' | ||
| 'quote' | ||
| 'starterpack-joined' | ||
| (string & {}) | ||
@@ -58,0 +59,0 @@ reasonSubject?: string |
@@ -34,7 +34,14 @@ /** | ||
export class CannotDeleteSelfError extends XRPCError { | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
} | ||
export function toKnownErr(e: any) { | ||
if (e instanceof XRPCError) { | ||
if (e.error === 'MemberNotFound') return new MemberNotFoundError(e) | ||
if (e.error === 'CannotDeleteSelf') return new CannotDeleteSelfError(e) | ||
} | ||
return e | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3451437
1166
78406
2