sim-node-lib 0.0.9 → 0.0.13
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/google-pub-sub.d.ts +5 -2
- package/dist/google-pub-sub.js +8 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/google-pub-sub.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare class PubSubModel {
|
|
|
4
4
|
readonly value: object;
|
|
5
5
|
readonly action: string;
|
|
6
6
|
readonly table: string;
|
|
7
|
-
constructor(value: object, action: PubSubActionEnum, table:
|
|
7
|
+
constructor(value: object, action: PubSubActionEnum, table: PubSubTableEnum);
|
|
8
8
|
}
|
|
9
9
|
export declare class GooglePubSubSubscription {
|
|
10
10
|
constructor(subscriptionName: string);
|
|
@@ -14,7 +14,7 @@ export declare class GooglePubSubSubscription {
|
|
|
14
14
|
export declare class GooglePubSubPublish {
|
|
15
15
|
constructor(topicName: string);
|
|
16
16
|
private _topicName;
|
|
17
|
-
createMessages(message: object, action: PubSubActionEnum, table:
|
|
17
|
+
createMessages(message: object, action: PubSubActionEnum, table: PubSubTableEnum): Promise<void>;
|
|
18
18
|
}
|
|
19
19
|
export declare abstract class PubSubHandelerAction {
|
|
20
20
|
constructor(pubsubModel: PubSubModel);
|
|
@@ -30,3 +30,6 @@ export declare enum PubSubActionEnum {
|
|
|
30
30
|
update = "update",
|
|
31
31
|
remove = "remove"
|
|
32
32
|
}
|
|
33
|
+
export declare enum PubSubTableEnum {
|
|
34
|
+
documentoDigital = "documentoDigital"
|
|
35
|
+
}
|
package/dist/google-pub-sub.js
CHANGED
|
@@ -14,7 +14,7 @@ class PubSubModel {
|
|
|
14
14
|
constructor(value, action, table) {
|
|
15
15
|
this.value = value;
|
|
16
16
|
this.action = action.toString();
|
|
17
|
-
this.table = table;
|
|
17
|
+
this.table = table.toString();
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.PubSubModel = PubSubModel;
|
|
@@ -32,13 +32,14 @@ class GooglePubSubSubscription {
|
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
34
|
console.error(error);
|
|
35
|
-
|
|
35
|
+
eventEmitter.emit('error', error);
|
|
36
|
+
message.ack();
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
// Receive callbacks for errors on the subscription
|
|
39
40
|
this._subscription.on('error', (error) => {
|
|
40
41
|
console.error('Received error:', error);
|
|
41
|
-
|
|
42
|
+
eventEmitter.emit('error', error);
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
}
|
|
@@ -105,3 +106,7 @@ var PubSubActionEnum;
|
|
|
105
106
|
PubSubActionEnum["update"] = "update";
|
|
106
107
|
PubSubActionEnum["remove"] = "remove";
|
|
107
108
|
})(PubSubActionEnum = exports.PubSubActionEnum || (exports.PubSubActionEnum = {}));
|
|
109
|
+
var PubSubTableEnum;
|
|
110
|
+
(function (PubSubTableEnum) {
|
|
111
|
+
PubSubTableEnum["documentoDigital"] = "documentoDigital";
|
|
112
|
+
})(PubSubTableEnum = exports.PubSubTableEnum || (exports.PubSubTableEnum = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { sayHello, sayGoodbye } from "./hello-world";
|
|
2
|
-
export { GooglePubSubSubscription, GooglePubSubPublish } from "./google-pub-sub";
|
|
2
|
+
export { GooglePubSubSubscription, GooglePubSubPublish, PubSubHandelerAction } from "./google-pub-sub";
|
package/dist/index.js
CHANGED
|
@@ -6,3 +6,4 @@ exports.sayGoodbye = hello_world_1.sayGoodbye;
|
|
|
6
6
|
var google_pub_sub_1 = require("./google-pub-sub");
|
|
7
7
|
exports.GooglePubSubSubscription = google_pub_sub_1.GooglePubSubSubscription;
|
|
8
8
|
exports.GooglePubSubPublish = google_pub_sub_1.GooglePubSubPublish;
|
|
9
|
+
exports.PubSubHandelerAction = google_pub_sub_1.PubSubHandelerAction;
|