@ca-plant-list/ca-plant-list 0.4.3 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,20 +10,20 @@ declare class Config {
10
10
  name: string,
11
11
  subcategory?: string,
12
12
  defaultValue?: string
13
- ): string;
13
+ ): string | undefined;
14
14
  getCountyCodes(): string[];
15
15
  getLabel(name: string, dflt: string): string;
16
16
  }
17
17
 
18
18
  declare class ErrorLog {
19
19
  log(...args: string[]): void;
20
- write();
20
+ write(): void;
21
21
  }
22
22
 
23
23
  declare class Families {
24
24
  getFamilies(): Family[];
25
25
  getFamily(name: string): Family;
26
- renderPages(outputDir: string, cols?: TaxaCol[]);
26
+ renderPages(outputDir: string, cols?: TaxaCol[]): void;
27
27
  }
28
28
 
29
29
  declare class Family {
@@ -41,7 +41,7 @@ declare class FlowerColor {
41
41
  }
42
42
 
43
43
  declare class Genera {
44
- addTaxon(Taxon);
44
+ addTaxon(taxon: Taxon): void;
45
45
  getGenus(name: string): Genus;
46
46
  }
47
47
 
@@ -67,13 +67,13 @@ declare class InatObsOptions {
67
67
  }
68
68
 
69
69
  declare class SiteGenerator {
70
- copyIllustrations(flowerColors: FlowerColor[]);
71
- mkdir(path: string);
70
+ copyIllustrations(flowerColors: FlowerColor[]): void;
71
+ mkdir(path: string): void;
72
72
  writeTemplate(
73
73
  content: string,
74
- attributes: Object<string, string>,
74
+ attributes: Record<string, string>,
75
75
  filename: string
76
- );
76
+ ): void;
77
77
  }
78
78
 
79
79
  declare class SynonymData {
@@ -91,7 +91,7 @@ declare class Taxa {
91
91
 
92
92
  declare class TaxaCol {
93
93
  class?: string;
94
- data: Object<string, Taxon>;
94
+ data: (taxon:Taxon)=>string
95
95
  title: string;
96
96
  }
97
97
 
@@ -120,6 +120,7 @@ declare class Taxon {
120
120
  getJepsonID(): string;
121
121
  getLifeCycle(): string;
122
122
  getName(): string;
123
+ getPhotos(): Photo[];
123
124
  getRPIRank(): string;
124
125
  getRPIRankAndThreat(): string;
125
126
  getRPIRankAndThreatTooltip(): string;
@@ -152,3 +153,48 @@ declare class TaxonImage {
152
153
  getCaption(): string | undefined;
153
154
  getSrc(): string;
154
155
  }
156
+
157
+ type PhotoRights = "CC0"| "CC BY"| "CC BY-NC"| "C"|null;
158
+
159
+ declare class Photo {
160
+ url?: string;
161
+ rightsHolder: null | string;
162
+ rights?: PhotoRights;
163
+ getUrl: ( ) => string;
164
+ getSourceUrl: ( ) => string;
165
+ }
166
+
167
+ declare class InatPhoto extends Photo {
168
+ inatPhotoId: number;
169
+ ext: string;
170
+ }
171
+
172
+ type InatLicenseCode = "cc-by-nc-sa"
173
+ | "cc-by-nc"
174
+ | "cc-by-nc-nd"
175
+ | "cc-by"
176
+ | "cc-by-sa"
177
+ | "cc-by-nd"
178
+ | "pd"
179
+ | "gdfl"
180
+ | "cc0";
181
+
182
+ declare class InatCsvPhoto {
183
+ name: string;
184
+ id: number;
185
+ ext: string;
186
+ licenseCode: InatLicenseCode;
187
+ attrName: string;
188
+ }
189
+
190
+ declare class InatApiTaxon {
191
+ id: number;
192
+ taxon_photos: {
193
+ photo: {
194
+ id: number;
195
+ attribution: string;
196
+ license_code: InatLicenseCode
197
+ medium_url: string;
198
+ }
199
+ }[]
200
+ }
@@ -1,11 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "editor.defaultFormatter": "esbenp.prettier-vscode",
4
- "prettier.tabWidth": 4,
5
- "json.schemas": [
6
- {
7
- "fileMatch": ["**/exceptions.json"],
8
- "url": "./schemas/exceptions.schema.json"
9
- }
10
- ]
11
- }