@atproto/api
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -0,1 +1,2 @@ | ||
const pkgJson = require('@npmcli/package-json') | ||
const { nodeExternalsPlugin } = require('esbuild-node-externals') | ||
@@ -6,2 +7,9 @@ | ||
if (process.argv.includes('--update-main-to-dist')) { | ||
return pkgJson | ||
.load(__dirname) | ||
.then((pkg) => pkg.update({ main: 'dist/index.js' })) | ||
.then((pkg) => pkg.save()) | ||
} | ||
require('esbuild').build({ | ||
@@ -8,0 +16,0 @@ logLevel: 'info', |
@@ -35,2 +35,3 @@ import { Client as XrpcClient, ServiceClient as XrpcServiceClient } from '@atproto/xrpc'; | ||
import * as ComAtprotoSessionRefresh from './types/com/atproto/session/refresh'; | ||
import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks'; | ||
import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout'; | ||
@@ -41,2 +42,4 @@ import * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath'; | ||
import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'; | ||
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'; | ||
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'; | ||
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'; | ||
@@ -113,2 +116,3 @@ import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'; | ||
export * as ComAtprotoSessionRefresh from './types/com/atproto/session/refresh'; | ||
export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks'; | ||
export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout'; | ||
@@ -119,2 +123,4 @@ export * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath'; | ||
export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo'; | ||
export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'; | ||
export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'; | ||
export * as ComAtprotoSyncSubscribeAllRepos from './types/com/atproto/sync/subscribeAllRepos'; | ||
@@ -131,2 +137,3 @@ export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'; | ||
export * as AppBskyEmbedImages from './types/app/bsky/embed/images'; | ||
export * as AppBskyEmbedRecord from './types/app/bsky/embed/record'; | ||
export * as AppBskyFeedFeedViewPost from './types/app/bsky/feed/feedViewPost'; | ||
@@ -273,2 +280,3 @@ export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'; | ||
constructor(service: AtpServiceClient); | ||
getBlocks(params?: ComAtprotoSyncGetBlocks.QueryParams, opts?: ComAtprotoSyncGetBlocks.CallOptions): Promise<ComAtprotoSyncGetBlocks.Response>; | ||
getCheckout(params?: ComAtprotoSyncGetCheckout.QueryParams, opts?: ComAtprotoSyncGetCheckout.CallOptions): Promise<ComAtprotoSyncGetCheckout.Response>; | ||
@@ -279,2 +287,4 @@ getCommitPath(params?: ComAtprotoSyncGetCommitPath.QueryParams, opts?: ComAtprotoSyncGetCommitPath.CallOptions): Promise<ComAtprotoSyncGetCommitPath.Response>; | ||
getRepo(params?: ComAtprotoSyncGetRepo.QueryParams, opts?: ComAtprotoSyncGetRepo.CallOptions): Promise<ComAtprotoSyncGetRepo.Response>; | ||
notifyOfUpdate(params?: ComAtprotoSyncNotifyOfUpdate.QueryParams, opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions): Promise<ComAtprotoSyncNotifyOfUpdate.Response>; | ||
requestCrawl(params?: ComAtprotoSyncRequestCrawl.QueryParams, opts?: ComAtprotoSyncRequestCrawl.CallOptions): Promise<ComAtprotoSyncRequestCrawl.Response>; | ||
} | ||
@@ -281,0 +291,0 @@ export declare class AppNS { |
@@ -6,3 +6,3 @@ import { Headers, XRPCError } from '@atproto/xrpc'; | ||
displayName?: string; | ||
description?: string; | ||
description?: string | null; | ||
avatar?: { | ||
@@ -12,3 +12,3 @@ cid: string; | ||
[k: string]: unknown; | ||
}; | ||
} | null; | ||
banner?: { | ||
@@ -18,3 +18,3 @@ cid: string; | ||
[k: string]: unknown; | ||
}; | ||
} | null; | ||
[k: string]: unknown; | ||
@@ -21,0 +21,0 @@ } |
import { ValidationResult } from '@atproto/lexicon'; | ||
import * as AppBskyEmbedImages from '../embed/images'; | ||
import * as AppBskyEmbedExternal from '../embed/external'; | ||
import * as AppBskyEmbedRecord from '../embed/record'; | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'; | ||
@@ -10,3 +11,3 @@ import * as AppBskyActorRef from '../actor/ref'; | ||
reply?: ReplyRef; | ||
embed?: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | { | ||
embed?: AppBskyEmbedImages.Main | AppBskyEmbedExternal.Main | AppBskyEmbedRecord.Main | { | ||
$type: string; | ||
@@ -47,3 +48,3 @@ [k: string]: unknown; | ||
record: {}; | ||
embed?: AppBskyEmbedImages.Presented | AppBskyEmbedExternal.Presented | { | ||
embed?: AppBskyEmbedImages.Presented | AppBskyEmbedExternal.Presented | AppBskyEmbedRecord.Presented | { | ||
$type: string; | ||
@@ -50,0 +51,0 @@ [k: string]: unknown; |
@@ -1,20 +0,1 @@ | ||
import { ValidationResult } from '@atproto/lexicon'; | ||
export interface RepoAppend { | ||
time: string; | ||
repo: string; | ||
commit: string; | ||
prev?: string; | ||
blocks: {}; | ||
blobs: string[]; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRepoAppend(v: unknown): v is RepoAppend; | ||
export declare function validateRepoAppend(v: unknown): ValidationResult; | ||
export interface RepoRebase { | ||
time: string; | ||
repo: string; | ||
commit: string; | ||
[k: string]: unknown; | ||
} | ||
export declare function isRepoRebase(v: unknown): v is RepoRebase; | ||
export declare function validateRepoRebase(v: unknown): ValidationResult; | ||
export {}; |
{ | ||
"name": "@atproto/api", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -52,2 +52,3 @@ /** | ||
import * as ComAtprotoSessionRefresh from './types/com/atproto/session/refresh' | ||
import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks' | ||
import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout' | ||
@@ -58,2 +59,4 @@ import * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath' | ||
import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo' | ||
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' | ||
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' | ||
import * as ComAtprotoSyncSubscribeAllRepos from './types/com/atproto/sync/subscribeAllRepos' | ||
@@ -70,2 +73,3 @@ import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile' | ||
import * as AppBskyEmbedImages from './types/app/bsky/embed/images' | ||
import * as AppBskyEmbedRecord from './types/app/bsky/embed/record' | ||
import * as AppBskyFeedFeedViewPost from './types/app/bsky/feed/feedViewPost' | ||
@@ -141,2 +145,3 @@ import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed' | ||
export * as ComAtprotoSessionRefresh from './types/com/atproto/session/refresh' | ||
export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks' | ||
export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout' | ||
@@ -147,2 +152,4 @@ export * as ComAtprotoSyncGetCommitPath from './types/com/atproto/sync/getCommitPath' | ||
export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo' | ||
export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' | ||
export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' | ||
export * as ComAtprotoSyncSubscribeAllRepos from './types/com/atproto/sync/subscribeAllRepos' | ||
@@ -159,2 +166,3 @@ export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile' | ||
export * as AppBskyEmbedImages from './types/app/bsky/embed/images' | ||
export * as AppBskyEmbedRecord from './types/app/bsky/embed/record' | ||
export * as AppBskyFeedFeedViewPost from './types/app/bsky/feed/feedViewPost' | ||
@@ -704,2 +712,13 @@ export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed' | ||
getBlocks( | ||
params?: ComAtprotoSyncGetBlocks.QueryParams, | ||
opts?: ComAtprotoSyncGetBlocks.CallOptions, | ||
): Promise<ComAtprotoSyncGetBlocks.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.sync.getBlocks', params, undefined, opts) | ||
.catch((e) => { | ||
throw ComAtprotoSyncGetBlocks.toKnownErr(e) | ||
}) | ||
} | ||
getCheckout( | ||
@@ -759,2 +778,24 @@ params?: ComAtprotoSyncGetCheckout.QueryParams, | ||
} | ||
notifyOfUpdate( | ||
params?: ComAtprotoSyncNotifyOfUpdate.QueryParams, | ||
opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions, | ||
): Promise<ComAtprotoSyncNotifyOfUpdate.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.sync.notifyOfUpdate', params, undefined, opts) | ||
.catch((e) => { | ||
throw ComAtprotoSyncNotifyOfUpdate.toKnownErr(e) | ||
}) | ||
} | ||
requestCrawl( | ||
params?: ComAtprotoSyncRequestCrawl.QueryParams, | ||
opts?: ComAtprotoSyncRequestCrawl.CallOptions, | ||
): Promise<ComAtprotoSyncRequestCrawl.Response> { | ||
return this._service.xrpc | ||
.call('com.atproto.sync.requestCrawl', params, undefined, opts) | ||
.catch((e) => { | ||
throw ComAtprotoSyncRequestCrawl.toKnownErr(e) | ||
}) | ||
} | ||
} | ||
@@ -761,0 +802,0 @@ |
@@ -13,5 +13,5 @@ /** | ||
displayName?: string | ||
description?: string | ||
avatar?: { cid: string; mimeType: string; [k: string]: unknown } | ||
banner?: { cid: string; mimeType: string; [k: string]: unknown } | ||
description?: string | null | ||
avatar?: { cid: string; mimeType: string; [k: string]: unknown } | null | ||
banner?: { cid: string; mimeType: string; [k: string]: unknown } | null | ||
[k: string]: unknown | ||
@@ -18,0 +18,0 @@ } |
@@ -9,2 +9,3 @@ /** | ||
import * as AppBskyEmbedExternal from '../embed/external' | ||
import * as AppBskyEmbedRecord from '../embed/record' | ||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' | ||
@@ -20,2 +21,3 @@ import * as AppBskyActorRef from '../actor/ref' | ||
| AppBskyEmbedExternal.Main | ||
| AppBskyEmbedRecord.Main | ||
| { $type: string; [k: string]: unknown } | ||
@@ -99,2 +101,3 @@ createdAt: string | ||
| AppBskyEmbedExternal.Presented | ||
| AppBskyEmbedRecord.Presented | ||
| { $type: string; [k: string]: unknown } | ||
@@ -101,0 +104,0 @@ replyCount: number |
@@ -8,42 +8,1 @@ /** | ||
import { lexicons } from '../../../../lexicons' | ||
export interface RepoAppend { | ||
time: string | ||
repo: string | ||
commit: string | ||
prev?: string | ||
blocks: {} | ||
blobs: string[] | ||
[k: string]: unknown | ||
} | ||
export function isRepoAppend(v: unknown): v is RepoAppend { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'com.atproto.sync.subscribeAllRepos#repoAppend' | ||
) | ||
} | ||
export function validateRepoAppend(v: unknown): ValidationResult { | ||
return lexicons.validate('com.atproto.sync.subscribeAllRepos#repoAppend', v) | ||
} | ||
export interface RepoRebase { | ||
time: string | ||
repo: string | ||
commit: string | ||
[k: string]: unknown | ||
} | ||
export function isRepoRebase(v: unknown): v is RepoRebase { | ||
return ( | ||
isObj(v) && | ||
hasProp(v, '$type') && | ||
v.$type === 'com.atproto.sync.subscribeAllRepos#repoRebase' | ||
) | ||
} | ||
export function validateRepoRebase(v: unknown): ValidationResult { | ||
return lexicons.validate('com.atproto.sync.subscribeAllRepos#repoRebase', v) | ||
} |
Sorry, the diff of this file is too big to display
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
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
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
1491906
39752
213
27566
4
9
0
87