Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spritz-finance/api-client

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spritz-finance/api-client - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

17

dist/spritz-api-client.d.ts

@@ -158,2 +158,3 @@ import { DocumentNode } from 'graphql';

deliveryMethod: PaymentDeliveryMethod | null;
paymentRequestId: string | null;
}

@@ -425,2 +426,3 @@ interface AccountPayments {

deliveryMethod: PaymentDeliveryMethod | null;
paymentRequestId: string | null;
}

@@ -452,2 +454,3 @@

deliveryMethod: PaymentDeliveryMethod | null;
paymentRequestId: string | null;
}

@@ -1178,5 +1181,17 @@ interface PaymentRequestPayment {

}
interface RequestApiKeyResponse {
success: boolean;
}
interface CreateUserParams {
email: string;
}
interface AuthorizeApiKeyResponse {
apiKey: string;
userId: any;
email: string;
}
interface AuthorizeApiKeyParams {
otp: any;
email: string;
}
declare class UserService {

@@ -1187,2 +1202,4 @@ private client;

create(args: CreateUserParams): Promise<CreateUserResponse>;
requestApiKey(email: string): Promise<RequestApiKeyResponse>;
authorizeApiKeyWithOTP(args: AuthorizeApiKeyParams): Promise<AuthorizeApiKeyResponse>;
getCurrentUser(): Promise<CurrentUser_me>;

@@ -1189,0 +1206,0 @@ getUserVerification(): Promise<UserVerification_verification | null>;

2

package.json
{
"name": "@spritz-finance/api-client",
"version": "0.2.3",
"version": "0.2.4",
"description": "Typescript library for interacting with the Spritz Finance API",

@@ -5,0 +5,0 @@ "main": "dist/spritz-api-client.js",

@@ -29,2 +29,3 @@ # @spritz-finance/api-client

- [Setting the User API Key](#setting-the-user-api-key)
- [Reauthorizing a user](#reauthorizing-a-user)
- [Basic User Data](#basic-user-data)

@@ -141,2 +142,15 @@ - [User Verification](#user-verification)

## Reauthorizing a user
There is a scenrio where you may need to get access to a users API key again. This can happen if you are trying to sign in a user that already has a Spritz account, or if you have lost access to their API key. In this case, you can reauthorize the user by providing their email. The process is that we will send the user an OTP code to their email, and then the user must pass that code on to you to confirm that they are allowing you to interact with their account on their behalf.
```typescript
const { success } = await client.user.requestApiKey('bilbo@shiremail.net')
const { apiKey, userId, email } = await client.user.authorizeApiKeyWithOTP({
email: 'bilbo@shiremail.net',
otp: '123456',
})
```
## Basic User Data

@@ -143,0 +157,0 @@

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