@prismatic-io/spectral
Advanced tools
Comparing version 7.8.1 to 7.8.2
@@ -8,3 +8,3 @@ /** | ||
import { TriggerPayload, TriggerResult, ConnectionValue, ActionLogger, Component, ActionContext, ActionPerformReturn, DataSourceResult, DataSourceContext } from "./serverTypes"; | ||
import { ConnectionDefinition, ActionDefinition, TriggerDefinition, Inputs, ActionInputParameters, DataSourceDefinition, ActionPerformReturn as InvokeActionPerformReturn, TriggerResult as InvokeTriggerResult, DataSourceResult as InvokeDataSourceResult } from "./types"; | ||
import { ConnectionDefinition, ActionDefinition, TriggerDefinition, Inputs, ActionInputParameters, DataSourceDefinition, ActionPerformReturn as InvokeActionPerformReturn, TriggerResult as InvokeTriggerResult, DataSourceResult as InvokeDataSourceResult, TriggerEventFunctionReturn } from "./types"; | ||
export declare const createConnection: <T extends ConnectionDefinition>({ key }: T, values: Record<string, unknown>, tokenValues?: Record<string, unknown> | undefined) => ConnectionValue; | ||
@@ -67,2 +67,4 @@ /** | ||
trigger(key: string, payload?: TriggerPayload, params?: Record<string, unknown>, context?: Partial<ActionContext>): Promise<TriggerResult>; | ||
triggerOnInstanceDeploy(key: string, params?: Record<string, unknown>, context?: Partial<ActionContext>): Promise<void | TriggerEventFunctionReturn>; | ||
triggerOnInstanceDelete(key: string, params?: Record<string, unknown>, context?: Partial<ActionContext>): Promise<void | TriggerEventFunctionReturn>; | ||
action(key: string, params?: Record<string, unknown>, context?: Partial<ActionContext>): Promise<ActionPerformReturn>; | ||
@@ -69,0 +71,0 @@ dataSource(key: string, params?: Record<string, unknown>, context?: Partial<DataSourceContext>): Promise<DataSourceResult>; |
@@ -219,2 +219,20 @@ "use strict"; | ||
} | ||
triggerOnInstanceDeploy(key, params, context) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const trigger = this.component.triggers[key]; | ||
if (!trigger.onInstanceDeploy) { | ||
throw new Error("Trigger does not support onInstanceDeploy"); | ||
} | ||
return trigger.onInstanceDeploy(this.buildContext(baseActionContext, context), this.buildParams(trigger.inputs, params)); | ||
}); | ||
} | ||
triggerOnInstanceDelete(key, params, context) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const trigger = this.component.triggers[key]; | ||
if (!trigger.onInstanceDelete) { | ||
throw new Error("Trigger does not support onInstanceDelete"); | ||
} | ||
return trigger.onInstanceDelete(this.buildContext(baseActionContext, context), this.buildParams(trigger.inputs, params)); | ||
}); | ||
} | ||
action(key, params, context) { | ||
@@ -221,0 +239,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "@prismatic-io/spectral", | ||
"version": "7.8.1", | ||
"version": "7.8.2", | ||
"description": "Utility library for building Prismatic components", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179610
3996