@integration-app/sdk
Advanced tools
Comparing version 0.1.20 to 0.1.21
@@ -0,1 +1,2 @@ | ||
import { ConnectionsQuery } from './connections'; | ||
declare enum FlowRunState { | ||
@@ -38,3 +39,3 @@ RUNNING = "running", | ||
findIntegratedApps(): Promise<any>; | ||
findConnections(): Promise<any>; | ||
findConnections(query?: ConnectionsQuery): Promise<any>; | ||
findFlows(options: FindFlowsOptions): Promise<any>; | ||
@@ -53,3 +54,3 @@ deleteConnection(id: string): Promise<any>; | ||
private getPusherInstance; | ||
get(uri: string): Promise<any>; | ||
get(uri: string, queryParams?: Record<string, string>): Promise<any>; | ||
post(uri: string, data: any): Promise<any>; | ||
@@ -56,0 +57,0 @@ put(uri: string, data: any): Promise<any>; |
@@ -37,4 +37,4 @@ "use strict"; | ||
} | ||
async findConnections() { | ||
return this.get('connections'); | ||
async findConnections(query) { | ||
return this.get('connections', query); | ||
} | ||
@@ -256,3 +256,6 @@ async findFlows(options) { | ||
} | ||
async get(uri) { | ||
async get(uri, queryParams) { | ||
if (queryParams) { | ||
uri += `?${new URLSearchParams(queryParams).toString()}`; | ||
} | ||
return this.makeApiRequest('GET', { url: uri }); | ||
@@ -259,0 +262,0 @@ } |
@@ -1,4 +0,1 @@ | ||
export declare enum EndpointConnectionMode { | ||
POPUP = "popup", | ||
IFRAME = "iframe" | ||
} | ||
export * from './endpoints'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EndpointConnectionMode = void 0; | ||
var EndpointConnectionMode; | ||
(function (EndpointConnectionMode) { | ||
EndpointConnectionMode["POPUP"] = "popup"; | ||
EndpointConnectionMode["IFRAME"] = "iframe"; | ||
})(EndpointConnectionMode = exports.EndpointConnectionMode || (exports.EndpointConnectionMode = {})); | ||
const tslib_1 = require("tslib"); | ||
(0, tslib_1.__exportStar)(require("./endpoints"), exports); | ||
//# sourceMappingURL=endpoint.js.map |
{ | ||
"name": "@integration-app/sdk", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"description": "JavaScript SDK for Integration.app", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import Pusher, { Channel } from 'pusher-js' | ||
import Axios, { AxiosRequestConfig } from 'axios' | ||
import { openIframe } from './iframe' | ||
import { ConnectionsQuery } from './connections' | ||
@@ -68,4 +69,4 @@ const DEFAULT_API_URI = 'https://engine-api.integration.app' | ||
public async findConnections() { | ||
return this.get('connections') | ||
public async findConnections(query?: ConnectionsQuery) { | ||
return this.get('connections', query as Record<string, string>) | ||
} | ||
@@ -339,3 +340,6 @@ | ||
public async get(uri: string) { | ||
public async get(uri: string, queryParams?: Record<string, string>) { | ||
if (queryParams) { | ||
uri += `?${new URLSearchParams(queryParams).toString()}` | ||
} | ||
return this.makeApiRequest('GET', { url: uri }) | ||
@@ -342,0 +346,0 @@ } |
@@ -1,4 +0,5 @@ | ||
export enum EndpointConnectionMode { | ||
POPUP = 'popup', | ||
IFRAME = 'iframe', | ||
} | ||
/** | ||
* DEPRECATED | ||
* ToDo: Remove | ||
*/ | ||
export * from './endpoints' |
@@ -31,3 +31,3 @@ { | ||
"outDir": "./", | ||
"baseUrl": "./src" | ||
"baseUrl": "./" | ||
}, | ||
@@ -34,0 +34,0 @@ "exclude": [ |
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 not supported yet
Sorry, the diff of this file is not supported yet
934560
103
10369