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

@integration-app/sdk

Package Overview
Dependencies
Maintainers
3
Versions
444
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@integration-app/sdk - npm Package Compare versions

Comparing version 0.1.41 to 0.1.42

2

endpoint-requests.d.ts
export declare class EndpointRequest {
key: string;
uri?: string;
payload?: any;
parameters?: any;
}

24

endpoints.d.ts
export declare enum EndpointType {
INTEGRATED_APP = "integrated_app"
}
export declare class Endpoint {
export declare enum EndpointAuthType {
OAUTH = "oauth",
APP_SIGNATURE = "app_signature",
NONE = "none"
}
export interface EndpointAuthBase {
type: EndpointAuthType;
}
export interface EndpointAuthOauth extends EndpointAuthBase {
clientId: string;
clientSecret: string;
authorizeUri: string;
tokenUri: string;
}
export interface EndpointAuthAppSignature extends EndpointAuthBase {
secret: string;
}
export interface EndpointAuthNone extends EndpointAuthBase {
}
export declare type EndpointAuth = EndpointAuthOauth | EndpointAuthAppSignature | EndpointAuthNone;
export interface Endpoint {
key: string;
type: EndpointType;
name: string;
baseUri: string;
auth: EndpointAuth;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Endpoint = exports.EndpointType = void 0;
exports.EndpointAuthType = exports.EndpointType = void 0;
var EndpointType;

@@ -8,5 +8,8 @@ (function (EndpointType) {

})(EndpointType = exports.EndpointType || (exports.EndpointType = {}));
class Endpoint {
}
exports.Endpoint = Endpoint;
var EndpointAuthType;
(function (EndpointAuthType) {
EndpointAuthType["OAUTH"] = "oauth";
EndpointAuthType["APP_SIGNATURE"] = "app_signature";
EndpointAuthType["NONE"] = "none";
})(EndpointAuthType = exports.EndpointAuthType || (exports.EndpointAuthType = {}));
//# sourceMappingURL=endpoints.js.map

@@ -0,2 +1,4 @@

import { EndpointRequest } from './endpoint-requests';
import { Endpoint } from './endpoints';
import { JSONSchema, JSONSchemaType } from './json-schema';
export declare enum IntegratedAppConnectionMode {

@@ -6,5 +8,29 @@ POPUP = "popup",

}
export declare class IntegratedApp extends Endpoint {
logoBase64: string;
connectionMode: IntegratedAppConnectionMode;
export interface IntegratedApp extends Endpoint {
logoUri?: string;
logoBase64?: string;
connectionMode?: IntegratedAppConnectionMode;
}
export interface IntegratedAppSpecFields {
name: string;
logoUri?: string;
dataRequest?: EndpointRequest;
parametersSchema?: JSONSchema;
connectionMode?: IntegratedAppConnectionMode;
}
export declare const OAUTH_PARAMETERS_SCHEMA: {
type: JSONSchemaType;
properties: {
client_id: {
type: JSONSchemaType;
};
client_secret: {
type: JSONSchemaType;
};
};
};
export declare class IntegratedAppSpec {
constructor(opts: IntegratedAppSpecFields);
}
export interface IntegratedAppSpec extends IntegratedAppSpecFields {
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntegratedApp = exports.IntegratedAppConnectionMode = void 0;
const endpoints_1 = require("./endpoints");
exports.IntegratedAppSpec = exports.OAUTH_PARAMETERS_SCHEMA = exports.IntegratedAppConnectionMode = void 0;
const json_schema_1 = require("./json-schema");
var IntegratedAppConnectionMode;

@@ -10,5 +10,24 @@ (function (IntegratedAppConnectionMode) {

})(IntegratedAppConnectionMode = exports.IntegratedAppConnectionMode || (exports.IntegratedAppConnectionMode = {}));
class IntegratedApp extends endpoints_1.Endpoint {
exports.OAUTH_PARAMETERS_SCHEMA = {
type: json_schema_1.JSONSchemaType.Object,
properties: {
client_id: { type: json_schema_1.JSONSchemaType.String },
client_secret: { type: json_schema_1.JSONSchemaType.String },
},
};
const DEFAULT_ROOT_RESPONSE_OPTIONS = {
baseUri: '/',
auth: {
authorizeUri: '/authorize',
tokenUri: '/token',
},
registerAppUri: 'register-app',
connectionMode: IntegratedAppConnectionMode.POPUP,
};
class IntegratedAppSpec {
constructor(opts) {
Object.assign(this, DEFAULT_ROOT_RESPONSE_OPTIONS, opts);
}
}
exports.IntegratedApp = IntegratedApp;
exports.IntegratedAppSpec = IntegratedAppSpec;
//# sourceMappingURL=integrated-apps.js.map
{
"name": "@integration-app/sdk",
"version": "0.1.41",
"version": "0.1.42",
"description": "JavaScript SDK for Integration.app",

@@ -5,0 +5,0 @@ "main": "index.js",

export class EndpointRequest {
public key: string
public uri?: string // Deprecated in favor of `key`
public payload?: any
public parameters?: any // Deprecated in favor of `payload`
}

@@ -5,9 +5,40 @@ export enum EndpointType {

export class Endpoint {
export enum EndpointAuthType {
OAUTH = 'oauth',
APP_SIGNATURE = 'app_signature',
NONE = 'none',
}
export interface EndpointAuthBase {
type: EndpointAuthType
}
export interface EndpointAuthOauth extends EndpointAuthBase {
clientId: string
clientSecret: string
authorizeUri: string
tokenUri: string
}
export interface EndpointAuthAppSignature extends EndpointAuthBase {
secret: string
}
export interface EndpointAuthNone extends EndpointAuthBase {}
export type EndpointAuth =
| EndpointAuthOauth
| EndpointAuthAppSignature
| EndpointAuthNone
export interface Endpoint {
/**
* Endpoint key. Unique within an App.
*/
public key: string
key: string
public type: EndpointType
type: EndpointType

@@ -17,3 +48,7 @@ /**

*/
public name: string
name: string
baseUri: string
auth: EndpointAuth
}

@@ -0,2 +1,4 @@

import { EndpointRequest } from './endpoint-requests'
import { Endpoint } from './endpoints'
import { JSONSchema, JSONSchemaType } from './json-schema'

@@ -12,6 +14,41 @@ /**

export class IntegratedApp extends Endpoint {
public logoBase64: string
export interface IntegratedApp extends Endpoint {
logoUri?: string
logoBase64?: string
public connectionMode: IntegratedAppConnectionMode
connectionMode?: IntegratedAppConnectionMode
}
export interface IntegratedAppSpecFields {
name: string
logoUri?: string
dataRequest?: EndpointRequest
parametersSchema?: JSONSchema
connectionMode?: IntegratedAppConnectionMode
}
export const OAUTH_PARAMETERS_SCHEMA = {
type: JSONSchemaType.Object,
properties: {
client_id: { type: JSONSchemaType.String },
client_secret: { type: JSONSchemaType.String },
},
}
const DEFAULT_ROOT_RESPONSE_OPTIONS = {
baseUri: '/',
auth: {
authorizeUri: '/authorize',
tokenUri: '/token',
},
registerAppUri: 'register-app',
connectionMode: IntegratedAppConnectionMode.POPUP,
}
export class IntegratedAppSpec {
constructor(opts: IntegratedAppSpecFields) {
Object.assign(this, DEFAULT_ROOT_RESPONSE_OPTIONS, opts)
}
}
export interface IntegratedAppSpec extends IntegratedAppSpecFields {}

@@ -36,2 +36,3 @@ {

"./*.ts",
"**/*.test.ts",
"./*.d.ts",

@@ -38,0 +39,0 @@ "./*.js"

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

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