Skip to content

Commit

Permalink
chorw: fix update for Node-Red
Browse files Browse the repository at this point in the history
  • Loading branch information
CybotTM committed Jul 30, 2024
1 parent 67631bd commit 1ede73c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/magento-eqp-callback-parser.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { EQPStatusUpdateEvent, MalwareScanCompleteEvent } from '@netresearch/node-magento-eqp';
import { AxiosError } from 'axios';
import { NodeProperties, Red } from 'node-red';
import { EditorNodeProperties, NodeRedApp } from 'node-red';
import { Node } from 'node-red-contrib-typescript-node';
import { Message } from './common';
import { MagentoEQPConfig } from './magento-eqp-config';

interface Config extends NodeProperties {
interface Config extends EditorNodeProperties {
config: string;
}

class MagentoEQPCallbackParser extends Node {
protected configNode?: MagentoEQPConfig;

constructor(config: Config, RED: Red) {
constructor(config: Config, RED: NodeRedApp) {
super(RED);

this.createNode(config);
Expand Down Expand Up @@ -66,7 +66,7 @@ class MagentoEQPCallbackParser extends Node {
}
}

module.exports = function(RED: Red) {
module.exports = function(RED: NodeRedApp) {
class MagentoEQPCallbackParserWrapper extends MagentoEQPCallbackParser {
constructor(config: Config) {
super(config, RED);
Expand Down
8 changes: 4 additions & 4 deletions src/magento-eqp-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EQP } from '@netresearch/node-magento-eqp';
import { NodeProperties, Red } from 'node-red';
import { EditorNodeProperties, NodeRedApp } from 'node-red';
import { Node } from 'node-red-contrib-typescript-node';

type Environment = 'production' | 'sandbox';
Expand All @@ -8,7 +8,7 @@ class RedNode extends Node {
credentials: Record<string, string> = {};
}

interface Config extends NodeProperties {
interface Config extends EditorNodeProperties {
appId: string;
appSecret: string;
environment: Environment;
Expand All @@ -22,7 +22,7 @@ export class MagentoEQPConfig extends RedNode {
readonly appSecret: string;
readonly environment: Environment;

constructor(config: Config, RED: Red) {
constructor(config: Config, RED: NodeRedApp) {
super(RED);

this.createNode(config);
Expand All @@ -44,7 +44,7 @@ export class MagentoEQPConfig extends RedNode {
}
}

module.exports = function (RED: Red) {
module.exports = function (RED: NodeRedApp) {
class MagentoEQPConfigWrapper extends MagentoEQPConfig {
constructor(config: Config) {
super(config, RED);
Expand Down
8 changes: 4 additions & 4 deletions src/magento-eqp-register-callback.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { NodeProperties, Red } from 'node-red';
import { EditorNodeProperties, NodeRedApp } from 'node-red';
import { Node } from 'node-red-contrib-typescript-node';
import { Message } from './common';
import { MagentoEQPConfig } from './magento-eqp-config';

interface Config extends NodeProperties {
interface Config extends EditorNodeProperties {
config: string;
}

class MagentoEQPRegisterCallback extends Node {
protected configNode?: MagentoEQPConfig;

constructor(config: Config, RED: Red) {
constructor(config: Config, RED: NodeRedApp) {
super(RED);

this.createNode(config);
Expand Down Expand Up @@ -63,7 +63,7 @@ class MagentoEQPRegisterCallback extends Node {
}
}

module.exports = function (RED: Red) {
module.exports = function (RED: NodeRedApp) {
class MagentoEQPRegisterCallbackWrapper extends MagentoEQPRegisterCallback {
constructor(config: Config) {
super(config, RED);
Expand Down

0 comments on commit 1ede73c

Please sign in to comment.