daocrm-client
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "daocrm-client", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Official client for the Daocrm API", | ||
@@ -5,0 +5,0 @@ "author": "oxilor", |
import Client from './Client' | ||
import { addToUserAgent } from './util/getUserAgent' | ||
import axios from './util/axios' | ||
import { IError, IResponse, ITokenRes } from './types' | ||
import { ICheckEmailRes } from './methods/auth/checkEmail' | ||
import { ISendActivationEmailRes, RedirectUri } from './methods/auth/sendActivationEmail' | ||
@@ -11,9 +14,9 @@ export { | ||
/* | ||
const token = 'token' | ||
const client = new Client(token) | ||
client.user.getProfile({ id: 'id2' }).then(response => {}).catch(error => {}) | ||
*/ | ||
export { | ||
RedirectUri, | ||
IError, | ||
IResponse, | ||
ITokenRes, | ||
ICheckEmailRes, | ||
ISendActivationEmailRes, | ||
} |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { IResponse } from '../../types' | ||
interface ICheckEmailRes extends IResponse { | ||
export interface ICheckEmailRes extends IResponse { | ||
isRegistered: boolean, | ||
@@ -6,0 +7,0 @@ } |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { ITokenRes } from '../../types' | ||
@@ -4,0 +5,0 @@ const login = ( |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { ITokenRes } from '../../types' | ||
@@ -4,0 +5,0 @@ const refreshToken = (refreshToken: string): AxiosPromise<ITokenRes> => { |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { ITokenRes } from '../../types' | ||
@@ -4,0 +5,0 @@ const register = ( |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { IResponse } from '../../types' | ||
export type RedirectUri = 'register' | 'recovery' | ||
interface ISendActivationEmailRes extends IResponse { | ||
export interface ISendActivationEmailRes extends IResponse { | ||
isSent: boolean, | ||
@@ -8,0 +9,0 @@ } |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { ITokenRes } from '../../types' | ||
@@ -4,0 +5,0 @@ const setPassword = ( |
import { AxiosPromise } from 'axios' | ||
import axiosInstance from '../../util/axios' | ||
import { IResponse } from '../../types' | ||
@@ -4,0 +5,0 @@ const test = (): AxiosPromise<IResponse> => { |
@@ -6,7 +6,7 @@ declare module '*.json' { | ||
interface IResponse { | ||
export interface IResponse { | ||
ok: boolean, | ||
} | ||
interface IError extends IResponse { | ||
export interface IError extends IResponse { | ||
errorName: string, | ||
@@ -16,3 +16,3 @@ errorDescription: string, | ||
interface ITokenRes extends IResponse { | ||
export interface ITokenRes extends IResponse { | ||
accessToken: string, | ||
@@ -19,0 +19,0 @@ refreshToken: string, |
import axios, { AxiosInstance, AxiosResponse } from 'axios' | ||
import getUserAgent from './getUserAgent' | ||
import config from '../config.json' | ||
import { IError } from '../types' | ||
@@ -5,0 +6,0 @@ const axiosInstance: AxiosInstance = axios.create({ |
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
19502
463