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

@cerbos/http

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerbos/http - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

2

lib/protobuf/google/api/expr/v1alpha1/checked.d.ts

@@ -289,3 +289,3 @@ import { Empty } from "../../../protobuf/empty";

* Whether the function is to be used in a method call-style `x.f(...)`
* of a function call-style `f(x, ...)`.
* or a function call-style `f(x, ...)`.
*

@@ -292,0 +292,0 @@ * For methods, the first parameter declaration, `params[0]` is the

@@ -26,3 +26,3 @@ export declare const protobufPackage = "grpc.gateway.protoc_gen_openapiv2.options";

* version: "1.0";
* description: ";
* description: "";
* contact: {

@@ -303,3 +303,3 @@ * name: "gRPC-Gateway project";

* version: "1.0";
* description: ";
* description: "";
* contact: {

@@ -544,2 +544,7 @@ * name: "gRPC-Gateway project";

enum: string[];
/** Additional field level properties used when generating the OpenAPI v2 file. */
fieldConfiguration: JSONSchema_FieldConfiguration | undefined;
extensions: {
[key: string]: any | undefined;
};
}

@@ -559,2 +564,19 @@ export declare enum JSONSchema_JSONSchemaSimpleTypes {

/**
* 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
* These properties are not defined by OpenAPIv2, but they are used to control the generation.
*/
export interface JSONSchema_FieldConfiguration {
/**
* Alternative parameter name when used as path parameter. If set, this will
* be used as the complete parameter name when this field is used as a path
* parameter. Use this to avoid having auto generated path parameter names
* for overlapping paths.
*/
pathParamName: string;
}
export interface JSONSchema_ExtensionsEntry {
key: string;
value: any | undefined;
}
/**
* `Tag` is a representation of OpenAPI v2 specification's Tag object.

@@ -818,2 +840,10 @@ *

};
export declare const JSONSchema_FieldConfiguration: {
fromJSON(object: any): JSONSchema_FieldConfiguration;
toJSON(message: JSONSchema_FieldConfiguration): unknown;
};
export declare const JSONSchema_ExtensionsEntry: {
fromJSON(object: any): JSONSchema_ExtensionsEntry;
toJSON(message: JSONSchema_ExtensionsEntry): unknown;
};
export declare const Tag: {

@@ -820,0 +850,0 @@ fromJSON(object: any): Tag;

"use strict";
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scopes_ScopeEntry = exports.Scopes = exports.SecurityRequirement_SecurityRequirementEntry = exports.SecurityRequirement_SecurityRequirementValue = exports.SecurityRequirement = exports.SecurityScheme_ExtensionsEntry = exports.SecurityScheme = exports.SecurityDefinitions_SecurityEntry = exports.SecurityDefinitions = exports.Tag = exports.JSONSchema = exports.Schema = exports.ExternalDocumentation = exports.License = exports.Contact = exports.Info_ExtensionsEntry = exports.Info = exports.Response_ExtensionsEntry = exports.Response_ExamplesEntry = exports.Response_HeadersEntry = exports.Response = exports.Header = exports.Operation_ExtensionsEntry = exports.Operation_ResponsesEntry = exports.Operation = exports.Swagger_ExtensionsEntry = exports.Swagger_ResponsesEntry = exports.Swagger = exports.securityScheme_FlowToJSON = exports.securityScheme_FlowFromJSON = exports.SecurityScheme_Flow = exports.securityScheme_InToJSON = exports.securityScheme_InFromJSON = exports.SecurityScheme_In = exports.securityScheme_TypeToJSON = exports.securityScheme_TypeFromJSON = exports.SecurityScheme_Type = exports.jSONSchema_JSONSchemaSimpleTypesToJSON = exports.jSONSchema_JSONSchemaSimpleTypesFromJSON = exports.JSONSchema_JSONSchemaSimpleTypes = exports.schemeToJSON = exports.schemeFromJSON = exports.Scheme = exports.protobufPackage = void 0;
exports.Scopes_ScopeEntry = exports.Scopes = exports.SecurityRequirement_SecurityRequirementEntry = exports.SecurityRequirement_SecurityRequirementValue = exports.SecurityRequirement = exports.SecurityScheme_ExtensionsEntry = exports.SecurityScheme = exports.SecurityDefinitions_SecurityEntry = exports.SecurityDefinitions = exports.Tag = exports.JSONSchema_ExtensionsEntry = exports.JSONSchema_FieldConfiguration = exports.JSONSchema = exports.Schema = exports.ExternalDocumentation = exports.License = exports.Contact = exports.Info_ExtensionsEntry = exports.Info = exports.Response_ExtensionsEntry = exports.Response_ExamplesEntry = exports.Response_HeadersEntry = exports.Response = exports.Header = exports.Operation_ExtensionsEntry = exports.Operation_ResponsesEntry = exports.Operation = exports.Swagger_ExtensionsEntry = exports.Swagger_ResponsesEntry = exports.Swagger = exports.securityScheme_FlowToJSON = exports.securityScheme_FlowFromJSON = exports.SecurityScheme_Flow = exports.securityScheme_InToJSON = exports.securityScheme_InFromJSON = exports.SecurityScheme_In = exports.securityScheme_TypeToJSON = exports.securityScheme_TypeFromJSON = exports.SecurityScheme_Type = exports.jSONSchema_JSONSchemaSimpleTypesToJSON = exports.jSONSchema_JSONSchemaSimpleTypesFromJSON = exports.JSONSchema_JSONSchemaSimpleTypes = exports.schemeToJSON = exports.schemeFromJSON = exports.Scheme = exports.protobufPackage = void 0;
exports.protobufPackage = "grpc.gateway.protoc_gen_openapiv2.options";

@@ -792,2 +792,4 @@ /**

enum: [],
fieldConfiguration: undefined,
extensions: {},
};

@@ -824,2 +826,11 @@ }

enum: Array.isArray(object?.enum) ? object.enum.map((e) => String(e)) : [],
fieldConfiguration: isSet(object.fieldConfiguration)
? exports.JSONSchema_FieldConfiguration.fromJSON(object.fieldConfiguration)
: undefined,
extensions: isObject(object.extensions)
? Object.entries(object.extensions).reduce((acc, [key, value]) => {
acc[key] = value;
return acc;
}, {})
: {},
};

@@ -873,5 +884,41 @@ },

}
message.fieldConfiguration !== undefined && (obj.fieldConfiguration = message.fieldConfiguration
? exports.JSONSchema_FieldConfiguration.toJSON(message.fieldConfiguration)
: undefined);
obj.extensions = {};
if (message.extensions) {
Object.entries(message.extensions).forEach(([k, v]) => {
obj.extensions[k] = v;
});
}
return obj;
},
};
function createBaseJSONSchema_FieldConfiguration() {
return { pathParamName: "" };
}
exports.JSONSchema_FieldConfiguration = {
fromJSON(object) {
return { pathParamName: isSet(object.pathParamName) ? String(object.pathParamName) : "" };
},
toJSON(message) {
const obj = {};
message.pathParamName !== undefined && (obj.pathParamName = message.pathParamName);
return obj;
},
};
function createBaseJSONSchema_ExtensionsEntry() {
return { key: "", value: undefined };
}
exports.JSONSchema_ExtensionsEntry = {
fromJSON(object) {
return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object?.value) ? object.value : undefined };
},
toJSON(message) {
const obj = {};
message.key !== undefined && (obj.key = message.key);
message.value !== undefined && (obj.value = message.value);
return obj;
},
};
function createBaseTag() {

@@ -878,0 +925,0 @@ return { description: "", externalDocs: undefined };

{
"name": "@cerbos/http",
"version": "0.8.0",
"version": "0.8.1",
"description": "Client library for interacting with the Cerbos policy decision point over HTTP from browser-based applications",

@@ -29,3 +29,3 @@ "repository": {

"dependencies": {
"@cerbos/core": "^0.8.0",
"@cerbos/core": "^0.8.1",
"abab": "^2.0.6",

@@ -32,0 +32,0 @@ "qs": "^6.11.0"

@@ -42,4 +42,12 @@ # @cerbos/http

await cerbos.isAllowed({
principal: { id: "user@example.com", roles: ["USER"] },
resource: { kind: "document", id: "1" },
principal: {
id: "user@example.com",
roles: ["USER"],
attributes: { tier: "PREMIUM" },
},
resource: {
kind: "document",
id: "1",
attributes: { owner: "user@example.com" },
},
action: "view",

@@ -46,0 +54,0 @@ }); // => true

@@ -360,3 +360,3 @@ /* eslint-disable */

* Whether the function is to be used in a method call-style `x.f(...)`
* of a function call-style `f(x, ...)`.
* or a function call-style `f(x, ...)`.
*

@@ -363,0 +363,0 @@ * For methods, the first parameter declaration, `params[0]` is the

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 too big to display

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