@prismatic-io/spectral 4.0.9 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,22 +14,23 @@ Please see our [documentation](https://prismatic.io/docs/custom-components/writi
14
14
 
15
15
  ## What is Prismatic?
16
16
 
17
- 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.
17
+ Prismatic is the integration platform for B2B software companies. It's the quickest way to build integrations to the other apps your customers use and to add a native integration marketplace to your product.
18
18
 
19
- 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.
19
+ Prismatic significantly reduces overall integration effort and enables non-dev teams to take on more of the integration workload, so that you can deliver integrations faster and spend more time on core product innovation.
20
20
 
21
21
  With Prismatic, you can:
22
22
 
23
- - Build reusable [integrations](https://prismatic.io/docs/integrations) in an intuitive low-code integration designer
23
+ - Build reusable [integrations](https://prismatic.io/docs/integrations) in a low-code integration designer that's tailored for your product
24
+ - Use [pre-built components](https://prismatic.io/docs/components/component-catalog) to handle most of your integrations' functionality, and write [custom components](https://prismatic.io/docs/custom-components/writing-custom-components) when needed
25
+ - Quickly add an [integration marketplace](https://prismatic.io/docs/integration-marketplace) to your product so customers can explore, activate, and monitor integrations
24
26
  - Easily deploy customer-specific integration [instances](https://prismatic.io/docs/instances) with unique configurations and credentials
25
- - Run your integrations in a purpose-built environment
26
- - Provide better support with built-in [logging](https://prismatic.io/docs/logging) and [alerting](https://prismatic.io/docs/monitoring-and-alerting)
27
- - Embed a white-labeled customer integration portal with an [integration marketplace](https://prismatic.io/docs/integration-marketplace/) and customer self-service tools
28
- - Mold the platform to your product, industry, and the way you build software
27
+ - Provide better support with tools like [logging](https://prismatic.io/docs/logging) and [alerting](https://prismatic.io/docs/monitoring-and-alerting)
28
+ - Run your integrations in a purpose-built environment designed for security and scalability
29
+ - Use powerful dev tools to mold the platform to your product, industry, and the way you build software
29
30
 
30
31
  ## Who uses Prismatic?
31
32
 
32
- Prismatic is for B2B (business-to-business) software companies, meaning software companies that provide applications used by businesses. It's a good fit for products/teams at any stage, including early stage SaaS, established SaaS, and legacy or on-prem systems.
33
+ Prismatic is for B2B (business-to-business) software companies, meaning software companies that provide applications used by businesses. It's a good fit for products/teams ranging from early-stage and growing SaaS startups to large, established software companies looking to improve the way they do integrations.
33
34
 
34
35
  Many B2B software teams serve customers in niche vertical markets, and we designed Prismatic with that in mind. We provide powerful and flexible tools so you can build exactly the integrations your customers need, no matter who your customers are, no matter what systems you need to connect to, no matter how "non-standard" your integration scenario.
35
36
 
package/dist/testing.js CHANGED
@@ -99,6 +99,8 @@ exports.credentials = {
99
99
  * See https://prismatic.io/docs/custom-components/writing-custom-components/#verifying-correct-logging-in-action-tests for information on testing correct logging behavior in your custom component.
100
100
  */
101
101
  const loggerMock = () => ({
102
+ metric: console.log,
103
+ trace: jest_mock_1.spyOn(console, "trace"),
102
104
  debug: jest_mock_1.spyOn(console, "debug"),
103
105
  info: jest_mock_1.spyOn(console, "info"),
104
106
  log: jest_mock_1.spyOn(console, "log"),
@@ -114,7 +116,7 @@ exports.loggerMock = loggerMock;
114
116
  */
115
117
  const invoke = (actionBase, params, context) => __awaiter(void 0, void 0, void 0, function* () {
116
118
  const action = (actionBase.perform ? actionBase : Object.values(actionBase)[0]);
117
- const realizedContext = Object.assign({ credential: undefined, logger: exports.loggerMock(), instanceState: {}, stepId: "mockStepId", executionId: "mockExecutionId" }, context);
119
+ const realizedContext = Object.assign({ credential: undefined, logger: exports.loggerMock(), instanceState: {}, executionState: {}, stepId: "mockStepId", executionId: "mockExecutionId" }, context);
118
120
  const result = yield action.perform(realizedContext, params);
119
121
  return {
120
122
  result,
@@ -159,7 +161,7 @@ exports.defaultTriggerPayload = defaultTriggerPayload;
159
161
  */
160
162
  const invokeTrigger = (triggerBase, context, payload, params) => __awaiter(void 0, void 0, void 0, function* () {
161
163
  const trigger = (triggerBase.perform ? triggerBase : Object.values(triggerBase)[0]);
162
- const realizedContext = Object.assign({ credential: undefined, logger: exports.loggerMock(), instanceState: {}, stepId: "mockStepId", executionId: "mockExecutionId" }, context);
164
+ const realizedContext = Object.assign({ credential: undefined, logger: exports.loggerMock(), instanceState: {}, executionState: {}, stepId: "mockStepId", executionId: "mockExecutionId" }, context);
163
165
  const realizedPayload = Object.assign(Object.assign({}, exports.defaultTriggerPayload()), payload);
164
166
  const realizedParams = params || {};
165
167
  const result = yield trigger.perform(realizedContext, realizedPayload, realizedParams);
@@ -14,6 +14,8 @@ export interface ActionDefinition<T extends Inputs, AllowsBranching extends bool
14
14
  authorization?: AuthorizationDefinition;
15
15
  /** Optional attribute that specifies whether an Action will terminate execution.*/
16
16
  terminateExecution?: boolean;
17
+ /** Specifies whether an Action will break out of a loop. */
18
+ breakLoop?: boolean;
17
19
  /** Determines whether an Action will allow Conditional Branching.*/
18
20
  allowsBranching?: AllowsBranching;
19
21
  /** Static Branch names associated with an Action. */
@@ -12,6 +12,8 @@ export declare type ActionLoggerFunction = (...args: unknown[]) => void;
12
12
  * An object containing logger functions.
13
13
  */
14
14
  export interface ActionLogger {
15
+ metric: ActionLoggerFunction;
16
+ trace: ActionLoggerFunction;
15
17
  debug: ActionLoggerFunction;
16
18
  info: ActionLoggerFunction;
17
19
  log: ActionLoggerFunction;
@@ -9,6 +9,8 @@ export interface ActionContext {
9
9
  logger: ActionLogger;
10
10
  /** A key/value store that may be used to store small amounts of data that is persisted between Instance executions */
11
11
  instanceState: Record<string, unknown>;
12
+ /** A key/value store that may be used to store small amounts of data for use later during the execution */
13
+ executionState: Record<string, unknown>;
12
14
  /** A unique id that corresponds to the step on the Integration */
13
15
  stepId: string;
14
16
  /** A unique id that corresponds to the specific execution of the Integration */
@@ -7,7 +7,9 @@ export interface ActionPerformDataReturn<ReturnData> {
7
7
  /** The HTTP Status code that will be used if this terminates a synchronous invocation */
8
8
  statusCode?: number;
9
9
  /** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
10
- state?: Record<string, unknown>;
10
+ instanceState?: Record<string, unknown>;
11
+ /** An optional object, the keys and values of which will be persisted in the executionState and available for the duration of the execution */
12
+ executionState?: Record<string, unknown>;
11
13
  }
12
14
  /** Used to represent a branching return of conventional data and does not require content type to be specified */
13
15
  /** Used to represent a binary or serialized data branching return as content type must be specified */
@@ -21,6 +21,8 @@ export interface TriggerDefinition<T extends Inputs, AllowsBranching extends boo
21
21
  authorization?: AuthorizationDefinition;
22
22
  /** Optional attribute that specifies whether this Trigger will terminate execution. */
23
23
  terminateExecution?: boolean;
24
+ /** Specifies whether an Action will break out of a loop. */
25
+ breakLoop?: boolean;
24
26
  /** Determines whether this Trigger allows Conditional Branching. */
25
27
  allowsBranching?: AllowsBranching;
26
28
  /** Static Branch names associated with this Trigger. */
@@ -7,7 +7,9 @@ export interface TriggerBaseResult {
7
7
  /** Optional HTTP response to the request that invoked the integration. */
8
8
  response?: HttpResponse;
9
9
  /** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
10
- state?: Record<string, unknown>;
10
+ instanceState?: Record<string, unknown>;
11
+ /** An optional object, the keys and values of which will be persisted in the executionState and available for the duration of the execution */
12
+ executionState?: Record<string, unknown>;
11
13
  }
12
14
  /** Represents the result of a Trigger action that uses branching. */
13
15
  export interface TriggerBranchingResult extends TriggerBaseResult {
@@ -47,6 +47,8 @@ interface BaseAction {
47
47
  authorization?: AuthorizationDefinition;
48
48
  /** Optional attribute that specifies whether an Action will terminate execution. */
49
49
  terminateExecution?: boolean;
50
+ /** Specifies whether an Action will break out of a loop. */
51
+ breakLoop?: boolean;
50
52
  /** Determines whether an Action will allow Conditional Branching. */
51
53
  allowsBranching?: boolean;
52
54
  /** Static Branch names associated with an Action. */
@@ -87,7 +89,9 @@ export interface ServerPerformDataStructureReturn {
87
89
  /** The HTTP Status code that will be used if this terminates a synchronous invocation */
88
90
  statusCode?: number;
89
91
  /** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
90
- state?: Record<string, unknown>;
92
+ instanceState?: Record<string, unknown>;
93
+ /** An optional object, the keys and values of which will be persisted in the executionState and available for the duration of the execution */
94
+ executionState?: Record<string, unknown>;
91
95
  }
92
96
  /** Used to represent a binary or serialized data return as content type must be specified */
93
97
  interface ServerPerformDataReturn {
@@ -98,7 +102,9 @@ interface ServerPerformDataReturn {
98
102
  /** The HTTP Status code that will be used if this terminates a synchronous invocation */
99
103
  statusCode?: number;
100
104
  /** An optional object, the keys and values of which will be persisted in the instanceState and available for subsequent actions and executions */
101
- state?: Record<string, unknown>;
105
+ instanceState?: Record<string, unknown>;
106
+ /** An optional object, the keys and values of which will be persisted in the executionState and available for the duration of the execution */
107
+ executionState?: Record<string, unknown>;
102
108
  }
103
109
  /** Used to represent a branching return of conventional data and does not require content type to be specified */
104
110
  export interface ServerPerformBranchingDataStructureReturn extends ServerPerformDataStructureReturn {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "4.0.9",
3
+ "version": "4.1.0",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"