@poap-xyz/drops
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -19,2 +19,4 @@ export declare class Drop { | ||
created_date: string; | ||
poap_count: number; | ||
transfer_count: number; | ||
constructor(properties: DropProperties); | ||
@@ -40,2 +42,4 @@ } | ||
created_date: string; | ||
poap_count: number; | ||
transfer_count: number; | ||
} |
@@ -1,2 +0,2 @@ | ||
export declare const PAGINATED_DROPS_QUERY = "\n query PaginatedDrops(\n $limit: Int!\n $offset: Int!\n $orderBy: [drops_order_by!]\n $where: drops_bool_exp\n ) {\n drops(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {\n id\n fancy_id\n name\n description\n city\n country\n channel\n platform\n location_type\n drop_url\n image_url\n animation_url\n year\n start_date\n timezone\n private\n created_date\n }\n drops_aggregate(where: $where) {\n aggregate {\n count\n }\n }\n }\n"; | ||
export declare const PAGINATED_DROPS_QUERY = "\n query PaginatedDrops(\n $limit: Int!\n $offset: Int!\n $orderBy: [drops_order_by!]\n $where: drops_bool_exp\n ) {\n drops(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {\n id\n fancy_id\n name\n description\n city\n country\n channel\n platform\n location_type\n drop_url\n image_url\n animation_url\n year\n start_date\n timezone\n private\n created_date\n stats {\n transfer_count\n poap_count\n }\n }\n }\n"; | ||
export interface DropResponse { | ||
@@ -20,2 +20,6 @@ id: number; | ||
created_date: string; | ||
stats: { | ||
transfer_count: number; | ||
poap_count: number; | ||
}; | ||
} | ||
@@ -25,8 +29,3 @@ export interface PaginatedDropsResponse { | ||
drops: DropResponse[]; | ||
drops_aggregate: { | ||
aggregate: { | ||
count: number; | ||
}; | ||
}; | ||
}; | ||
} |
@@ -19,2 +19,4 @@ export declare class Drop { | ||
created_date: string; | ||
poap_count: number; | ||
transfer_count: number; | ||
constructor(properties: DropProperties); | ||
@@ -40,2 +42,4 @@ } | ||
created_date: string; | ||
poap_count: number; | ||
transfer_count: number; | ||
} |
@@ -1,2 +0,2 @@ | ||
export declare const PAGINATED_DROPS_QUERY = "\n query PaginatedDrops(\n $limit: Int!\n $offset: Int!\n $orderBy: [drops_order_by!]\n $where: drops_bool_exp\n ) {\n drops(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {\n id\n fancy_id\n name\n description\n city\n country\n channel\n platform\n location_type\n drop_url\n image_url\n animation_url\n year\n start_date\n timezone\n private\n created_date\n }\n drops_aggregate(where: $where) {\n aggregate {\n count\n }\n }\n }\n"; | ||
export declare const PAGINATED_DROPS_QUERY = "\n query PaginatedDrops(\n $limit: Int!\n $offset: Int!\n $orderBy: [drops_order_by!]\n $where: drops_bool_exp\n ) {\n drops(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {\n id\n fancy_id\n name\n description\n city\n country\n channel\n platform\n location_type\n drop_url\n image_url\n animation_url\n year\n start_date\n timezone\n private\n created_date\n stats {\n transfer_count\n poap_count\n }\n }\n }\n"; | ||
export interface DropResponse { | ||
@@ -20,2 +20,6 @@ id: number; | ||
created_date: string; | ||
stats: { | ||
transfer_count: number; | ||
poap_count: number; | ||
}; | ||
} | ||
@@ -25,8 +29,3 @@ export interface PaginatedDropsResponse { | ||
drops: DropResponse[]; | ||
drops_aggregate: { | ||
aggregate: { | ||
count: number; | ||
}; | ||
}; | ||
}; | ||
} |
@@ -19,2 +19,4 @@ export declare class Drop { | ||
created_date: string; | ||
poap_count: number; | ||
transfer_count: number; | ||
constructor(properties: DropProperties); | ||
@@ -40,2 +42,4 @@ } | ||
created_date: string; | ||
poap_count: number; | ||
transfer_count: number; | ||
} |
@@ -26,2 +26,4 @@ (function (global, factory) { | ||
this.created_date = properties.created_date; | ||
this.poap_count = properties.poap_count; | ||
this.transfer_count = properties.transfer_count; | ||
Object.assign(this, properties); | ||
@@ -56,6 +58,5 @@ } | ||
created_date | ||
} | ||
drops_aggregate(where: $where) { | ||
aggregate { | ||
count | ||
stats { | ||
transfer_count | ||
poap_count | ||
} | ||
@@ -117,2 +118,4 @@ } | ||
year: Number(drop.year), | ||
poap_count: drop.stats ? Number(drop.stats.poap_count) : 0, | ||
transfer_count: drop.stats ? Number(drop.stats.transfer_count) : 0, | ||
})); | ||
@@ -148,2 +151,4 @@ return new utils.PaginatedResult(drops, utils.nextCursor(drops.length, limit, offset)); | ||
created_date: drop.created_date, | ||
transfer_count: 0, | ||
poap_count: 0, | ||
}); | ||
@@ -150,0 +155,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const PAGINATED_DROPS_QUERY = "\n query PaginatedDrops(\n $limit: Int!\n $offset: Int!\n $orderBy: [drops_order_by!]\n $where: drops_bool_exp\n ) {\n drops(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {\n id\n fancy_id\n name\n description\n city\n country\n channel\n platform\n location_type\n drop_url\n image_url\n animation_url\n year\n start_date\n timezone\n private\n created_date\n }\n drops_aggregate(where: $where) {\n aggregate {\n count\n }\n }\n }\n"; | ||
export declare const PAGINATED_DROPS_QUERY = "\n query PaginatedDrops(\n $limit: Int!\n $offset: Int!\n $orderBy: [drops_order_by!]\n $where: drops_bool_exp\n ) {\n drops(limit: $limit, offset: $offset, order_by: $orderBy, where: $where) {\n id\n fancy_id\n name\n description\n city\n country\n channel\n platform\n location_type\n drop_url\n image_url\n animation_url\n year\n start_date\n timezone\n private\n created_date\n stats {\n transfer_count\n poap_count\n }\n }\n }\n"; | ||
export interface DropResponse { | ||
@@ -20,2 +20,6 @@ id: number; | ||
created_date: string; | ||
stats: { | ||
transfer_count: number; | ||
poap_count: number; | ||
}; | ||
} | ||
@@ -25,8 +29,3 @@ export interface PaginatedDropsResponse { | ||
drops: DropResponse[]; | ||
drops_aggregate: { | ||
aggregate: { | ||
count: number; | ||
}; | ||
}; | ||
}; | ||
} |
{ | ||
"name": "@poap-xyz/drops", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Drops module for the poap.js library", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.cjs", |
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
65569
824