New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@atproto/api

Package Overview
Dependencies
Maintainers
2
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atproto/api - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

dist/client/types/com/atproto/account/requestDelete.d.ts

3

dist/client/index.d.ts

@@ -6,2 +6,3 @@ import { Client as XrpcClient, ServiceClient as XrpcServiceClient } from '@atproto/xrpc';

import * as ComAtprotoAccountGet from './types/com/atproto/account/get';
import * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete';
import * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset';

@@ -70,2 +71,3 @@ import * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword';

export * as ComAtprotoAccountGet from './types/com/atproto/account/get';
export * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete';
export * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset';

@@ -203,2 +205,3 @@ export * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword';

get(params?: ComAtprotoAccountGet.QueryParams, opts?: ComAtprotoAccountGet.CallOptions): Promise<ComAtprotoAccountGet.Response>;
requestDelete(data?: ComAtprotoAccountRequestDelete.InputSchema, opts?: ComAtprotoAccountRequestDelete.CallOptions): Promise<ComAtprotoAccountRequestDelete.Response>;
requestPasswordReset(data?: ComAtprotoAccountRequestPasswordReset.InputSchema, opts?: ComAtprotoAccountRequestPasswordReset.CallOptions): Promise<ComAtprotoAccountRequestPasswordReset.Response>;

@@ -205,0 +208,0 @@ resetPassword(data?: ComAtprotoAccountResetPassword.InputSchema, opts?: ComAtprotoAccountResetPassword.CallOptions): Promise<ComAtprotoAccountResetPassword.Response>;

@@ -1,8 +0,14 @@

import { Headers } from '@atproto/xrpc';
import { Headers, XRPCError } from '@atproto/xrpc';
export interface QueryParams {
}
export declare type InputSchema = undefined;
export interface InputSchema {
did: string;
password: string;
token: string;
[k: string]: unknown;
}
export interface CallOptions {
headers?: Headers;
qp?: QueryParams;
encoding: 'application/json';
}

@@ -13,2 +19,8 @@ export interface Response {

}
export declare class ExpiredTokenError extends XRPCError {
constructor(src: XRPCError);
}
export declare class InvalidTokenError extends XRPCError {
constructor(src: XRPCError);
}
export declare function toKnownErr(e: any): any;

2

package.json
{
"name": "@atproto/api",
"version": "0.0.7",
"version": "0.0.8",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -13,2 +13,3 @@ /**

import * as ComAtprotoAccountGet from './types/com/atproto/account/get'
import * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete'
import * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset'

@@ -95,2 +96,3 @@ import * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword'

export * as ComAtprotoAccountGet from './types/com/atproto/account/get'
export * as ComAtprotoAccountRequestDelete from './types/com/atproto/account/requestDelete'
export * as ComAtprotoAccountRequestPasswordReset from './types/com/atproto/account/requestPasswordReset'

@@ -310,2 +312,13 @@ export * as ComAtprotoAccountResetPassword from './types/com/atproto/account/resetPassword'

requestDelete(
data?: ComAtprotoAccountRequestDelete.InputSchema,
opts?: ComAtprotoAccountRequestDelete.CallOptions,
): Promise<ComAtprotoAccountRequestDelete.Response> {
return this._service.xrpc
.call('com.atproto.account.requestDelete', opts?.qp, data, opts)
.catch((e) => {
throw ComAtprotoAccountRequestDelete.toKnownErr(e)
})
}
requestPasswordReset(

@@ -312,0 +325,0 @@ data?: ComAtprotoAccountRequestPasswordReset.InputSchema,

@@ -11,3 +11,8 @@ /**

export type InputSchema = undefined
export interface InputSchema {
did: string
password: string
token: string
[k: string]: unknown
}

@@ -17,2 +22,3 @@ export interface CallOptions {

qp?: QueryParams
encoding: 'application/json'
}

@@ -25,6 +31,20 @@

export class ExpiredTokenError extends XRPCError {
constructor(src: XRPCError) {
super(src.status, src.error, src.message)
}
}
export class InvalidTokenError extends XRPCError {
constructor(src: XRPCError) {
super(src.status, src.error, src.message)
}
}
export function toKnownErr(e: any) {
if (e instanceof XRPCError) {
if (e.error === 'ExpiredToken') return new ExpiredTokenError(e)
if (e.error === 'InvalidToken') return new InvalidTokenError(e)
}
return e
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc