Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
2
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismatic-io/spectral - npm Package Compare versions

Comparing version 1.0.3 to 1.0.5

10

dist/testing.d.ts

@@ -5,3 +5,3 @@ import { ActionContext, ActionLogger, ActionDefinition, ActionInputParameters, Credential, BasicCredential, ApiKeyCredential, ApiKeySecretCredential, PrivateKeyCredential, OAuth2Credential, PerformReturn, AuthorizationMethod } from "./types";

*/
export declare const getAuthorizationMethods: (except?: ("basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2")[] | undefined) => AuthorizationMethod[];
export declare const getAuthorizationMethods: (except?: ("basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2" | "oauth2_client_credentials")[] | undefined) => AuthorizationMethod[];
/** Utility functions to generate the different types of Credentials. */

@@ -19,2 +19,4 @@ export declare const credentials: {

oauth2: (token: string, redirectUri?: string) => OAuth2Credential;
/** Return a OAuth2Credential assembled from provided token. */
oauth2ClientCredentials: (token: string) => OAuth2Credential;
/** Returns an arbitrary Credential using method. Generally used for testing negative support cases. */

@@ -38,3 +40,3 @@ generate: (method: AuthorizationMethod) => Credential;

loggerMock: () => ActionLogger;
getAuthorizationMethods: (except?: ("basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2")[] | undefined) => ("basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2")[];
getAuthorizationMethods: (except?: ("basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2" | "oauth2_client_credentials")[] | undefined) => ("basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2" | "oauth2_client_credentials")[];
credentials: {

@@ -51,6 +53,8 @@ /** Return a BasicCredential assembled from provided username and password. */

oauth2: (token: string, redirectUri?: string) => OAuth2Credential;
/** Return a OAuth2Credential assembled from provided token. */
oauth2ClientCredentials: (token: string) => OAuth2Credential;
/** Returns an arbitrary Credential using method. Generally used for testing negative support cases. */
generate: (method: "basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2") => Credential;
generate: (method: "basic" | "api_key" | "api_key_secret" | "private_key" | "oauth2" | "oauth2_client_credentials") => Credential;
};
};
export default _default;

@@ -64,2 +64,10 @@ "use strict";

}),
/** Return a OAuth2Credential assembled from provided token. */
oauth2ClientCredentials: (token) => ({
authorizationMethod: "oauth2_client_credentials",
redirectUri: "",
fields: {},
token: { access_token: token },
context: {},
}),
/** Returns an arbitrary Credential using method. Generally used for testing negative support cases. */

@@ -87,3 +95,3 @@ generate: (method) => ({

Object.values(action)[0].perform);
const realizedContext = Object.assign({ credential: undefined, logger: exports.loggerMock() }, context);
const realizedContext = Object.assign({ credential: undefined, logger: exports.loggerMock(), instanceState: {}, stepId: "mockStepId" }, context);
const result = (yield perform(realizedContext, params));

@@ -90,0 +98,0 @@ return {

@@ -27,5 +27,8 @@ /// <reference types="node" />

}
declare const authorizationMethods: readonly ["basic", "api_key", "api_key_secret", "private_key", "oauth2"];
declare const authorizationMethods: readonly ["basic", "api_key", "api_key_secret", "private_key", "oauth2", "oauth2_client_credentials"];
export declare type AuthorizationMethod = typeof authorizationMethods[number];
export declare const AvailableAuthorizationMethods: AuthorizationMethod[];
declare const oauth2AuthorizationMethods: readonly ["oauth2", "oauth2_client_credentials"];
export declare type OAuth2AuthorizationMethod = typeof oauth2AuthorizationMethods[number];
export declare const AvailableOAuth2AuthorizationMethods: OAuth2AuthorizationMethod[];
export interface BasicCredential {

@@ -59,3 +62,3 @@ authorizationMethod: "basic";

export interface OAuth2Credential {
authorizationMethod: "oauth2";
authorizationMethod: OAuth2AuthorizationMethod;
redirectUri: string;

@@ -148,2 +151,6 @@ fields: {

logger: ActionLogger;
/** A key/value store that may be used to store small amounts of data that is persisted between Instance executions */
instanceState: Record<string, unknown>;
/** A unique id that corresponds to the step on the Integration */
stepId: string;
}

@@ -162,2 +169,4 @@ /** Collection of input parameters provided by the user or previous steps' outputs */

statusCode?: number;
/** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
state?: Record<string, unknown>;
}

@@ -172,2 +181,4 @@ /** Used to represent a binary or serialized data return as content type must be specified */

statusCode?: number;
/** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
state?: Record<string, unknown>;
}

@@ -174,0 +185,0 @@ /** Used to represent a branching return of conventional data and does not require content type to be specified */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AvailableAuthorizationMethods = void 0;
exports.AvailableOAuth2AuthorizationMethods = exports.AvailableAuthorizationMethods = void 0;
const authorizationMethods = [

@@ -10,2 +10,3 @@ "basic",

"oauth2",
"oauth2_client_credentials",
];

@@ -15,1 +16,8 @@ exports.AvailableAuthorizationMethods = [

];
const oauth2AuthorizationMethods = [
"oauth2",
"oauth2_client_credentials",
];
exports.AvailableOAuth2AuthorizationMethods = [
...oauth2AuthorizationMethods,
];

@@ -15,3 +15,6 @@ import { DataPayload } from "./types";

};
docs: {
formatJsonExample: (input: unknown) => string;
};
};
export default _default;

@@ -92,2 +92,3 @@ "use strict";

};
const formatJsonExample = (input) => ["```json", JSON.stringify(input, undefined, 2), "```"].join("\n");
exports.default = {

@@ -106,2 +107,5 @@ types: {

},
docs: {
formatJsonExample,
},
};
{
"name": "@prismatic-io/spectral",
"version": "1.0.3",
"version": "1.0.5",
"description": "Utility library for building Prismatic components",

@@ -5,0 +5,0 @@ "keywords": [

@@ -17,13 +17,13 @@ # @prismatic-io/spectral

Prismatic is an integration platform built specifically for B2B software companies. It's an easier way to build, deploy, and support integrations for your customers.
Prismatic is the embedded integration platform for B2B software companies. It's the easiest way to build integrations and provide a first-class integration experience to your customers.
Prismatic reduces integration effort and empowers everyone involved in the integration process with the tools they need for their roles, so you can spend less time on integrations and more time on core product innovation.
Prismatic reduces integration effort and empowers every role with exactly what they need, so you can spend less time on integrations and more time on core product innovation.
With Prismatic, you can:
- Build reusable [integrations](https://prismatic.io/docs/integrations) in an intuitive integration designer
- Deploy customer-specific integration [instances](https://prismatic.io/docs/instances) with unique [configurations](https://prismatic.io/docs/configuration-variables) and [credentials](https://prismatic.io/docs/credentials)
- Build reusable [integrations](https://prismatic.io/docs/integrations) in an intuitive low-code integration designer
- Easily deploy customer-specific integration [instances](https://prismatic.io/docs/instances) with unique [configurations](https://prismatic.io/docs/configuration-variables) and [credentials](https://prismatic.io/docs/credentials)
- Run your integrations in a purpose-built environment
- Provide better support with built-in [logging](https://prismatic.io/docs/logging) and [alerting](https://prismatic.io/docs/monitoring-and-alerting)
- Embed a white-labeled customer integration portal
- Embed a white-labeled customer integration portal with an integration app store and customer self-service tools
- Mold the platform to your product, industry, and the way you build software

@@ -30,0 +30,0 @@

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