@things-factory/integration-base 4.3.544-alpha.0 → 4.3.544
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-server/service/index.js +6 -2
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/webhook/webhook.js +18 -11
- package/dist-server/service/webhook/webhook.js.map +1 -1
- package/dist-server/service/webhook-event/webhhok-event-enums.js +24 -24
- package/dist-server/service/webhook-event/webhhok-event-enums.js.map +1 -1
- package/dist-server/service/webhook-event/webhook-event.js +2 -2
- package/dist-server/service/webhook-event/webhook-event.js.map +1 -1
- package/package.json +6 -6
- package/server/service/index.ts +3 -1
- package/server/service/webhook/webhook.ts +16 -7
- package/server/service/webhook-event/webhhok-event-enums.ts +1 -1
- package/server/service/webhook-event/webhook-event.ts +4 -4
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.WebhookEvent = exports.Webhook = exports.WebhookEventsEnum = exports.webhookHandler = exports.createPayloadLog = exports.PayloadType = exports.schema = exports.entities = void 0;
|
|
18
18
|
const connection_1 = require("./connection");
|
|
19
19
|
const connector_1 = require("./connector");
|
|
20
20
|
const integration_1 = require("./integration");
|
|
@@ -73,5 +73,9 @@ Object.defineProperty(exports, "createPayloadLog", { enumerable: true, get: func
|
|
|
73
73
|
var webhook_controller_1 = require("./webhook-handler/webhook-controller");
|
|
74
74
|
Object.defineProperty(exports, "webhookHandler", { enumerable: true, get: function () { return webhook_controller_1.webhookHandler; } });
|
|
75
75
|
var webhhok_event_enums_1 = require("./webhook-event/webhhok-event-enums");
|
|
76
|
-
Object.defineProperty(exports, "
|
|
76
|
+
Object.defineProperty(exports, "WebhookEventsEnum", { enumerable: true, get: function () { return webhhok_event_enums_1.WebhookEventsEnum; } });
|
|
77
|
+
var webhook_2 = require("./webhook/webhook");
|
|
78
|
+
Object.defineProperty(exports, "Webhook", { enumerable: true, get: function () { return webhook_2.Webhook; } });
|
|
79
|
+
var webhook_event_2 = require("./webhook-event/webhook-event");
|
|
80
|
+
Object.defineProperty(exports, "WebhookEvent", { enumerable: true, get: function () { return webhook_event_2.WebhookEvent; } });
|
|
77
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA+F;AAC/F,2CAA4F;AAC5F,+CAAkG;AAClG,+CAAgG;AAChG,yCAAyF;AACzF,2DAAkH;AAClH,qDAAyG;AACzG,iCAA6E;AAC7E,2CAA0F;AAC1F,uCAAsF;AACtF,mDAAsG;AAEtG,kDAA+B;AAC/B,6DAA0C;AAC1C,6DAA0C;AAC1C,+DAA4C;AAC5C,2DAAwC;AACxC,6EAA0D;AAC1D,uEAAoD;AACpD,mDAAgC;AAChC,gEAA6C;AAC7C,4DAAyC;AACzC,4DAAyC;AACzC,oDAAiC;AAEpB,QAAA,QAAQ,GAAG;IACtB,GAAG,oBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,qBAAkB;IACrB,GAAG,mBAAgB;IACnB,GAAG,4BAAwB;IAC3B,GAAG,yBAAqB;IACxB,GAAG,eAAY;IACf,GAAG,sBAAkB;IACrB,GAAG,sBAAmB;IACtB,GAAG,kBAAe;IAClB,GAAG,wBAAoB;CACxB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,qBAAiB;QACpB,GAAG,qBAAkB;QACrB,GAAG,sBAAmB;QACtB,GAAG,oBAAiB;QACpB,GAAG,6BAAyB;QAC5B,GAAG,0BAAsB;QACzB,GAAG,gBAAa;QAChB,GAAG,uBAAmB;QACtB,GAAG,uBAAoB;QACvB,GAAG,mBAAgB;QACnB,GAAG,yBAAqB;KACzB;CACF,CAAA;AAED,yDAAuD;AAA9C,0GAAA,WAAW,OAAA;AACpB,2EAAqE;AAA5D,wHAAA,gBAAgB,OAAA;AACzB,2EAAqE;AAA5D,oHAAA,cAAc,OAAA;AACvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA+F;AAC/F,2CAA4F;AAC5F,+CAAkG;AAClG,+CAAgG;AAChG,yCAAyF;AACzF,2DAAkH;AAClH,qDAAyG;AACzG,iCAA6E;AAC7E,2CAA0F;AAC1F,uCAAsF;AACtF,mDAAsG;AAEtG,kDAA+B;AAC/B,6DAA0C;AAC1C,6DAA0C;AAC1C,+DAA4C;AAC5C,2DAAwC;AACxC,6EAA0D;AAC1D,uEAAoD;AACpD,mDAAgC;AAChC,gEAA6C;AAC7C,4DAAyC;AACzC,4DAAyC;AACzC,oDAAiC;AAEpB,QAAA,QAAQ,GAAG;IACtB,GAAG,oBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,qBAAkB;IACrB,GAAG,mBAAgB;IACnB,GAAG,4BAAwB;IAC3B,GAAG,yBAAqB;IACxB,GAAG,eAAY;IACf,GAAG,sBAAkB;IACrB,GAAG,sBAAmB;IACtB,GAAG,kBAAe;IAClB,GAAG,wBAAoB;CACxB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,GAAG,qBAAiB;QACpB,GAAG,qBAAkB;QACrB,GAAG,sBAAmB;QACtB,GAAG,oBAAiB;QACpB,GAAG,6BAAyB;QAC5B,GAAG,0BAAsB;QACzB,GAAG,gBAAa;QAChB,GAAG,uBAAmB;QACtB,GAAG,uBAAoB;QACvB,GAAG,mBAAgB;QACnB,GAAG,yBAAqB;KACzB;CACF,CAAA;AAED,yDAAuD;AAA9C,0GAAA,WAAW,OAAA;AACpB,2EAAqE;AAA5D,wHAAA,gBAAgB,OAAA;AACzB,2EAAqE;AAA5D,oHAAA,cAAc,OAAA;AACvB,2EAAuE;AAA9D,wHAAA,iBAAiB,OAAA;AAC1B,6CAA2C;AAAlC,kGAAA,OAAO,OAAA;AAChB,+DAA4D;AAAnD,6GAAA,YAAY,OAAA"}
|
|
@@ -8,11 +8,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var _a;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.Webhook = void 0;
|
|
13
14
|
const type_graphql_1 = require("type-graphql");
|
|
14
15
|
const typeorm_1 = require("typeorm");
|
|
15
16
|
const biz_base_1 = require("@things-factory/biz-base");
|
|
17
|
+
const shell_1 = require("@things-factory/shell");
|
|
16
18
|
const webhook_event_1 = require("../webhook-event/webhook-event");
|
|
17
19
|
let Webhook = class Webhook {
|
|
18
20
|
};
|
|
@@ -55,20 +57,25 @@ __decorate([
|
|
|
55
57
|
__decorate([
|
|
56
58
|
(0, typeorm_1.CreateDateColumn)(),
|
|
57
59
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
58
|
-
__metadata("design:type", Date
|
|
59
|
-
// targetUrl varchar [note:'The main URL that Lambda calls to send webhook event data.']
|
|
60
|
-
// extensionUrl varchar [note:'A flexible path segment that can be updated as needed to access different resources or endpoints under the base URL.']
|
|
61
|
-
// headers JSON [note:'Hook specific additional HTTP headers that should be added to HTTP request, stored as JSON blob']
|
|
62
|
-
// properties JSON [note:'Hook specific additional data that should be added to payload, stored as JSON blob']
|
|
63
|
-
// includeTime bool [note:'To include sending timestamp during hashing']
|
|
64
|
-
// algorithm enum [note:'none, HS256, RS256']
|
|
65
|
-
// publicKey varchar [note:'System Generated. Public key used for generating/verify signature, so that powrhub can use to sign or receiver can verify that call came from this server. Used when as sign and verification key for HS256 and RS256']
|
|
66
|
-
// privateKey varchar [note:'System Generated. Private key used for generating signature, so that powrhub can use to sign, only for RS256']
|
|
67
|
-
)
|
|
60
|
+
__metadata("design:type", Date)
|
|
68
61
|
], Webhook.prototype, "createdAt", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
64
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], Webhook.prototype, "updatedAt", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
69
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
70
|
+
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
71
|
+
], Webhook.prototype, "domain", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.RelationId)((webhook) => webhook.domain),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], Webhook.prototype, "domainId", void 0);
|
|
69
76
|
Webhook = __decorate([
|
|
70
77
|
(0, typeorm_1.Entity)(),
|
|
71
|
-
(0, typeorm_1.Index)('ix_webhook_0', (webhook) => [webhook.name], { unique: true }),
|
|
78
|
+
(0, typeorm_1.Index)('ix_webhook_0', (webhook) => [webhook.name, webhook.domain], { unique: true }),
|
|
72
79
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Webhook' })
|
|
73
80
|
], Webhook);
|
|
74
81
|
exports.Webhook = Webhook;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../server/service/webhook/webhook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../server/service/webhook/webhook.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCAYgB;AAEhB,uDAAmD;AACnD,iDAA8C;AAC9C,kEAA6D;AAKtD,IAAM,OAAO,GAAb,MAAM,OAAO;CAqDnB,CAAA;AApDC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;mCACC;AAEnB;IAAC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;qCACI;AAEZ;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACV;AAEhB;IAAC,IAAA,gBAAM,GAAE;;0CACQ;AAEjB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAErB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,EAAE,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC;IACrE,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,4BAAY,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACrB;AAE7B;IAAC,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC,mBAAQ,CAAC;IAC5B,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;IACxC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,CAAC;;0CACJ;AAEtB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACd,IAAI;0CAAA;AAEhB;IAAC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACd,IAAI;0CAAA;AAEhB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDACjB,cAAM,oBAAN,cAAM;uCAAA;AAEf;IAAC,IAAA,oBAAU,EAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;;yCAChC;AA3CN,OAAO;IAHnB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,cAAc,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7F,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;GACrC,OAAO,CAqDnB;AArDY,0BAAO"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
3
|
+
exports.WebhookEventsEnum = void 0;
|
|
4
|
+
var WebhookEventsEnum;
|
|
5
|
+
(function (WebhookEventsEnum) {
|
|
6
6
|
//Inbound Events
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
WebhookEventsEnum["ArrivalNoticeCreated"] = "arrival_notice_created";
|
|
8
|
+
WebhookEventsEnum["ArrivalNoticeUpdated"] = "arrival_notice_updated";
|
|
9
|
+
WebhookEventsEnum["ArrivalNoticeConfirmed"] = "arrival_notice_confirmed";
|
|
10
|
+
WebhookEventsEnum["ArrivalNoticeCompleted"] = "arrival_notice_completed";
|
|
11
|
+
WebhookEventsEnum["GrnCreated"] = "grn_created";
|
|
12
12
|
//Outbound Events
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
WebhookEventsEnum["DraftOrderCreated"] = "draft_order_created";
|
|
14
|
+
WebhookEventsEnum["DraftOrderUpdated"] = "draft_order_updated";
|
|
15
|
+
WebhookEventsEnum["DraftOrderConverted"] = "draft_order_converted";
|
|
16
|
+
WebhookEventsEnum["ReleaseOrderCreated"] = "release_order_created";
|
|
17
|
+
WebhookEventsEnum["ReleaseOrderUpdated"] = "release_order_updated";
|
|
18
|
+
WebhookEventsEnum["ReleaseOrderConfirmed"] = "release_order_confirmed";
|
|
19
|
+
WebhookEventsEnum["ReleaseOrderCompleted"] = "release_order_completed";
|
|
20
|
+
WebhookEventsEnum["PickingStarted"] = "picking_started";
|
|
21
|
+
WebhookEventsEnum["PickingCompleted"] = "picking_completed";
|
|
22
|
+
WebhookEventsEnum["PackingStarted"] = "packing_started";
|
|
23
|
+
WebhookEventsEnum["PackingCompleted"] = "packing_completed";
|
|
24
|
+
WebhookEventsEnum["LoadingStarted"] = "loading_started";
|
|
25
|
+
WebhookEventsEnum["LoadingCompleted"] = "loading_completed";
|
|
26
26
|
//Inventory Events
|
|
27
|
-
|
|
27
|
+
WebhookEventsEnum["InventoryAdjusted"] = "inventory_adjusted";
|
|
28
28
|
//Manifest Events
|
|
29
|
-
|
|
30
|
-
})(
|
|
29
|
+
WebhookEventsEnum["DispatchManifest"] = "dispatch_manifest";
|
|
30
|
+
})(WebhookEventsEnum = exports.WebhookEventsEnum || (exports.WebhookEventsEnum = {}));
|
|
31
31
|
//# sourceMappingURL=webhhok-event-enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhhok-event-enums.js","sourceRoot":"","sources":["../../../server/service/webhook-event/webhhok-event-enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"webhhok-event-enums.js","sourceRoot":"","sources":["../../../server/service/webhook-event/webhhok-event-enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBA4BX;AA5BD,WAAY,iBAAiB;IACzB,iBAAiB;IACjB,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAC/C,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,+CAA0B,CAAA;IAE1B,iBAAiB;IACjB,8DAAyC,CAAA;IACzC,8DAAyC,CAAA;IACzC,kEAA6C,CAAA;IAC7C,kEAA4C,CAAA;IAC5C,kEAA4C,CAAA;IAC5C,sEAAiD,CAAA;IACjD,sEAAgD,CAAA;IAChD,uDAAkC,CAAA;IAClC,2DAAsC,CAAA;IACtC,uDAAkC,CAAA;IAClC,2DAAsC,CAAA;IACtC,uDAAkC,CAAA;IAClC,2DAAsC,CAAA;IAEtC,kBAAkB;IAClB,6DAAwC,CAAA;IAExC,iBAAiB;IACjB,2DAAsC,CAAA;AAC1C,CAAC,EA5BW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA4B5B"}
|
|
@@ -14,7 +14,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
15
|
const webhook_1 = require("../webhook/webhook");
|
|
16
16
|
const webhhok_event_enums_1 = require("../webhook-event/webhhok-event-enums");
|
|
17
|
-
(0, type_graphql_1.registerEnumType)(webhhok_event_enums_1.
|
|
17
|
+
(0, type_graphql_1.registerEnumType)(webhhok_event_enums_1.WebhookEventsEnum, {
|
|
18
18
|
name: 'WebhookEvents',
|
|
19
19
|
description: 'state enumeration of a webhook events'
|
|
20
20
|
});
|
|
@@ -28,7 +28,7 @@ __decorate([
|
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, typeorm_1.Column)({
|
|
30
30
|
type: 'enum',
|
|
31
|
-
enum: webhhok_event_enums_1.
|
|
31
|
+
enum: webhhok_event_enums_1.WebhookEventsEnum,
|
|
32
32
|
enumName: 'webhook_events_enum'
|
|
33
33
|
}),
|
|
34
34
|
(0, type_graphql_1.Field)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event.js","sourceRoot":"","sources":["../../../server/service/webhook-event/webhook-event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAAgH;AAEhH,gDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"webhook-event.js","sourceRoot":"","sources":["../../../server/service/webhook-event/webhook-event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAAgH;AAEhH,gDAA4C;AAC5C,8EAAwE;AAExE,IAAA,+BAAgB,EAAC,uCAAiB,EAAE;IAClC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,uCAAuC;CACrD,CAAC,CAAA;AAOK,IAAM,YAAY,GAAlB,MAAM,YAAY;CAwBxB,CAAA;AAvBC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;wCACC;AAEnB;IAAC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,uCAAiB;QACvB,QAAQ,EAAE,qBAAqB;KAChC,CAAC;IACD,IAAA,oBAAK,GAAE;;0CACe;AAEvB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAO,CAAC;8BACb,iBAAO;6CAAA;AAEjB;IAAC,IAAA,oBAAU,EAAC,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC;;+CAC/C;AAElB;IAAC,IAAA,oBAAK,GAAE;IACP,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACd,IAAI;+CAAA;AAvBL,YAAY;IALxB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE;QACtG,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;GAC1C,YAAY,CAwBxB;AAxBY,oCAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-base",
|
|
3
|
-
"version": "4.3.544
|
|
3
|
+
"version": "4.3.544",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@apollo/client": "^3.5.6",
|
|
28
28
|
"@aws-sdk/client-lambda": "3.513.0",
|
|
29
29
|
"@aws-sdk/client-sqs": "^3.46.0",
|
|
30
|
-
"@things-factory/api": "^4.3.
|
|
31
|
-
"@things-factory/auth-base": "^4.3.
|
|
32
|
-
"@things-factory/oauth2-client": "^4.3.
|
|
33
|
-
"@things-factory/shell": "^4.3.
|
|
30
|
+
"@things-factory/api": "^4.3.535",
|
|
31
|
+
"@things-factory/auth-base": "^4.3.535",
|
|
32
|
+
"@things-factory/oauth2-client": "^4.3.535",
|
|
33
|
+
"@things-factory/shell": "^4.3.535",
|
|
34
34
|
"async-mqtt": "^2.5.0",
|
|
35
35
|
"cron": "^1.7.2",
|
|
36
36
|
"cross-fetch": "^3.0.4",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"uuid": "10.0.0",
|
|
43
43
|
"vm2": "^3.9.2"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d9ba6fd47325e8b698b33e2ea133f8596ba55719"
|
|
46
46
|
}
|
package/server/service/index.ts
CHANGED
|
@@ -56,4 +56,6 @@ export const schema = {
|
|
|
56
56
|
export { PayloadType } from './payload-log/payload-log'
|
|
57
57
|
export { createPayloadLog } from './payload-log/payload-log-mutation'
|
|
58
58
|
export { webhookHandler } from './webhook-handler/webhook-controller'
|
|
59
|
-
export {
|
|
59
|
+
export { WebhookEventsEnum } from './webhook-event/webhhok-event-enums'
|
|
60
|
+
export { Webhook } from './webhook/webhook'
|
|
61
|
+
export { WebhookEvent } from './webhook-event/webhook-event'
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Field,
|
|
3
|
-
ID,
|
|
4
|
-
ObjectType
|
|
5
|
-
} from 'type-graphql'
|
|
1
|
+
import { Field, ID, ObjectType } from 'type-graphql'
|
|
6
2
|
import {
|
|
7
3
|
Column,
|
|
8
4
|
CreateDateColumn,
|
|
5
|
+
UpdateDateColumn,
|
|
9
6
|
Entity,
|
|
10
7
|
Index,
|
|
11
8
|
JoinTable,
|
|
12
9
|
ManyToMany,
|
|
13
10
|
OneToMany,
|
|
11
|
+
ManyToOne,
|
|
12
|
+
RelationId,
|
|
14
13
|
PrimaryGeneratedColumn
|
|
15
14
|
} from 'typeorm'
|
|
16
15
|
|
|
17
16
|
import { Bizplace } from '@things-factory/biz-base'
|
|
18
|
-
|
|
17
|
+
import { Domain } from '@things-factory/shell'
|
|
19
18
|
import { WebhookEvent } from '../webhook-event/webhook-event'
|
|
20
19
|
|
|
21
20
|
@Entity()
|
|
22
|
-
@Index('ix_webhook_0', (webhook: Webhook) => [webhook.name], { unique: true })
|
|
21
|
+
@Index('ix_webhook_0', (webhook: Webhook) => [webhook.name, webhook.domain], { unique: true })
|
|
23
22
|
@ObjectType({ description: 'Entity for Webhook' })
|
|
24
23
|
export class Webhook {
|
|
25
24
|
@PrimaryGeneratedColumn('uuid')
|
|
@@ -55,6 +54,16 @@ export class Webhook {
|
|
|
55
54
|
@Field({ nullable: true })
|
|
56
55
|
createdAt?: Date
|
|
57
56
|
|
|
57
|
+
@UpdateDateColumn()
|
|
58
|
+
@Field({ nullable: true })
|
|
59
|
+
updatedAt?: Date
|
|
60
|
+
|
|
61
|
+
@ManyToOne(type => Domain)
|
|
62
|
+
@Field({ nullable: true })
|
|
63
|
+
domain?: Domain
|
|
64
|
+
|
|
65
|
+
@RelationId((webhook: Webhook) => webhook.domain)
|
|
66
|
+
domainId?: string
|
|
58
67
|
|
|
59
68
|
// targetUrl varchar [note:'The main URL that Lambda calls to send webhook event data.']
|
|
60
69
|
// extensionUrl varchar [note:'A flexible path segment that can be updated as needed to access different resources or endpoints under the base URL.']
|
|
@@ -2,9 +2,9 @@ import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'
|
|
|
2
2
|
import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'
|
|
3
3
|
|
|
4
4
|
import { Webhook } from '../webhook/webhook'
|
|
5
|
-
import {
|
|
5
|
+
import { WebhookEventsEnum } from '../webhook-event/webhhok-event-enums'
|
|
6
6
|
|
|
7
|
-
registerEnumType(
|
|
7
|
+
registerEnumType(WebhookEventsEnum, {
|
|
8
8
|
name: 'WebhookEvents',
|
|
9
9
|
description: 'state enumeration of a webhook events'
|
|
10
10
|
})
|
|
@@ -21,11 +21,11 @@ export class WebhookEvent {
|
|
|
21
21
|
|
|
22
22
|
@Column({
|
|
23
23
|
type: 'enum',
|
|
24
|
-
enum:
|
|
24
|
+
enum: WebhookEventsEnum,
|
|
25
25
|
enumName: 'webhook_events_enum'
|
|
26
26
|
})
|
|
27
27
|
@Field()
|
|
28
|
-
name:
|
|
28
|
+
name: WebhookEventsEnum
|
|
29
29
|
|
|
30
30
|
@ManyToOne(type => Webhook, { nullable: true })
|
|
31
31
|
@Field(type => Webhook)
|