@juhuu/sdk-ts 1.2.274 → 1.2.276
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/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +5 -17
- package/dist/index.mjs +5 -17
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1297,6 +1297,11 @@ type FlowLog = {
|
|
|
1297
1297
|
message: string;
|
|
1298
1298
|
createdAt: Date;
|
|
1299
1299
|
};
|
|
1300
|
+
type BlockExecutor = (inputs: FlowBlockInput, block: FlowBlock, context: Record<string, any>) => Promise<{
|
|
1301
|
+
output: Record<string, any>;
|
|
1302
|
+
logArray?: FlowLog[];
|
|
1303
|
+
flowBranch?: string | null;
|
|
1304
|
+
}>;
|
|
1300
1305
|
type DataEdgeConnection = string | null;
|
|
1301
1306
|
type ControlEdgeConnection = string | null;
|
|
1302
1307
|
type QuickAction = {
|
|
@@ -1704,10 +1709,9 @@ declare class FlowsService extends Service {
|
|
|
1704
1709
|
update(FlowUpdateParams: JUHUU.Flow.Update.Params, FlowUpdateOptions?: JUHUU.Flow.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Flow.Update.Response>>;
|
|
1705
1710
|
delete(FlowDeleteParams: JUHUU.Flow.Delete.Params, FlowDeleteOptions?: JUHUU.Flow.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Flow.Delete.Response>>;
|
|
1706
1711
|
execute(FlowExecuteParams: JUHUU.Flow.Execute.Params, FlowExecuteOptions?: JUHUU.Flow.Execute.Options): Promise<JUHUU.HttpResponse<JUHUU.Flow.Execute.Response>>;
|
|
1707
|
-
private areInputsAvailable;
|
|
1708
1712
|
private resolveInputs;
|
|
1709
|
-
|
|
1710
|
-
|
|
1713
|
+
isInputConnected(block: FlowBlock, inputName: string): boolean;
|
|
1714
|
+
blockExecutors: Partial<Record<FlowBlock["type"], BlockExecutor>>;
|
|
1711
1715
|
executeLocally(FlowExecuteLocallyParams: JUHUU.Flow.ExecuteLocally.Params, FlowExecuteLocallyOptions?: JUHUU.Flow.ExecuteLocally.Options): Promise<JUHUU.Flow.ExecuteLocally.Response>;
|
|
1712
1716
|
}
|
|
1713
1717
|
|
|
@@ -4848,7 +4852,9 @@ declare namespace JUHUU {
|
|
|
4848
4852
|
flowId: string;
|
|
4849
4853
|
input?: Record<string, any>;
|
|
4850
4854
|
};
|
|
4851
|
-
type Options = JUHUU.RequestOptions
|
|
4855
|
+
type Options = JUHUU.RequestOptions & {
|
|
4856
|
+
blockExecutors?: Partial<Record<FlowBlock["type"], BlockExecutor>>;
|
|
4857
|
+
};
|
|
4852
4858
|
type Response = {
|
|
4853
4859
|
output: Record<string, any>;
|
|
4854
4860
|
logArray: FlowLog[];
|
|
@@ -6508,4 +6514,4 @@ declare namespace JUHUU {
|
|
|
6508
6514
|
}
|
|
6509
6515
|
}
|
|
6510
6516
|
|
|
6511
|
-
export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BaseBlock, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocalParameter, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type PushToken, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
|
6517
|
+
export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BaseBlock, type BlockExecutor, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocalParameter, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type PushToken, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1297,6 +1297,11 @@ type FlowLog = {
|
|
|
1297
1297
|
message: string;
|
|
1298
1298
|
createdAt: Date;
|
|
1299
1299
|
};
|
|
1300
|
+
type BlockExecutor = (inputs: FlowBlockInput, block: FlowBlock, context: Record<string, any>) => Promise<{
|
|
1301
|
+
output: Record<string, any>;
|
|
1302
|
+
logArray?: FlowLog[];
|
|
1303
|
+
flowBranch?: string | null;
|
|
1304
|
+
}>;
|
|
1300
1305
|
type DataEdgeConnection = string | null;
|
|
1301
1306
|
type ControlEdgeConnection = string | null;
|
|
1302
1307
|
type QuickAction = {
|
|
@@ -1704,10 +1709,9 @@ declare class FlowsService extends Service {
|
|
|
1704
1709
|
update(FlowUpdateParams: JUHUU.Flow.Update.Params, FlowUpdateOptions?: JUHUU.Flow.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Flow.Update.Response>>;
|
|
1705
1710
|
delete(FlowDeleteParams: JUHUU.Flow.Delete.Params, FlowDeleteOptions?: JUHUU.Flow.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Flow.Delete.Response>>;
|
|
1706
1711
|
execute(FlowExecuteParams: JUHUU.Flow.Execute.Params, FlowExecuteOptions?: JUHUU.Flow.Execute.Options): Promise<JUHUU.HttpResponse<JUHUU.Flow.Execute.Response>>;
|
|
1707
|
-
private areInputsAvailable;
|
|
1708
1712
|
private resolveInputs;
|
|
1709
|
-
|
|
1710
|
-
|
|
1713
|
+
isInputConnected(block: FlowBlock, inputName: string): boolean;
|
|
1714
|
+
blockExecutors: Partial<Record<FlowBlock["type"], BlockExecutor>>;
|
|
1711
1715
|
executeLocally(FlowExecuteLocallyParams: JUHUU.Flow.ExecuteLocally.Params, FlowExecuteLocallyOptions?: JUHUU.Flow.ExecuteLocally.Options): Promise<JUHUU.Flow.ExecuteLocally.Response>;
|
|
1712
1716
|
}
|
|
1713
1717
|
|
|
@@ -4848,7 +4852,9 @@ declare namespace JUHUU {
|
|
|
4848
4852
|
flowId: string;
|
|
4849
4853
|
input?: Record<string, any>;
|
|
4850
4854
|
};
|
|
4851
|
-
type Options = JUHUU.RequestOptions
|
|
4855
|
+
type Options = JUHUU.RequestOptions & {
|
|
4856
|
+
blockExecutors?: Partial<Record<FlowBlock["type"], BlockExecutor>>;
|
|
4857
|
+
};
|
|
4852
4858
|
type Response = {
|
|
4853
4859
|
output: Record<string, any>;
|
|
4854
4860
|
logArray: FlowLog[];
|
|
@@ -6508,4 +6514,4 @@ declare namespace JUHUU {
|
|
|
6508
6514
|
}
|
|
6509
6515
|
}
|
|
6510
6516
|
|
|
6511
|
-
export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BaseBlock, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocalParameter, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type PushToken, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
|
6517
|
+
export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BaseBlock, type BlockExecutor, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocalParameter, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type PushToken, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
package/dist/index.js
CHANGED
|
@@ -3688,22 +3688,6 @@ var FlowsService = class extends Service {
|
|
|
3688
3688
|
FlowExecuteOptions
|
|
3689
3689
|
);
|
|
3690
3690
|
}
|
|
3691
|
-
areInputsAvailable(block, outputStore, edgeArray) {
|
|
3692
|
-
if (block.in === null || block.in === void 0) {
|
|
3693
|
-
return true;
|
|
3694
|
-
}
|
|
3695
|
-
return Object.values(block.in).every((edgeId) => {
|
|
3696
|
-
const edge = edgeArray.find((e) => e.id === edgeId);
|
|
3697
|
-
if (edge === void 0) {
|
|
3698
|
-
return false;
|
|
3699
|
-
}
|
|
3700
|
-
if (edge.type === "control") {
|
|
3701
|
-
return true;
|
|
3702
|
-
}
|
|
3703
|
-
const srcOutputs = outputStore[edge.from.blockId];
|
|
3704
|
-
return srcOutputs !== null && srcOutputs !== void 0 && edge.from.output in srcOutputs;
|
|
3705
|
-
});
|
|
3706
|
-
}
|
|
3707
3691
|
resolveInputs(block, outputStore, edgeArray) {
|
|
3708
3692
|
const inputs = {};
|
|
3709
3693
|
if (block.in === void 0) {
|
|
@@ -3833,6 +3817,10 @@ var FlowsService = class extends Service {
|
|
|
3833
3817
|
blocksById.set(flow.startNode.id, flow.startNode);
|
|
3834
3818
|
const edgeArray = flow.edgeArray;
|
|
3835
3819
|
const outputStore = {};
|
|
3820
|
+
const mergedBlockExecutors = {
|
|
3821
|
+
...this.blockExecutors,
|
|
3822
|
+
...FlowExecuteLocallyOptions?.blockExecutors || {}
|
|
3823
|
+
};
|
|
3836
3824
|
const runBlock = async (block) => {
|
|
3837
3825
|
logArray.push({
|
|
3838
3826
|
createdAt: /* @__PURE__ */ new Date(),
|
|
@@ -3840,7 +3828,7 @@ var FlowsService = class extends Service {
|
|
|
3840
3828
|
severity: "info"
|
|
3841
3829
|
});
|
|
3842
3830
|
const inputs = this.resolveInputs(block, outputStore, edgeArray);
|
|
3843
|
-
const executor =
|
|
3831
|
+
const executor = mergedBlockExecutors[block.type];
|
|
3844
3832
|
if (executor === void 0 || executor === null) {
|
|
3845
3833
|
throw new Error(
|
|
3846
3834
|
`Block type '${block.type}' is not implemented in the local executor`
|
package/dist/index.mjs
CHANGED
|
@@ -3644,22 +3644,6 @@ var FlowsService = class extends Service {
|
|
|
3644
3644
|
FlowExecuteOptions
|
|
3645
3645
|
);
|
|
3646
3646
|
}
|
|
3647
|
-
areInputsAvailable(block, outputStore, edgeArray) {
|
|
3648
|
-
if (block.in === null || block.in === void 0) {
|
|
3649
|
-
return true;
|
|
3650
|
-
}
|
|
3651
|
-
return Object.values(block.in).every((edgeId) => {
|
|
3652
|
-
const edge = edgeArray.find((e) => e.id === edgeId);
|
|
3653
|
-
if (edge === void 0) {
|
|
3654
|
-
return false;
|
|
3655
|
-
}
|
|
3656
|
-
if (edge.type === "control") {
|
|
3657
|
-
return true;
|
|
3658
|
-
}
|
|
3659
|
-
const srcOutputs = outputStore[edge.from.blockId];
|
|
3660
|
-
return srcOutputs !== null && srcOutputs !== void 0 && edge.from.output in srcOutputs;
|
|
3661
|
-
});
|
|
3662
|
-
}
|
|
3663
3647
|
resolveInputs(block, outputStore, edgeArray) {
|
|
3664
3648
|
const inputs = {};
|
|
3665
3649
|
if (block.in === void 0) {
|
|
@@ -3789,6 +3773,10 @@ var FlowsService = class extends Service {
|
|
|
3789
3773
|
blocksById.set(flow.startNode.id, flow.startNode);
|
|
3790
3774
|
const edgeArray = flow.edgeArray;
|
|
3791
3775
|
const outputStore = {};
|
|
3776
|
+
const mergedBlockExecutors = {
|
|
3777
|
+
...this.blockExecutors,
|
|
3778
|
+
...FlowExecuteLocallyOptions?.blockExecutors || {}
|
|
3779
|
+
};
|
|
3792
3780
|
const runBlock = async (block) => {
|
|
3793
3781
|
logArray.push({
|
|
3794
3782
|
createdAt: /* @__PURE__ */ new Date(),
|
|
@@ -3796,7 +3784,7 @@ var FlowsService = class extends Service {
|
|
|
3796
3784
|
severity: "info"
|
|
3797
3785
|
});
|
|
3798
3786
|
const inputs = this.resolveInputs(block, outputStore, edgeArray);
|
|
3799
|
-
const executor =
|
|
3787
|
+
const executor = mergedBlockExecutors[block.type];
|
|
3800
3788
|
if (executor === void 0 || executor === null) {
|
|
3801
3789
|
throw new Error(
|
|
3802
3790
|
`Block type '${block.type}' is not implemented in the local executor`
|