Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@knocklabs/client

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knocklabs/client - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

34

dist/cjs/clients/feed/feed.js

@@ -30,3 +30,7 @@ "use strict";

// Default options to apply
function invertStatus(status) {
return status.startsWith("un") ? status.substring(2, status.length) : "un".concat(status);
} // Default options to apply
var feedClientDefaults = {

@@ -257,8 +261,7 @@ archived: "exclude"

Scenarios to consider:
## Feed scope to archived *only*
## Feed scope to archived *only*
- Counts should not be decremented
- Items should not be removed
## Feed scoped to exclude archived items (the default)
- Counts should be decremented
- Counts should be decremented
- Items should be removed

@@ -620,13 +623,28 @@ ## Feed scoped to include archived items as well

case 5:
_context10.next = 7;
if (!type.startsWith("un")) {
_context10.next = 9;
break;
}
_context10.next = 8;
return this.apiClient.makeRequest({
method: type.startsWith("un") ? "DELETE" : "PUT",
method: "DELETE",
url: "/v1/messages/".concat(itemOrItems.id, "/").concat(invertStatus(type))
});
case 8:
return _context10.abrupt("return", _context10.sent);
case 9:
_context10.next = 11;
return this.apiClient.makeRequest({
method: "PUT",
url: "/v1/messages/".concat(itemOrItems.id, "/").concat(type)
});
case 7:
case 11:
result = _context10.sent;
return _context10.abrupt("return", result);
case 9:
case 13:
case "end":

@@ -633,0 +651,0 @@ return _context10.stop();

@@ -11,3 +11,8 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";

import { isRequestInFlight, NetworkStatus } from "../../networkStatus";
// Default options to apply
function invertStatus(status) {
return status.startsWith("un") ? status.substring(2, status.length) : "un".concat(status);
} // Default options to apply
var feedClientDefaults = {

@@ -170,8 +175,7 @@ archived: "exclude"

Scenarios to consider:
## Feed scope to archived *only*
## Feed scope to archived *only*
- Counts should not be decremented
- Items should not be removed
## Feed scoped to exclude archived items (the default)
- Counts should be decremented
- Counts should be decremented
- Items should be removed

@@ -406,2 +410,10 @@ ## Feed scoped to include archived items as well

});
} // Handle unx actions
if (type.startsWith("un")) {
return yield _this10.apiClient.makeRequest({
method: "DELETE",
url: "/v1/messages/".concat(itemOrItems.id, "/").concat(invertStatus(type))
});
} // If its a single then we can just call the regular endpoint

@@ -411,3 +423,3 @@

var result = yield _this10.apiClient.makeRequest({
method: type.startsWith("un") ? "DELETE" : "PUT",
method: "PUT",
url: "/v1/messages/".concat(itemOrItems.id, "/").concat(type)

@@ -414,0 +426,0 @@ });

{
"name": "@knocklabs/client",
"version": "0.8.0",
"version": "0.8.1",
"description": "The clientside library for interacting with Knock",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/knocklabs/knock-client-js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc