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

@internetarchive/search-service

Package Overview
Dependencies
Maintainers
13
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@internetarchive/search-service - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

dist/src/models/metadata-fields/lazy-field.d.ts

2

dist/index.d.ts

@@ -14,3 +14,3 @@ export { Metadata } from './src/models/metadata';

export { MediaTypeField } from './src/models/metadata-fields/field-types/mediatype';
export { MetadataField } from './src/models/metadata-fields/metadata-field';
export { MetadataFieldInterface, MetadataField, } from './src/models/metadata-fields/metadata-field';
export { MetadataResponse } from './src/responses/metadata/metadata-response';

@@ -17,0 +17,0 @@ export { SearchResponse } from './src/responses/search/search-response';

@@ -12,3 +12,3 @@ export { Metadata } from './src/models/metadata';

export { MediaTypeField } from './src/models/metadata-fields/field-types/mediatype';
export { MetadataField } from './src/models/metadata-fields/metadata-field';
export { MetadataField, } from './src/models/metadata-fields/metadata-field';
export { MetadataResponse } from './src/responses/metadata/metadata-response';

@@ -15,0 +15,0 @@ export { SearchResponse } from './src/responses/search/search-response';

import { FieldParserInterface } from '@internetarchive/field-parsers';
/**
* The MetadataRawValue is all of the possible raw types we can get for a field.
*
* This allows the parsers to know if they can handle the raw value or not and
* how to handle it if they can.
*/
export declare type MetadataRawValue = string | string[] | number | boolean;
export interface MetadataFieldInterface<T> {
/**
* The raw value received from the API response
*
* @type {MetadataRawValue}
* @memberof MetadataField
*/
rawValue?: MetadataRawValue;
/**
* The first value if there are multiple or the only value if there is one
*
* @readonly
* @type {(T | undefined)}
* @memberof MetadataField
*/
value?: T;
/**
* The array of all values for the field.
*
* Many fields only contain a single value and
* can be accessed via the `.value` getter
*
* @type {T[]}
* @memberof MetadataField
*/
values: T[];
}
/**

@@ -27,32 +60,12 @@ * The MetadataField is responsible for three things:

*/
export declare class MetadataField<Type, FieldParserInterfaceType extends FieldParserInterface<Type>> {
/**
* The raw value received from the API response
*
* @type {MetadataRawValue}
* @memberof MetadataField
*/
export declare class MetadataField<Type, FieldParserInterfaceType extends FieldParserInterface<Type>> implements MetadataFieldInterface<Type> {
/** @inheritdoc */
rawValue?: MetadataRawValue;
/**
* The array of all values for the field.
*
* Many fields only contain a single value and
* can be accessed via the `.value` getter
*
* @type {Type[]}
* @memberof MetadataField
*/
values: Type[];
/**
* The first value if there are multiple or the only value if there is one
*
* @readonly
* @type {(Type | undefined)}
* @memberof MetadataField
*/
/** @inheritdoc */
get values(): Type[];
/** @inheritdoc */
get value(): Type | undefined;
constructor(parser: FieldParserInterfaceType, rawValue?: MetadataRawValue);
private parser;
private processRawValue;
private parseAndPersistValue;
private parseRawValue;
}

@@ -0,1 +1,3 @@

import { __decorate } from "tslib";
import { Memoize } from 'typescript-memoize';
/**

@@ -27,46 +29,35 @@ * The MetadataField is responsible for three things:

constructor(parser, rawValue) {
/**
* The array of all values for the field.
*
* Many fields only contain a single value and
* can be accessed via the `.value` getter
*
* @type {Type[]}
* @memberof MetadataField
*/
this.values = [];
this.parser = parser;
this.rawValue = rawValue;
this.processRawValue();
}
/**
* The first value if there are multiple or the only value if there is one
*
* @readonly
* @type {(Type | undefined)}
* @memberof MetadataField
*/
/** @inheritdoc */
get values() {
const values = this.parseRawValue();
return values;
}
/** @inheritdoc */
get value() {
return this.values.length > 0 ? this.values[0] : undefined;
return this.values[0];
}
processRawValue() {
if (this.rawValue === undefined) {
return;
}
if (Array.isArray(this.rawValue)) {
this.rawValue.forEach(value => {
this.parseAndPersistValue(value);
});
}
else {
this.parseAndPersistValue(this.rawValue);
}
parseRawValue() {
if (this.rawValue === undefined)
return [];
const rawValues = Array.isArray(this.rawValue)
? this.rawValue
: [this.rawValue];
const values = [];
rawValues.forEach(value => {
const parsed = this.parser.parseValue(value);
if (parsed !== undefined)
values.push(parsed);
});
return values;
}
parseAndPersistValue(value) {
const parsedValue = this.parser.parseValue(value);
if (parsedValue !== undefined) {
this.values.push(parsedValue);
}
}
}
__decorate([
Memoize()
], MetadataField.prototype, "values", null);
__decorate([
Memoize()
], MetadataField.prototype, "value", null);
//# sourceMappingURL=metadata-field.js.map

@@ -36,6 +36,6 @@ import { BooleanField } from './metadata-fields/field-types/boolean';

*/
identifier?: string;
addeddate?: DateField;
audio_codec?: StringField;
audio_sample_rate?: NumberField;
get identifier(): string | undefined;
get addeddate(): DateField | undefined;
get audio_codec(): StringField | undefined;
get audio_sample_rate(): NumberField | undefined;
/**

@@ -49,3 +49,3 @@ * All of the collections that an Item is in, including

*/
collection?: StringField;
get collection(): StringField | undefined;
/**

@@ -62,3 +62,3 @@ * The "natural" collections for an item before augmentation

*/
collections_raw?: StringField;
get collections_raw(): StringField | undefined;
/**

@@ -70,8 +70,8 @@ * The size of a collection in bytes

*/
collection_size?: ByteField;
contributor?: StringField;
coverage?: StringField;
creator?: StringField;
date?: DateField;
description?: StringField;
get collection_size(): ByteField | undefined;
get contributor(): StringField | undefined;
get coverage(): StringField | undefined;
get creator(): StringField | undefined;
get date(): DateField | undefined;
get description(): StringField | undefined;
/**

@@ -83,3 +83,3 @@ * All time download count

*/
downloads?: NumberField;
get downloads(): NumberField | undefined;
/**

@@ -91,4 +91,4 @@ * The item duration in seconds

*/
duration?: DurationField;
'external-identifier'?: StringField;
get duration(): DurationField | undefined;
get 'external-identifier'(): StringField | undefined;
/**

@@ -100,5 +100,5 @@ * The number of files in an item

*/
files_count?: NumberField;
indexdate?: DateField;
isbn?: StringField;
get files_count(): NumberField | undefined;
get indexdate(): DateField | undefined;
get isbn(): StringField | undefined;
/**

@@ -110,3 +110,3 @@ * For collections, the number of items in the collection

*/
item_count?: NumberField;
get item_count(): NumberField | undefined;
/**

@@ -118,6 +118,6 @@ * The size of the item in bytes

*/
item_size?: ByteField;
language?: StringField;
length?: DurationField;
lineage?: StringField;
get item_size(): ByteField | undefined;
get language(): StringField | undefined;
get length(): DurationField | undefined;
get lineage(): StringField | undefined;
/**

@@ -129,6 +129,6 @@ * The number of downloads in the last month

*/
month?: NumberField;
mediatype?: MediaTypeField;
noindex?: BooleanField;
notes?: StringField;
get month(): NumberField | undefined;
get mediatype(): MediaTypeField | undefined;
get noindex(): BooleanField | undefined;
get notes(): StringField | undefined;
/**

@@ -140,26 +140,26 @@ * The number of users that have favorited the item

*/
num_favorites?: NumberField;
num_reviews?: NumberField;
openlibrary_edition?: StringField;
openlibrary_work?: StringField;
page_progression?: PageProgressionField;
partner?: StringField;
ppi?: NumberField;
publicdate?: DateField;
publisher?: StringField;
runtime?: DurationField;
scanner?: StringField;
source?: StringField;
start_localtime?: DateField;
start_time?: DateField;
stop_time?: DateField;
subject?: StringField;
taper?: StringField;
title?: StringField;
transferer?: StringField;
track?: NumberField;
type?: StringField;
uploader?: StringField;
utc_offset?: NumberField;
venue?: StringField;
get num_favorites(): NumberField | undefined;
get num_reviews(): NumberField | undefined;
get openlibrary_edition(): StringField | undefined;
get openlibrary_work(): StringField | undefined;
get page_progression(): PageProgressionField | undefined;
get partner(): StringField | undefined;
get ppi(): NumberField | undefined;
get publicdate(): DateField | undefined;
get publisher(): StringField | undefined;
get runtime(): DurationField | undefined;
get scanner(): StringField | undefined;
get source(): StringField | undefined;
get start_localtime(): DateField | undefined;
get start_time(): DateField | undefined;
get stop_time(): DateField | undefined;
get subject(): StringField | undefined;
get taper(): StringField | undefined;
get title(): StringField | undefined;
get transferer(): StringField | undefined;
get track(): NumberField | undefined;
get type(): StringField | undefined;
get uploader(): StringField | undefined;
get utc_offset(): NumberField | undefined;
get venue(): StringField | undefined;
/**

@@ -171,5 +171,5 @@ * The number of downloads in the last week

*/
week?: NumberField;
year?: DateField;
get week(): NumberField | undefined;
get year(): DateField | undefined;
constructor(json: Record<string, any>);
}

@@ -0,2 +1,4 @@

import { __decorate } from "tslib";
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Memoize } from 'typescript-memoize';
import { BooleanField } from './metadata-fields/field-types/boolean';

@@ -7,2 +9,3 @@ import { DateField } from './metadata-fields/field-types/date';

import { StringField } from './metadata-fields/field-types/string';
import { PageProgressionField } from './metadata-fields/field-types/page-progression';
import { ByteField } from './metadata-fields/field-types/byte';

@@ -23,102 +26,558 @@ import { MediaTypeField } from './metadata-fields/field-types/mediatype';

this.rawMetadata = json;
this.identifier = json.identifier;
this.addeddate = json.addeddate ? new DateField(json.addeddate) : undefined;
this.publicdate = json.publicdate
? new DateField(json.publicdate)
}
/**
* The item identifier.
*
* _Note_ This is a plain string instead of a `MetadataField` since it's
* the primary key of the item.
*
* @type {string}
* @memberof Metadata
*/
get identifier() {
var _a;
return (_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.identifier;
}
get addeddate() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.addeddate)
? new DateField(this.rawMetadata.addeddate)
: undefined;
this.indexdate = json.indexdate ? new DateField(json.indexdate) : undefined;
this.audio_codec = json.audio_codec
? new StringField(json.audio_codec)
}
get audio_codec() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.audio_codec)
? new StringField(this.rawMetadata.audio_codec)
: undefined;
this.audio_sample_rate = json.audio_sample_rate
? new NumberField(json.audio_sample_rate)
}
get audio_sample_rate() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.audio_sample_rate)
? new NumberField(this.rawMetadata.audio_sample_rate)
: undefined;
this.collection = json.collection
? new StringField(json.collection)
}
/**
* All of the collections that an Item is in, including
* all of the side-loaded collections from the ListAPI
* and SimpleListsAPI like `fav-*`
*
* @type {StringField}
* @memberof Metadata
*/
get collection() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.collection)
? new StringField(this.rawMetadata.collection)
: undefined;
this.collections_raw = json.collections_raw
? new StringField(json.collections_raw)
}
/**
* The "natural" collections for an item before augmentation
* by side-loaded collections like ListsAPI and SimpleLists
*
* The `collection` field above includes things like all of
* the `fav-*` collections, whereas this is only the collections
* that have been directly added in the hierarchy.
*
* @type {StringField}
* @memberof Metadata
*/
get collections_raw() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.collections_raw)
? new StringField(this.rawMetadata.collections_raw)
: undefined;
this.collection_size = json.collection_size
? new ByteField(json.collection_size)
}
/**
* The size of a collection in bytes
*
* @type {ByteField}
* @memberof Metadata
*/
get collection_size() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.collection_size)
? new ByteField(this.rawMetadata.collection_size)
: undefined;
this.contributor = json.contributor
? new StringField(json.contributor)
}
get contributor() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.contributor)
? new StringField(this.rawMetadata.contributor)
: undefined;
this.coverage = json.coverage ? new StringField(json.coverage) : undefined;
this.creator = json.creator ? new StringField(json.creator) : undefined;
this.date = json.date ? new DateField(json.date) : undefined;
this.description = json.description
? new StringField(json.description)
}
get coverage() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.coverage)
? new StringField(this.rawMetadata.coverage)
: undefined;
this.downloads = json.downloads
? new NumberField(json.downloads)
}
get creator() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.creator)
? new StringField(this.rawMetadata.creator)
: undefined;
this.duration = json.duration
? new DurationField(json.duration)
}
get date() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.date)
? new DateField(this.rawMetadata.date)
: undefined;
this['external-identifier'] = json['external-identifier']
? new StringField(json['external-identifier'])
}
get description() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.description)
? new StringField(this.rawMetadata.description)
: undefined;
this.files_count = json.files_count
? new NumberField(json.files_count)
}
/**
* All time download count
*
* @type {NumberField}
* @memberof Metadata
*/
get downloads() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.downloads)
? new NumberField(this.rawMetadata.downloads)
: undefined;
this.isbn = json.isbn ? new StringField(json.isbn) : undefined;
this.item_count = json.item_count
? new NumberField(json.item_count)
}
/**
* The item duration in seconds
*
* @type {DurationField}
* @memberof Metadata
*/
get duration() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.duration)
? new DurationField(this.rawMetadata.duration)
: undefined;
this.item_size = json.item_size ? new ByteField(json.item_size) : undefined;
this.language = json.language ? new StringField(json.language) : undefined;
this.length = json.length ? new DurationField(json.length) : undefined;
this.lineage = json.lineage ? new StringField(json.lineage) : undefined;
this.mediatype = json.mediatype
? new MediaTypeField(json.mediatype)
}
get 'external-identifier'() {
var _a, _b;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a['external-identifier'])
? new StringField((_b = this.rawMetadata) === null || _b === void 0 ? void 0 : _b['external-identifier'])
: undefined;
this.month = json.month ? new NumberField(json.month) : undefined;
this.noindex = json.noindex ? new BooleanField(json.noindex) : undefined;
this.notes = json.notes ? new StringField(json.notes) : undefined;
this.num_favorites = json.num_favorites
? new NumberField(json.num_favorites)
}
/**
* The number of files in an item
*
* @type {NumberField}
* @memberof Metadata
*/
get files_count() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.files_count)
? new NumberField(this.rawMetadata.files_count)
: undefined;
this.num_reviews = json.num_reviews
? new NumberField(json.num_reviews)
}
get indexdate() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.indexdate)
? new DateField(this.rawMetadata.indexdate)
: undefined;
this.openlibrary_edition = json.openlibrary_edition
? new StringField(json.openlibrary_edition)
}
get isbn() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.isbn)
? new StringField(this.rawMetadata.isbn)
: undefined;
this.openlibrary_work = json.openlibrary_work
? new StringField(json.openlibrary_work)
}
/**
* For collections, the number of items in the collection
*
* @type {NumberField}
* @memberof Metadata
*/
get item_count() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.item_count)
? new NumberField(this.rawMetadata.item_count)
: undefined;
this.partner = json.partner ? new StringField(json.partner) : undefined;
this.ppi = json.ppi ? new NumberField(json.ppi) : undefined;
this.publisher = json.publisher
? new StringField(json.publisher)
}
/**
* The size of the item in bytes
*
* @type {NumberField}
* @memberof Metadata
*/
get item_size() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.item_size)
? new ByteField(this.rawMetadata.item_size)
: undefined;
this.runtime = json.runtime ? new DurationField(json.runtime) : undefined;
this.scanner = json.scanner ? new StringField(json.scanner) : undefined;
this.source = json.source ? new StringField(json.source) : undefined;
this.start_localtime = json.start_localtime
? new DateField(json.start_localtime)
}
get language() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.language)
? new StringField(this.rawMetadata.language)
: undefined;
this.start_time = json.start_time
? new DateField(json.start_time)
}
get length() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.length)
? new DurationField(this.rawMetadata.length)
: undefined;
this.stop_time = json.stop_time ? new DateField(json.stop_time) : undefined;
this.subject = json.subject ? new StringField(json.subject) : undefined;
this.taper = json.taper ? new StringField(json.taper) : undefined;
this.title = json.title ? new StringField(json.title) : undefined;
this.track = json.track ? new NumberField(json.track) : undefined;
this.transferer = json.transferer
? new StringField(json.transferer)
}
get lineage() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.lineage)
? new StringField(this.rawMetadata.lineage)
: undefined;
this.type = json.type ? new StringField(json.type) : undefined;
this.uploader = json.uploader ? new StringField(json.uploader) : undefined;
this.utc_offset = json.utc_offset
? new NumberField(json.utc_offset)
}
/**
* The number of downloads in the last month
*
* @type {NumberField}
* @memberof Metadata
*/
get month() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.month)
? new NumberField(this.rawMetadata.month)
: undefined;
this.venue = json.venue ? new StringField(json.venue) : undefined;
this.week = json.week ? new NumberField(json.week) : undefined;
this.year = json.year ? new DateField(json.year) : undefined;
}
get mediatype() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.mediatype)
? new MediaTypeField(this.rawMetadata.mediatype)
: undefined;
}
get noindex() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.noindex)
? new BooleanField(this.rawMetadata.noindex)
: undefined;
}
get notes() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.notes)
? new StringField(this.rawMetadata.notes)
: undefined;
}
/**
* The number of users that have favorited the item
*
* @type {NumberField}
* @memberof Metadata
*/
get num_favorites() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.num_favorites)
? new NumberField(this.rawMetadata.num_favorites)
: undefined;
}
get num_reviews() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.num_reviews)
? new NumberField(this.rawMetadata.num_reviews)
: undefined;
}
get openlibrary_edition() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.openlibrary_edition)
? new StringField(this.rawMetadata.openlibrary_edition)
: undefined;
}
get openlibrary_work() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.openlibrary_work)
? new StringField(this.rawMetadata.openlibrary_work)
: undefined;
}
get page_progression() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.page_progression)
? new PageProgressionField(this.rawMetadata.page_progression)
: undefined;
}
get partner() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.partner)
? new StringField(this.rawMetadata.partner)
: undefined;
}
get ppi() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.ppi)
? new NumberField(this.rawMetadata.ppi)
: undefined;
}
get publicdate() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.publicdate)
? new DateField(this.rawMetadata.publicdate)
: undefined;
}
get publisher() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.publisher)
? new StringField(this.rawMetadata.publisher)
: undefined;
}
get runtime() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.runtime)
? new DurationField(this.rawMetadata.runtime)
: undefined;
}
get scanner() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.scanner)
? new StringField(this.rawMetadata.scanner)
: undefined;
}
get source() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.source)
? new StringField(this.rawMetadata.source)
: undefined;
}
get start_localtime() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.start_localtime)
? new DateField(this.rawMetadata.start_localtime)
: undefined;
}
get start_time() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.start_time)
? new DateField(this.rawMetadata.start_time)
: undefined;
}
get stop_time() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.stop_time)
? new DateField(this.rawMetadata.stop_time)
: undefined;
}
get subject() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.subject)
? new StringField(this.rawMetadata.subject)
: undefined;
}
get taper() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.taper)
? new StringField(this.rawMetadata.taper)
: undefined;
}
get title() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.title)
? new StringField(this.rawMetadata.title)
: undefined;
}
get transferer() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.transferer)
? new StringField(this.rawMetadata.transferer)
: undefined;
}
get track() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.track)
? new NumberField(this.rawMetadata.track)
: undefined;
}
get type() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.type)
? new StringField(this.rawMetadata.type)
: undefined;
}
get uploader() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.uploader)
? new StringField(this.rawMetadata.uploader)
: undefined;
}
get utc_offset() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.utc_offset)
? new NumberField(this.rawMetadata.utc_offset)
: undefined;
}
get venue() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.venue)
? new StringField(this.rawMetadata.venue)
: undefined;
}
/**
* The number of downloads in the last week
*
* @type {NumberField}
* @memberof Metadata
*/
get week() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.week)
? new NumberField(this.rawMetadata.week)
: undefined;
}
get year() {
var _a;
return ((_a = this.rawMetadata) === null || _a === void 0 ? void 0 : _a.year)
? new DateField(this.rawMetadata.year)
: undefined;
}
}
__decorate([
Memoize()
], Metadata.prototype, "addeddate", null);
__decorate([
Memoize()
], Metadata.prototype, "audio_codec", null);
__decorate([
Memoize()
], Metadata.prototype, "audio_sample_rate", null);
__decorate([
Memoize()
], Metadata.prototype, "collection", null);
__decorate([
Memoize()
], Metadata.prototype, "collections_raw", null);
__decorate([
Memoize()
], Metadata.prototype, "collection_size", null);
__decorate([
Memoize()
], Metadata.prototype, "contributor", null);
__decorate([
Memoize()
], Metadata.prototype, "coverage", null);
__decorate([
Memoize()
], Metadata.prototype, "creator", null);
__decorate([
Memoize()
], Metadata.prototype, "date", null);
__decorate([
Memoize()
], Metadata.prototype, "description", null);
__decorate([
Memoize()
], Metadata.prototype, "downloads", null);
__decorate([
Memoize()
], Metadata.prototype, "duration", null);
__decorate([
Memoize()
], Metadata.prototype, "external-identifier", null);
__decorate([
Memoize()
], Metadata.prototype, "files_count", null);
__decorate([
Memoize()
], Metadata.prototype, "indexdate", null);
__decorate([
Memoize()
], Metadata.prototype, "isbn", null);
__decorate([
Memoize()
], Metadata.prototype, "item_count", null);
__decorate([
Memoize()
], Metadata.prototype, "item_size", null);
__decorate([
Memoize()
], Metadata.prototype, "language", null);
__decorate([
Memoize()
], Metadata.prototype, "length", null);
__decorate([
Memoize()
], Metadata.prototype, "lineage", null);
__decorate([
Memoize()
], Metadata.prototype, "month", null);
__decorate([
Memoize()
], Metadata.prototype, "mediatype", null);
__decorate([
Memoize()
], Metadata.prototype, "noindex", null);
__decorate([
Memoize()
], Metadata.prototype, "notes", null);
__decorate([
Memoize()
], Metadata.prototype, "num_favorites", null);
__decorate([
Memoize()
], Metadata.prototype, "num_reviews", null);
__decorate([
Memoize()
], Metadata.prototype, "openlibrary_edition", null);
__decorate([
Memoize()
], Metadata.prototype, "openlibrary_work", null);
__decorate([
Memoize()
], Metadata.prototype, "page_progression", null);
__decorate([
Memoize()
], Metadata.prototype, "partner", null);
__decorate([
Memoize()
], Metadata.prototype, "ppi", null);
__decorate([
Memoize()
], Metadata.prototype, "publicdate", null);
__decorate([
Memoize()
], Metadata.prototype, "publisher", null);
__decorate([
Memoize()
], Metadata.prototype, "runtime", null);
__decorate([
Memoize()
], Metadata.prototype, "scanner", null);
__decorate([
Memoize()
], Metadata.prototype, "source", null);
__decorate([
Memoize()
], Metadata.prototype, "start_localtime", null);
__decorate([
Memoize()
], Metadata.prototype, "start_time", null);
__decorate([
Memoize()
], Metadata.prototype, "stop_time", null);
__decorate([
Memoize()
], Metadata.prototype, "subject", null);
__decorate([
Memoize()
], Metadata.prototype, "taper", null);
__decorate([
Memoize()
], Metadata.prototype, "title", null);
__decorate([
Memoize()
], Metadata.prototype, "transferer", null);
__decorate([
Memoize()
], Metadata.prototype, "track", null);
__decorate([
Memoize()
], Metadata.prototype, "type", null);
__decorate([
Memoize()
], Metadata.prototype, "uploader", null);
__decorate([
Memoize()
], Metadata.prototype, "utc_offset", null);
__decorate([
Memoize()
], Metadata.prototype, "venue", null);
__decorate([
Memoize()
], Metadata.prototype, "week", null);
__decorate([
Memoize()
], Metadata.prototype, "year", null);
//# sourceMappingURL=metadata.js.map
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Metadata } from '../src/models/metadata';
export class MockResponseGenerator {

@@ -6,2 +7,4 @@ generateMockSearchResponse(params) {

const fieldsAsString = (_a = params.fields) === null || _a === void 0 ? void 0 : _a.join(',');
const metadata1 = new Metadata({ identifier: 'foo' });
const metadata2 = new Metadata({ identifier: 'bar' });
return {

@@ -31,8 +34,3 @@ rawResponse: {

start: 0,
docs: [
{
identifier: 'foo',
},
{ identifier: 'bar' },
],
docs: [metadata1, metadata2],
},

@@ -39,0 +37,0 @@ };

@@ -23,3 +23,6 @@ export { Metadata } from './src/models/metadata';

export { MetadataField } from './src/models/metadata-fields/metadata-field';
export {
MetadataFieldInterface,
MetadataField,
} from './src/models/metadata-fields/metadata-field';

@@ -26,0 +29,0 @@ export { MetadataResponse } from './src/responses/metadata/metadata-response';

{
"name": "@internetarchive/search-service",
"version": "0.2.2",
"version": "0.2.3",
"description": "A search service for the Internet Archive",

@@ -73,4 +73,6 @@ "license": "AGPL-3.0-only",

"@internetarchive/field-parsers": "^0.1.1",
"@internetarchive/result-type": "^0.0.1"
"@internetarchive/result-type": "^0.0.1",
"decorator-cache-getter": "^1.0.0",
"typescript-memoize": "^1.1.0"
}
}

@@ -1,8 +0,42 @@

import {
FieldParserInterface,
FieldParserRawValue,
} from '@internetarchive/field-parsers';
import { Memoize } from 'typescript-memoize';
import { FieldParserInterface } from '@internetarchive/field-parsers';
/**
* The MetadataRawValue is all of the possible raw types we can get for a field.
*
* This allows the parsers to know if they can handle the raw value or not and
* how to handle it if they can.
*/
export type MetadataRawValue = string | string[] | number | boolean;
export interface MetadataFieldInterface<T> {
/**
* The raw value received from the API response
*
* @type {MetadataRawValue}
* @memberof MetadataField
*/
rawValue?: MetadataRawValue;
/**
* The first value if there are multiple or the only value if there is one
*
* @readonly
* @type {(T | undefined)}
* @memberof MetadataField
*/
value?: T;
/**
* The array of all values for the field.
*
* Many fields only contain a single value and
* can be accessed via the `.value` getter
*
* @type {T[]}
* @memberof MetadataField
*/
values: T[];
}
/**

@@ -35,31 +69,15 @@ * The MetadataField is responsible for three things:

FieldParserInterfaceType extends FieldParserInterface<Type>
> {
/**
* The raw value received from the API response
*
* @type {MetadataRawValue}
* @memberof MetadataField
*/
> implements MetadataFieldInterface<Type> {
/** @inheritdoc */
rawValue?: MetadataRawValue;
/**
* The array of all values for the field.
*
* Many fields only contain a single value and
* can be accessed via the `.value` getter
*
* @type {Type[]}
* @memberof MetadataField
*/
values: Type[] = [];
/** @inheritdoc */
@Memoize() get values(): Type[] {
const values = this.parseRawValue();
return values;
}
/**
* The first value if there are multiple or the only value if there is one
*
* @readonly
* @type {(Type | undefined)}
* @memberof MetadataField
*/
get value(): Type | undefined {
return this.values.length > 0 ? this.values[0] : undefined;
/** @inheritdoc */
@Memoize() get value(): Type | undefined {
return this.values[0];
}

@@ -70,4 +88,2 @@

this.rawValue = rawValue;
this.processRawValue();
}

@@ -77,22 +93,14 @@

private processRawValue(): void {
if (this.rawValue === undefined) {
return;
}
if (Array.isArray(this.rawValue)) {
this.rawValue.forEach(value => {
this.parseAndPersistValue(value);
});
} else {
this.parseAndPersistValue(this.rawValue);
}
private parseRawValue(): Type[] {
if (this.rawValue === undefined) return [];
const rawValues = Array.isArray(this.rawValue)
? this.rawValue
: [this.rawValue];
const values: Type[] = [];
rawValues.forEach(value => {
const parsed = this.parser.parseValue(value);
if (parsed !== undefined) values.push(parsed);
});
return values;
}
private parseAndPersistValue(value: FieldParserRawValue): void {
const parsedValue = this.parser.parseValue(value);
if (parsedValue !== undefined) {
this.values.push(parsedValue);
}
}
}
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Memoize } from 'typescript-memoize';
import { BooleanField } from './metadata-fields/field-types/boolean';

@@ -39,9 +40,23 @@ import { DateField } from './metadata-fields/field-types/date';

*/
identifier?: string;
get identifier(): string | undefined {
return this.rawMetadata?.identifier;
}
addeddate?: DateField;
@Memoize() get addeddate(): DateField | undefined {
return this.rawMetadata?.addeddate
? new DateField(this.rawMetadata.addeddate)
: undefined;
}
audio_codec?: StringField;
@Memoize() get audio_codec(): StringField | undefined {
return this.rawMetadata?.audio_codec
? new StringField(this.rawMetadata.audio_codec)
: undefined;
}
audio_sample_rate?: NumberField;
@Memoize() get audio_sample_rate(): NumberField | undefined {
return this.rawMetadata?.audio_sample_rate
? new NumberField(this.rawMetadata.audio_sample_rate)
: undefined;
}

@@ -56,3 +71,7 @@ /**

*/
collection?: StringField;
@Memoize() get collection(): StringField | undefined {
return this.rawMetadata?.collection
? new StringField(this.rawMetadata.collection)
: undefined;
}

@@ -70,3 +89,7 @@ /**

*/
collections_raw?: StringField;
@Memoize() get collections_raw(): StringField | undefined {
return this.rawMetadata?.collections_raw
? new StringField(this.rawMetadata.collections_raw)
: undefined;
}

@@ -79,13 +102,37 @@ /**

*/
collection_size?: ByteField;
@Memoize() get collection_size(): ByteField | undefined {
return this.rawMetadata?.collection_size
? new ByteField(this.rawMetadata.collection_size)
: undefined;
}
contributor?: StringField;
@Memoize() get contributor(): StringField | undefined {
return this.rawMetadata?.contributor
? new StringField(this.rawMetadata.contributor)
: undefined;
}
coverage?: StringField;
@Memoize() get coverage(): StringField | undefined {
return this.rawMetadata?.coverage
? new StringField(this.rawMetadata.coverage)
: undefined;
}
creator?: StringField;
@Memoize() get creator(): StringField | undefined {
return this.rawMetadata?.creator
? new StringField(this.rawMetadata.creator)
: undefined;
}
date?: DateField;
@Memoize() get date(): DateField | undefined {
return this.rawMetadata?.date
? new DateField(this.rawMetadata.date)
: undefined;
}
description?: StringField;
@Memoize() get description(): StringField | undefined {
return this.rawMetadata?.description
? new StringField(this.rawMetadata.description)
: undefined;
}

@@ -98,3 +145,7 @@ /**

*/
downloads?: NumberField;
@Memoize() get downloads(): NumberField | undefined {
return this.rawMetadata?.downloads
? new NumberField(this.rawMetadata.downloads)
: undefined;
}

@@ -107,5 +158,13 @@ /**

*/
duration?: DurationField;
@Memoize() get duration(): DurationField | undefined {
return this.rawMetadata?.duration
? new DurationField(this.rawMetadata.duration)
: undefined;
}
'external-identifier'?: StringField;
@Memoize() get 'external-identifier'(): StringField | undefined {
return this.rawMetadata?.['external-identifier']
? new StringField(this.rawMetadata?.['external-identifier'])
: undefined;
}

@@ -118,7 +177,19 @@ /**

*/
files_count?: NumberField;
@Memoize() get files_count(): NumberField | undefined {
return this.rawMetadata?.files_count
? new NumberField(this.rawMetadata.files_count)
: undefined;
}
indexdate?: DateField;
@Memoize() get indexdate(): DateField | undefined {
return this.rawMetadata?.indexdate
? new DateField(this.rawMetadata.indexdate)
: undefined;
}
isbn?: StringField;
@Memoize() get isbn(): StringField | undefined {
return this.rawMetadata?.isbn
? new StringField(this.rawMetadata.isbn)
: undefined;
}

@@ -131,3 +202,7 @@ /**

*/
item_count?: NumberField;
@Memoize() get item_count(): NumberField | undefined {
return this.rawMetadata?.item_count
? new NumberField(this.rawMetadata.item_count)
: undefined;
}

@@ -140,9 +215,25 @@ /**

*/
item_size?: ByteField;
@Memoize() get item_size(): ByteField | undefined {
return this.rawMetadata?.item_size
? new ByteField(this.rawMetadata.item_size)
: undefined;
}
language?: StringField;
@Memoize() get language(): StringField | undefined {
return this.rawMetadata?.language
? new StringField(this.rawMetadata.language)
: undefined;
}
length?: DurationField;
@Memoize() get length(): DurationField | undefined {
return this.rawMetadata?.length
? new DurationField(this.rawMetadata.length)
: undefined;
}
lineage?: StringField;
@Memoize() get lineage(): StringField | undefined {
return this.rawMetadata?.lineage
? new StringField(this.rawMetadata.lineage)
: undefined;
}

@@ -155,9 +246,25 @@ /**

*/
month?: NumberField;
@Memoize() get month(): NumberField | undefined {
return this.rawMetadata?.month
? new NumberField(this.rawMetadata.month)
: undefined;
}
mediatype?: MediaTypeField;
@Memoize() get mediatype(): MediaTypeField | undefined {
return this.rawMetadata?.mediatype
? new MediaTypeField(this.rawMetadata.mediatype)
: undefined;
}
noindex?: BooleanField;
@Memoize() get noindex(): BooleanField | undefined {
return this.rawMetadata?.noindex
? new BooleanField(this.rawMetadata.noindex)
: undefined;
}
notes?: StringField;
@Memoize() get notes(): StringField | undefined {
return this.rawMetadata?.notes
? new StringField(this.rawMetadata.notes)
: undefined;
}

@@ -170,49 +277,145 @@ /**

*/
num_favorites?: NumberField;
@Memoize() get num_favorites(): NumberField | undefined {
return this.rawMetadata?.num_favorites
? new NumberField(this.rawMetadata.num_favorites)
: undefined;
}
num_reviews?: NumberField;
@Memoize() get num_reviews(): NumberField | undefined {
return this.rawMetadata?.num_reviews
? new NumberField(this.rawMetadata.num_reviews)
: undefined;
}
openlibrary_edition?: StringField;
@Memoize() get openlibrary_edition(): StringField | undefined {
return this.rawMetadata?.openlibrary_edition
? new StringField(this.rawMetadata.openlibrary_edition)
: undefined;
}
openlibrary_work?: StringField;
@Memoize() get openlibrary_work(): StringField | undefined {
return this.rawMetadata?.openlibrary_work
? new StringField(this.rawMetadata.openlibrary_work)
: undefined;
}
page_progression?: PageProgressionField;
@Memoize() get page_progression(): PageProgressionField | undefined {
return this.rawMetadata?.page_progression
? new PageProgressionField(this.rawMetadata.page_progression)
: undefined;
}
partner?: StringField;
@Memoize() get partner(): StringField | undefined {
return this.rawMetadata?.partner
? new StringField(this.rawMetadata.partner)
: undefined;
}
ppi?: NumberField;
@Memoize() get ppi(): NumberField | undefined {
return this.rawMetadata?.ppi
? new NumberField(this.rawMetadata.ppi)
: undefined;
}
publicdate?: DateField;
@Memoize() get publicdate(): DateField | undefined {
return this.rawMetadata?.publicdate
? new DateField(this.rawMetadata.publicdate)
: undefined;
}
publisher?: StringField;
@Memoize() get publisher(): StringField | undefined {
return this.rawMetadata?.publisher
? new StringField(this.rawMetadata.publisher)
: undefined;
}
runtime?: DurationField;
@Memoize() get runtime(): DurationField | undefined {
return this.rawMetadata?.runtime
? new DurationField(this.rawMetadata.runtime)
: undefined;
}
scanner?: StringField;
@Memoize() get scanner(): StringField | undefined {
return this.rawMetadata?.scanner
? new StringField(this.rawMetadata.scanner)
: undefined;
}
source?: StringField;
@Memoize() get source(): StringField | undefined {
return this.rawMetadata?.source
? new StringField(this.rawMetadata.source)
: undefined;
}
start_localtime?: DateField;
@Memoize() get start_localtime(): DateField | undefined {
return this.rawMetadata?.start_localtime
? new DateField(this.rawMetadata.start_localtime)
: undefined;
}
start_time?: DateField;
@Memoize() get start_time(): DateField | undefined {
return this.rawMetadata?.start_time
? new DateField(this.rawMetadata.start_time)
: undefined;
}
stop_time?: DateField;
@Memoize() get stop_time(): DateField | undefined {
return this.rawMetadata?.stop_time
? new DateField(this.rawMetadata.stop_time)
: undefined;
}
subject?: StringField;
@Memoize() get subject(): StringField | undefined {
return this.rawMetadata?.subject
? new StringField(this.rawMetadata.subject)
: undefined;
}
taper?: StringField;
@Memoize() get taper(): StringField | undefined {
return this.rawMetadata?.taper
? new StringField(this.rawMetadata.taper)
: undefined;
}
title?: StringField;
@Memoize() get title(): StringField | undefined {
return this.rawMetadata?.title
? new StringField(this.rawMetadata.title)
: undefined;
}
transferer?: StringField;
@Memoize() get transferer(): StringField | undefined {
return this.rawMetadata?.transferer
? new StringField(this.rawMetadata.transferer)
: undefined;
}
track?: NumberField;
@Memoize() get track(): NumberField | undefined {
return this.rawMetadata?.track
? new NumberField(this.rawMetadata.track)
: undefined;
}
type?: StringField;
@Memoize() get type(): StringField | undefined {
return this.rawMetadata?.type
? new StringField(this.rawMetadata.type)
: undefined;
}
uploader?: StringField;
@Memoize() get uploader(): StringField | undefined {
return this.rawMetadata?.uploader
? new StringField(this.rawMetadata.uploader)
: undefined;
}
utc_offset?: NumberField;
@Memoize() get utc_offset(): NumberField | undefined {
return this.rawMetadata?.utc_offset
? new NumberField(this.rawMetadata.utc_offset)
: undefined;
}
venue?: StringField;
@Memoize() get venue(): StringField | undefined {
return this.rawMetadata?.venue
? new StringField(this.rawMetadata.venue)
: undefined;
}

@@ -225,109 +428,17 @@ /**

*/
week?: NumberField;
@Memoize() get week(): NumberField | undefined {
return this.rawMetadata?.week
? new NumberField(this.rawMetadata.week)
: undefined;
}
year?: DateField;
@Memoize() get year(): DateField | undefined {
return this.rawMetadata?.year
? new DateField(this.rawMetadata.year)
: undefined;
}
constructor(json: Record<string, any>) {
this.rawMetadata = json;
this.identifier = json.identifier;
this.addeddate = json.addeddate ? new DateField(json.addeddate) : undefined;
this.publicdate = json.publicdate
? new DateField(json.publicdate)
: undefined;
this.indexdate = json.indexdate ? new DateField(json.indexdate) : undefined;
this.audio_codec = json.audio_codec
? new StringField(json.audio_codec)
: undefined;
this.audio_sample_rate = json.audio_sample_rate
? new NumberField(json.audio_sample_rate)
: undefined;
this.collection = json.collection
? new StringField(json.collection)
: undefined;
this.collections_raw = json.collections_raw
? new StringField(json.collections_raw)
: undefined;
this.collection_size = json.collection_size
? new ByteField(json.collection_size)
: undefined;
this.contributor = json.contributor
? new StringField(json.contributor)
: undefined;
this.coverage = json.coverage ? new StringField(json.coverage) : undefined;
this.creator = json.creator ? new StringField(json.creator) : undefined;
this.date = json.date ? new DateField(json.date) : undefined;
this.description = json.description
? new StringField(json.description)
: undefined;
this.downloads = json.downloads
? new NumberField(json.downloads)
: undefined;
this.duration = json.duration
? new DurationField(json.duration)
: undefined;
this['external-identifier'] = json['external-identifier']
? new StringField(json['external-identifier'])
: undefined;
this.files_count = json.files_count
? new NumberField(json.files_count)
: undefined;
this.isbn = json.isbn ? new StringField(json.isbn) : undefined;
this.item_count = json.item_count
? new NumberField(json.item_count)
: undefined;
this.item_size = json.item_size ? new ByteField(json.item_size) : undefined;
this.language = json.language ? new StringField(json.language) : undefined;
this.length = json.length ? new DurationField(json.length) : undefined;
this.lineage = json.lineage ? new StringField(json.lineage) : undefined;
this.mediatype = json.mediatype
? new MediaTypeField(json.mediatype)
: undefined;
this.month = json.month ? new NumberField(json.month) : undefined;
this.noindex = json.noindex ? new BooleanField(json.noindex) : undefined;
this.notes = json.notes ? new StringField(json.notes) : undefined;
this.num_favorites = json.num_favorites
? new NumberField(json.num_favorites)
: undefined;
this.num_reviews = json.num_reviews
? new NumberField(json.num_reviews)
: undefined;
this.openlibrary_edition = json.openlibrary_edition
? new StringField(json.openlibrary_edition)
: undefined;
this.openlibrary_work = json.openlibrary_work
? new StringField(json.openlibrary_work)
: undefined;
this.partner = json.partner ? new StringField(json.partner) : undefined;
this.ppi = json.ppi ? new NumberField(json.ppi) : undefined;
this.publisher = json.publisher
? new StringField(json.publisher)
: undefined;
this.runtime = json.runtime ? new DurationField(json.runtime) : undefined;
this.scanner = json.scanner ? new StringField(json.scanner) : undefined;
this.source = json.source ? new StringField(json.source) : undefined;
this.start_localtime = json.start_localtime
? new DateField(json.start_localtime)
: undefined;
this.start_time = json.start_time
? new DateField(json.start_time)
: undefined;
this.stop_time = json.stop_time ? new DateField(json.stop_time) : undefined;
this.subject = json.subject ? new StringField(json.subject) : undefined;
this.taper = json.taper ? new StringField(json.taper) : undefined;
this.title = json.title ? new StringField(json.title) : undefined;
this.track = json.track ? new NumberField(json.track) : undefined;
this.transferer = json.transferer
? new StringField(json.transferer)
: undefined;
this.type = json.type ? new StringField(json.type) : undefined;
this.uploader = json.uploader ? new StringField(json.uploader) : undefined;
this.utc_offset = json.utc_offset
? new NumberField(json.utc_offset)
: undefined;
this.venue = json.venue ? new StringField(json.venue) : undefined;
this.week = json.week ? new NumberField(json.week) : undefined;
this.year = json.year ? new DateField(json.year) : undefined;
}
}

@@ -5,2 +5,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

import { SearchParams } from '../src/search-params';
import { Metadata } from '../src/models/metadata';

@@ -11,2 +12,5 @@ export class MockResponseGenerator {

const metadata1 = new Metadata({ identifier: 'foo' });
const metadata2 = new Metadata({ identifier: 'bar' });
return {

@@ -36,8 +40,3 @@ rawResponse: {

start: 0,
docs: [
{
identifier: 'foo',
},
{ identifier: 'bar' },
],
docs: [metadata1, metadata2],
},

@@ -44,0 +43,0 @@ };

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