@poap-xyz/drops
Advanced tools
Comparing version 0.5.6 to 0.5.7
@@ -30,2 +30,3 @@ import { DropResponse as ProviderDropResponse } from '@poap-xyz/providers'; | ||
static fromProvider(response: ProviderDropResponse): Drop; | ||
static fromSerializableObject(serializableDrop: SerializableDrop): Drop; | ||
constructor(properties: DropProperties); | ||
@@ -35,3 +36,3 @@ getTotalMinted(): number; | ||
} | ||
interface SerializableDrop { | ||
export interface SerializableDrop { | ||
id: number; | ||
@@ -38,0 +39,0 @@ fancyId: string; |
export { DropsClient } from './DropsClient'; | ||
export { Drop } from './domain/Drop'; | ||
export { Drop, SerializableDrop } from './domain/Drop'; | ||
export { DropsSortFields } from './types/DropsSortFields'; |
@@ -30,2 +30,3 @@ import { DropResponse as ProviderDropResponse } from '@poap-xyz/providers'; | ||
static fromProvider(response: ProviderDropResponse): Drop; | ||
static fromSerializableObject(serializableDrop: SerializableDrop): Drop; | ||
constructor(properties: DropProperties); | ||
@@ -35,3 +36,3 @@ getTotalMinted(): number; | ||
} | ||
interface SerializableDrop { | ||
export interface SerializableDrop { | ||
id: number; | ||
@@ -38,0 +39,0 @@ fancyId: string; |
export { DropsClient } from './DropsClient'; | ||
export { Drop } from './domain/Drop'; | ||
export { Drop, SerializableDrop } from './domain/Drop'; | ||
export { DropsSortFields } from './types/DropsSortFields'; |
@@ -30,2 +30,3 @@ import { DropResponse as ProviderDropResponse } from '@poap-xyz/providers'; | ||
static fromProvider(response: ProviderDropResponse): Drop; | ||
static fromSerializableObject(serializableDrop: SerializableDrop): Drop; | ||
constructor(properties: DropProperties); | ||
@@ -35,3 +36,3 @@ getTotalMinted(): number; | ||
} | ||
interface SerializableDrop { | ||
export interface SerializableDrop { | ||
id: number; | ||
@@ -38,0 +39,0 @@ fancyId: string; |
export { DropsClient } from './DropsClient'; | ||
export { Drop } from './domain/Drop'; | ||
export { Drop, SerializableDrop } from './domain/Drop'; | ||
export { DropsSortFields } from './types/DropsSortFields'; |
@@ -167,2 +167,29 @@ (function (global, factory) { | ||
} | ||
static fromSerializableObject(serializableDrop) { | ||
return new Drop({ | ||
id: serializableDrop.id, | ||
fancyId: serializableDrop.fancyId, | ||
name: serializableDrop.name, | ||
description: serializableDrop.description, | ||
city: serializableDrop.city, | ||
country: serializableDrop.country, | ||
channel: serializableDrop.channel, | ||
platform: serializableDrop.platform, | ||
locationType: serializableDrop.locationType, | ||
dropUrl: serializableDrop.dropUrl, | ||
imageUrl: serializableDrop.imageUrl, | ||
originalImageUrl: serializableDrop.originalImageUrl, | ||
animationUrl: serializableDrop.animationUrl, | ||
year: serializableDrop.year, | ||
timezone: serializableDrop.timezone, | ||
private: serializableDrop.private, | ||
startDate: new Date(serializableDrop.startDate), | ||
createdDate: new Date(serializableDrop.createdDate), | ||
expiryDate: new Date(serializableDrop.expiryDate), | ||
endDate: new Date(serializableDrop.endDate), | ||
poapCount: serializableDrop.poapCount, | ||
transferCount: serializableDrop.transferCount, | ||
emailReservationCount: serializableDrop.emailReservationCount, | ||
}); | ||
} | ||
constructor(properties) { | ||
@@ -169,0 +196,0 @@ this.id = properties.id; |
{ | ||
"name": "@poap-xyz/drops", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195761
1959