mirror of
https://github.com/iconify/iconify.git
synced 2024-11-09 23:00:56 +00:00
Add API provider types to types package
This commit is contained in:
parent
6c461f3b92
commit
ce5fade7ae
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@iconify/types",
|
||||
"description": "Types for Iconify data",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"author": "Vjacheslav Trushkin",
|
||||
"license": "(Apache-2.0 OR GPL-2.0)",
|
||||
"main": "./index.js",
|
||||
|
40
packages/types/provider.ts
Normal file
40
packages/types/provider.ts
Normal file
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Raw data sent by API
|
||||
*/
|
||||
|
||||
// Links
|
||||
export interface APIProviderRawDataLinks {
|
||||
// Collections list
|
||||
home?: string;
|
||||
// Collection. Available variables: {prefix}
|
||||
collection?: string;
|
||||
// Icon. Available variables: {prefix}, {name}
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
// NPM
|
||||
export interface APIProviderRawDataNPM {
|
||||
// Package name for installation. Available variables: {prefix}
|
||||
package?: string;
|
||||
|
||||
// Icon import source. Available variables: {prefix}, {name}
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
// Main type
|
||||
export interface APIProviderRawData {
|
||||
// Provider name (as used in icon names)
|
||||
provider: string;
|
||||
|
||||
// Provider name (human readable version)
|
||||
title?: string;
|
||||
|
||||
// API link(s), though they are usually redundant because API end point is used to retrieve data
|
||||
api?: string | string[];
|
||||
|
||||
// Links to website
|
||||
links?: APIProviderRawDataLinks;
|
||||
|
||||
// NPM packages for icons, used when showing code samples
|
||||
npm?: APIProviderRawDataNPM;
|
||||
}
|
Loading…
Reference in New Issue
Block a user