New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@supabase/postgrest-js

Package Overview
Dependencies
Maintainers
3
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/postgrest-js - npm Package Compare versions

Comparing version 0.20.0 to 0.21.0

dist/main/lib/PostgrestFilterBuilder.d.ts

45

dist/main/index.d.ts

@@ -1,41 +0,6 @@

import { PostgrestBuilder, PostgrestQueryBuilder } from './builder';
export declare class PostgrestClient {
url: string;
headers: {
[key: string]: string;
};
schema?: string;
/**
* Creates a PostgREST client.
*
* @param url URL of the PostgREST endpoint.
* @param headers Custom headers.
* @param schema Postgres schema to switch to.
*/
constructor(url: string, { headers, schema }?: {
headers?: {
[key: string]: string;
};
schema?: string;
});
/**
* Authenticates the request with JWT.
*
* @param token The JWT token to use.
*/
auth(token: string): this;
/**
* Perform a table operation.
*
* @param table The table name to operate on.
*/
from<T = any>(table: string): PostgrestQueryBuilder<T>;
/**
* Perform a stored procedure call.
*
* @param fn The function name to call.
* @param params The parameters to pass to the function call.
*/
rpc<T = any>(fn: string, params?: object): PostgrestBuilder<T>;
}
import PostgrestClient from './PostgrestClient';
import PostgrestFilterBuilder from './lib/PostgrestFilterBuilder';
import PostgrestQueryBuilder from './lib/PostgrestQueryBuilder';
import { PostgrestBuilder } from './lib/types';
export { PostgrestClient, PostgrestFilterBuilder, PostgrestQueryBuilder, PostgrestBuilder };
//# sourceMappingURL=index.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostgrestClient = void 0;
const builder_1 = require("./builder");
class PostgrestClient {
/**
* Creates a PostgREST client.
*
* @param url URL of the PostgREST endpoint.
* @param headers Custom headers.
* @param schema Postgres schema to switch to.
*/
constructor(url, { headers = {}, schema } = {}) {
this.url = url;
this.headers = headers;
this.schema = schema;
}
/**
* Authenticates the request with JWT.
*
* @param token The JWT token to use.
*/
auth(token) {
this.headers['Authorization'] = `Bearer ${token}`;
return this;
}
/**
* Perform a table operation.
*
* @param table The table name to operate on.
*/
from(table) {
const url = `${this.url}/${table}`;
return new builder_1.PostgrestQueryBuilder(url, { headers: this.headers, schema: this.schema });
}
/**
* Perform a stored procedure call.
*
* @param fn The function name to call.
* @param params The parameters to pass to the function call.
*/
rpc(fn, params) {
const url = `${this.url}/rpc/${fn}`;
return new builder_1.PostgrestQueryBuilder(url, { headers: this.headers, schema: this.schema }).rpc(params);
}
}
exports.PostgrestClient = PostgrestClient;
exports.PostgrestBuilder = exports.PostgrestQueryBuilder = exports.PostgrestFilterBuilder = exports.PostgrestClient = void 0;
const PostgrestClient_1 = __importDefault(require("./PostgrestClient"));
exports.PostgrestClient = PostgrestClient_1.default;
const PostgrestFilterBuilder_1 = __importDefault(require("./lib/PostgrestFilterBuilder"));
exports.PostgrestFilterBuilder = PostgrestFilterBuilder_1.default;
const PostgrestQueryBuilder_1 = __importDefault(require("./lib/PostgrestQueryBuilder"));
exports.PostgrestQueryBuilder = PostgrestQueryBuilder_1.default;
const types_1 = require("./lib/types");
Object.defineProperty(exports, "PostgrestBuilder", { enumerable: true, get: function () { return types_1.PostgrestBuilder; } });
//# sourceMappingURL=index.js.map

@@ -1,41 +0,6 @@

import { PostgrestBuilder, PostgrestQueryBuilder } from './builder';
export declare class PostgrestClient {
url: string;
headers: {
[key: string]: string;
};
schema?: string;
/**
* Creates a PostgREST client.
*
* @param url URL of the PostgREST endpoint.
* @param headers Custom headers.
* @param schema Postgres schema to switch to.
*/
constructor(url: string, { headers, schema }?: {
headers?: {
[key: string]: string;
};
schema?: string;
});
/**
* Authenticates the request with JWT.
*
* @param token The JWT token to use.
*/
auth(token: string): this;
/**
* Perform a table operation.
*
* @param table The table name to operate on.
*/
from<T = any>(table: string): PostgrestQueryBuilder<T>;
/**
* Perform a stored procedure call.
*
* @param fn The function name to call.
* @param params The parameters to pass to the function call.
*/
rpc<T = any>(fn: string, params?: object): PostgrestBuilder<T>;
}
import PostgrestClient from './PostgrestClient';
import PostgrestFilterBuilder from './lib/PostgrestFilterBuilder';
import PostgrestQueryBuilder from './lib/PostgrestQueryBuilder';
import { PostgrestBuilder } from './lib/types';
export { PostgrestClient, PostgrestFilterBuilder, PostgrestQueryBuilder, PostgrestBuilder };
//# sourceMappingURL=index.d.ts.map

@@ -1,44 +0,6 @@

import { PostgrestQueryBuilder } from './builder';
export class PostgrestClient {
/**
* Creates a PostgREST client.
*
* @param url URL of the PostgREST endpoint.
* @param headers Custom headers.
* @param schema Postgres schema to switch to.
*/
constructor(url, { headers = {}, schema } = {}) {
this.url = url;
this.headers = headers;
this.schema = schema;
}
/**
* Authenticates the request with JWT.
*
* @param token The JWT token to use.
*/
auth(token) {
this.headers['Authorization'] = `Bearer ${token}`;
return this;
}
/**
* Perform a table operation.
*
* @param table The table name to operate on.
*/
from(table) {
const url = `${this.url}/${table}`;
return new PostgrestQueryBuilder(url, { headers: this.headers, schema: this.schema });
}
/**
* Perform a stored procedure call.
*
* @param fn The function name to call.
* @param params The parameters to pass to the function call.
*/
rpc(fn, params) {
const url = `${this.url}/rpc/${fn}`;
return new PostgrestQueryBuilder(url, { headers: this.headers, schema: this.schema }).rpc(params);
}
}
import PostgrestClient from './PostgrestClient';
import PostgrestFilterBuilder from './lib/PostgrestFilterBuilder';
import PostgrestQueryBuilder from './lib/PostgrestQueryBuilder';
import { PostgrestBuilder } from './lib/types';
export { PostgrestClient, PostgrestFilterBuilder, PostgrestQueryBuilder, PostgrestBuilder };
//# sourceMappingURL=index.js.map
{
"name": "@supabase/postgrest-js",
"version": "0.20.0",
"version": "0.21.0",
"description": "Isomorphic PostgREST client",

@@ -25,3 +25,4 @@ "keywords": [

"build:module": "tsc -p tsconfig.module.json",
"test": "run-s test:db && jest -i",
"test": "run-s test:db && jest --runInBand",
"test:clean": "cd test/db && docker-compose down",
"test:db": "cd test/db && docker-compose down && docker-compose up -d && sleep 5",

@@ -28,0 +29,0 @@ "docs": "typedoc --mode file --target ES6 --theme minimal",

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

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