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

@poap-xyz/drops

Package Overview
Dependencies
Maintainers
4
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poap-xyz/drops - npm Package Compare versions

Comparing version 0.0.31 to 0.0.33

rollup.config.js

6

dist/cjs/types/input.d.ts
/// <reference types="node" />
import { Order } from '@poap-xyz/utils';
import { Order, PaginationInput } from '@poap-xyz/utils';
export declare enum DropsSortFields {

@@ -8,5 +8,3 @@ Name = "name",

}
export interface FetchDropsInput {
limit: number;
offset: number;
export interface FetchDropsInput extends PaginationInput {
name?: string;

@@ -13,0 +11,0 @@ sort_field?: DropsSortFields;

/// <reference types="node" />
import { Order } from '@poap-xyz/utils';
import { Order, PaginationInput } from '@poap-xyz/utils';
export declare enum DropsSortFields {

@@ -8,5 +8,3 @@ Name = "name",

}
export interface FetchDropsInput {
limit: number;
offset: number;
export interface FetchDropsInput extends PaginationInput {
name?: string;

@@ -13,0 +11,0 @@ sort_field?: DropsSortFields;

@@ -105,25 +105,2 @@ (function (global, factory) {

function creatUndefinedOrder(key, value) {
return key && value ? { [key]: value } : {};
}
function createFilter(key, value) {
return value ? { [key]: { _ilike: `%${value}%` } } : {};
}
function creatPrivateFilter(key, value) {
return typeof value === 'boolean'
? { [key]: { _eq: value ? 'true' : 'false' } }
: {};
}
function createInFilter(key, values) {
return values && values.length ? { [key]: { _in: values } } : {};
}
function createBetweenFilter(key, from, to) {
const dateFilter = {};
if (from)
dateFilter._gte = from;
if (to)
dateFilter._lte = to;
return from || to ? { [key]: dateFilter } : {};
}
class DropsClient {

@@ -139,8 +116,8 @@ constructor(CompassProvider, DropApiProvider) {

offset,
orderBy: creatUndefinedOrder(sort_field, sort_dir),
orderBy: utils.creatUndefinedOrder(sort_field, sort_dir),
where: {
...creatPrivateFilter('private', is_private),
...createFilter('name', name),
...createBetweenFilter('created_date', from, to),
...createInFilter('id', ids),
...utils.creatPrivateFilter('private', is_private),
...utils.createFilter('name', name),
...utils.createBetweenFilter('created_date', from, to),
...utils.createInFilter('id', ids),
},

@@ -147,0 +124,0 @@ };

/// <reference types="node" />
import { Order } from '@poap-xyz/utils';
import { Order, PaginationInput } from '@poap-xyz/utils';
export declare enum DropsSortFields {

@@ -8,5 +8,3 @@ Name = "name",

}
export interface FetchDropsInput {
limit: number;
offset: number;
export interface FetchDropsInput extends PaginationInput {
name?: string;

@@ -13,0 +11,0 @@ sort_field?: DropsSortFields;

{
"name": "@poap-xyz/drops",
"version": "0.0.31",
"version": "0.0.33",
"description": "Drops module for the poap.js library",

@@ -33,4 +33,4 @@ "main": "dist/cjs/index.cjs",

"@poap-xyz/providers": "0.0.31",
"@poap-xyz/utils": "0.0.31"
"@poap-xyz/utils": "0.0.34"
}
}

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

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