Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 231 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"files": [
"dist"
],
"types": "types/index.d.ts",
"scripts": {
"test": "mocha --recursive --timeout 100000",
"test-nodes": "mocha --recursive test/nodesTests/*.js --timeout 100000",
Expand All @@ -27,7 +28,7 @@
"@types/chai": "^4.3.3",
"@types/node": "^18.11.3",
"chai": "^4.3.6",
"typescript": "^4.8.4"
"typescript": "^4.9.4"
},
"dependencies": {
"axios": "^1.1.3"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"downlevelIteration": true,
"module": "commonjs",
"declaration": true,
"declarationDir": "./types",
"outDir": "./dist",
"allowSyntheticDefaultImports": true,
"strict": true,
Expand All @@ -22,4 +23,4 @@
"lib": [
"ESNext"
]
}
}
61 changes: 61 additions & 0 deletions types/constants/apiReqNames.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
export declare const _grabRefreshToken = "_grabRefreshToken";
export declare const _oauthUser = "_oauthUser";
export declare const addUserKyc = "addUserKyc";
export declare const commentOnStatus = "commentOnStatus";
export declare const createBatchTransactions = "createBatchTransactions";
export declare const createNode = "createNode";
export declare const createSubnet = "createSubnet";
export declare const createSubscription = "createSubscription";
export declare const createTransaction = "createTransaction";
export declare const createUser = "createUser";
export declare const deleteCardShipment = "deleteCardShipment";
export declare const deleteExistingDocument = "deleteExistingDocument";
export declare const deleteNode = "deleteNode";
export declare const deleteTransaction = "deleteTransaction";
export declare const disputeCardTransaction = "disputeCardTransaction";
export declare const generateApplePayToken = "generateApplePayToken";
export declare const generateUboForm = "generateUboForm";
export declare const getAllCardShipments = "getAllCardShipments";
export declare const getAllNodeTransactions = "getAllNodeTransactions";
export declare const getAllSubscriptions = "getAllSubscriptions";
export declare const getAllSubnets = "getAllSubnets";
export declare const getAllUserNodes = "getAllUserNodes";
export declare const getAllUsers = "getAllUsers";
export declare const getCardShipment = "getCardShipment";
export declare const getCryptoMarketData = "getCryptoMarketData";
export declare const getCryptoQuotes = "getCryptoQuotes";
export declare const getInstitutions = "getInstitutions";
export declare const getNode = "getNode";
export declare const getPlatformNodes = "getPlatformNodes";
export declare const getPlatformTransactions = "getPlatformTransactions";
export declare const getStatementsByNode = "getStatementsByNode";
export declare const getStatementsByUser = "getStatementsByUser";
export declare const getSubnet = "getSubnet";
export declare const getSubscription = "getSubscription";
export declare const getTradeMarketData = "getTradeMarketData";
export declare const getTransaction = "getTransaction";
export declare const getWebhookLogs = "getWebhookLogs";
export declare const getUserDuplicates = "getUserDuplicates";
export declare const getUser = "getUser";
export declare const getUserTransactions = "getUserTransactions";
export declare const issuePublicKey = "issuePublicKey";
export declare const locateAtms = "locateAtms";
export declare const pushToMobileWallet = "pushToMobileWallet";
export declare const triggerDummyTransactions = "triggerDummyTransactions";
export declare const updateSubscription = "updateSubscription";
export declare const registerNewFingerprint = "registerNewFingerprint";
export declare const reinitiateMicroDeposits = "reinitiateMicroDeposits";
export declare const resetCardNode = "resetCardNode";
export declare const shipCard = "shipCard";
export declare const shipCardNode = "shipCardNode";
export declare const supplyDevice2FA = "supplyDevice2FA";
export declare const swapDuplicateUsers = "swapDuplicateUsers";
export declare const updateIpAddress = "updateIpAddress";
export declare const updateNode = "updateNode";
export declare const updateSubnet = "updateSubnet";
export declare const updateUser = "updateUser";
export declare const verifyAddress = "verifyAddress";
export declare const verifyFingerprint2FA = "verifyFingerprint2FA";
export declare const verifyAchMfa = "verifyAchMfa";
export declare const verifyMicroDeposits = "verifyMicroDeposits";
export declare const verifyRoutingNumber = "verifyRoutingNumber";
5 changes: 5 additions & 0 deletions types/helpers/buildHeaders.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { AxiosRequestConfig } from 'axios';
import { IHeadersObject, IHeadersValues } from '../interfaces/helpers';
declare const buildHeaders: ({ client_id, client_secret, oauth_key, fingerprint, ip_address, idempotency_key, }: Partial<IHeadersValues>) => IHeadersObject;
export declare const makePostPatchConfig: (headers: IHeadersObject) => Partial<AxiosRequestConfig>;
export default buildHeaders;
2 changes: 2 additions & 0 deletions types/helpers/buildUrls.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { IBuildQueryParamsArgs } from "../interfaces/helpers";
export declare const addQueryParams: ({ originalUrl, amount, query, page, per_page, filter, show_refresh_tokens, full_dehydrate, force_refresh, type, zip, lat, lon, radius, limit, currency, foreign_transaction, is_credit, subnet_id, ticker }: IBuildQueryParamsArgs) => string;
9 changes: 9 additions & 0 deletions types/helpers/clientHelpers.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { IUserObject } from '../interfaces/user';
import Client from '../lib/Client';
import User from '../lib/User';
export declare const checkOptions: (headerObj: any, options: any) => any;
export declare const instantiateUser: ({ data, headerObj, client }: {
data: IUserObject;
headerObj: any;
client: Client;
}) => Promise<User>;
2 changes: 2 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as Client } from './lib/Client';
export { default as User } from './lib/User';
8 changes: 8 additions & 0 deletions types/interfaces/client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface ISynapseClient {
client_id: string;
client_secret: string;
fingerprint: string;
ip_address: string;
host: string;
isProduction: boolean;
}
Loading