dbm-graph-api 1.1.50 → 1.1.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbm-graph-api",
3
- "version": "1.1.50",
3
+ "version": "1.1.51",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "@aws-sdk/client-s3": "^3.984.0",
15
15
  "@aws-sdk/s3-request-presigner": "^3.984.0",
16
- "dbm": "^1.4.7",
16
+ "dbm": "^1.4.9",
17
17
  "html-to-text": "^9.0.5",
18
18
  "mime": "^4.1.0",
19
19
  "node-cron": "^4.2.1",
@@ -202,15 +202,15 @@ export default class UrlRequest extends Dbm.core.BaseObject {
202
202
 
203
203
  let incomingWebhook = await database.createObject("private", ["incomingWebhook"]);
204
204
  await incomingWebhook.updateField("data", data);
205
- await incomingWebhook.addIncomingRelation(webhookType, "for");
205
+ await incomingWebhook.incomingRelations.add(webhookType, "for");
206
206
 
207
207
  let actionType = await database.getTypeObject("type/actionType", "incomingWebhook/" + type);
208
208
  let actionStatus = await database.getTypeObject("status/actionStatus", "readyToProcess");
209
209
 
210
210
  let action = await database.createObject("private", ["action"]);
211
- await action.addIncomingRelation(actionType, "for");
212
- await action.addIncomingRelation(incomingWebhook, "from");
213
- await action.addIncomingRelation(actionStatus, "for");
211
+ await action.incomingRelations.add(actionType, "for");
212
+ await action.outgoingRelations.add(incomingWebhook, "from");
213
+ await action.incomingRelations.add(actionStatus, "for");
214
214
 
215
215
  returnObject["id"] = incomingWebhook.id;
216
216
  returnObject["action"] = action.id;
@@ -558,7 +558,7 @@ export const setupEndpoints = function(aServer) {
558
558
  request.setup(aRequest, aReply);
559
559
 
560
560
  let currentUrl = url.parse(aRequest.url);
561
- let webhookType = currentUrl.pathname.substring("/api/incomingWebhook/".length);
561
+ let webhookType = currentUrl.pathname.substring("/api/webhook/".length);
562
562
 
563
563
  await request.incomingWebhook(webhookType, params);
564
564
 
@@ -571,7 +571,7 @@ export const setupEndpoints = function(aServer) {
571
571
  request.setup(aRequest, aReply);
572
572
 
573
573
  let currentUrl = url.parse(aRequest.url);
574
- let webhookType = currentUrl.pathname.substring("/api/incomingWebhook/".length);
574
+ let webhookType = currentUrl.pathname.substring("/api/webhook/".length);
575
575
 
576
576
  await request.incomingWebhook(webhookType, params);
577
577