@hebcal/rest-api 5.2.0 → 6.0.1
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.
- package/dist/bundle.js +68 -756
- package/dist/bundle.min.js +2 -2
- package/dist/fullcalendar.js +28 -519
- package/dist/fullcalendar.min.js +2 -2
- package/dist/index.mjs +27 -714
- package/dist/{classic-rest-api.d.ts → src/classic-rest-api.d.ts} +2 -1
- package/dist/{common.d.ts → src/common.d.ts} +3 -1
- package/dist/{csv.d.ts → src/csv.d.ts} +1 -1
- package/dist/{fullcalendar.d.ts → src/fullcalendar.d.ts} +1 -1
- package/dist/{rss.d.ts → src/rss.d.ts} +1 -1
- package/package.json +19 -21
- package/dist/countryNames.json.d.ts +0 -203
- package/dist/holidays.json.d.ts +0 -70
- package/dist/index.cjs +0 -1544
- package/dist/module.d.ts +0 -117
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{makeAnchor.d.ts → src/makeAnchor.d.ts} +0 -0
- /package/dist/{shorten.d.ts → src/shorten.d.ts} +0 -0
package/dist/module.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { CalOptions, Location, Event } from '@hebcal/core';
|
|
2
|
-
export { pad2, pad4 } from '@hebcal/hdate';
|
|
3
|
-
|
|
4
|
-
interface StringMap {
|
|
5
|
-
[key: string]: string;
|
|
6
|
-
}
|
|
7
|
-
type RestApiEventOptions = {
|
|
8
|
-
utmSource?: string;
|
|
9
|
-
utmMedium?: string;
|
|
10
|
-
utmCampaign?: string;
|
|
11
|
-
appendHebrewToSubject?: boolean;
|
|
12
|
-
yahrzeit?: boolean;
|
|
13
|
-
subscribe?: string | number | boolean;
|
|
14
|
-
heDateParts?: boolean;
|
|
15
|
-
includeEvent?: boolean;
|
|
16
|
-
euro?: boolean;
|
|
17
|
-
title?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
dayFormat?: Intl.DateTimeFormat;
|
|
20
|
-
mainUrl?: string;
|
|
21
|
-
selfUrl?: string;
|
|
22
|
-
buildDate?: Date;
|
|
23
|
-
lastBuildDate?: string;
|
|
24
|
-
evPubDate?: boolean;
|
|
25
|
-
lang?: string;
|
|
26
|
-
preferAsciiName?: boolean;
|
|
27
|
-
};
|
|
28
|
-
type RestApiOptions = CalOptions & RestApiEventOptions;
|
|
29
|
-
/**
|
|
30
|
-
* Location information
|
|
31
|
-
*/
|
|
32
|
-
type LocationPlainObj = {
|
|
33
|
-
title?: string | null;
|
|
34
|
-
city?: string | null;
|
|
35
|
-
tzid?: string;
|
|
36
|
-
latitude?: number;
|
|
37
|
-
longitude?: number;
|
|
38
|
-
cc?: string;
|
|
39
|
-
country?: string;
|
|
40
|
-
admin1?: string;
|
|
41
|
-
asciiname?: string;
|
|
42
|
-
geo?: string;
|
|
43
|
-
zip?: string;
|
|
44
|
-
state?: string;
|
|
45
|
-
stateName?: string;
|
|
46
|
-
geonameid?: number;
|
|
47
|
-
};
|
|
48
|
-
declare const holidayDescription: StringMap;
|
|
49
|
-
declare const countryNames: StringMap;
|
|
50
|
-
/**
|
|
51
|
-
* Converts a @hebcal/core `Location` to a plain JS object.
|
|
52
|
-
*/
|
|
53
|
-
declare function locationToPlainObj(location: Location | undefined): LocationPlainObj;
|
|
54
|
-
declare function getDownloadFilename(options: RestApiOptions): string;
|
|
55
|
-
/**
|
|
56
|
-
* Returns just the date portion as YYYY-MM-DD
|
|
57
|
-
*/
|
|
58
|
-
declare function toISOString(d: Date): string;
|
|
59
|
-
/**
|
|
60
|
-
* Returns a category and subcategory name
|
|
61
|
-
*/
|
|
62
|
-
declare function getEventCategories(ev: Event): string[];
|
|
63
|
-
/**
|
|
64
|
-
* Renders the event title in default locale, but strips off time
|
|
65
|
-
*/
|
|
66
|
-
declare function renderTitleWithoutTime(ev: Event): string;
|
|
67
|
-
/**
|
|
68
|
-
* Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
|
|
69
|
-
*/
|
|
70
|
-
declare function getCalendarTitle(events: Event[], options: RestApiOptions): string;
|
|
71
|
-
/**
|
|
72
|
-
* Returns an English language description of the holiday
|
|
73
|
-
*/
|
|
74
|
-
declare function getHolidayDescription(ev: Event, firstSentence?: boolean): string;
|
|
75
|
-
/**
|
|
76
|
-
* Makes mulit-line text that summarizes Torah & Haftarah
|
|
77
|
-
*/
|
|
78
|
-
declare function makeTorahMemoText(ev: Event, il: boolean): string;
|
|
79
|
-
declare function makeMemo(ev: Event, il: boolean): string;
|
|
80
|
-
/**
|
|
81
|
-
* Appends utm_source and utm_medium parameters to a URL
|
|
82
|
-
*/
|
|
83
|
-
declare function appendIsraelAndTracking(url: string, il: boolean, utmSource: string, utmMedium: string, utmCampaign?: string): string;
|
|
84
|
-
declare function shouldRenderBrief(ev: Event): boolean;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Renders an Event as a string
|
|
88
|
-
*/
|
|
89
|
-
declare function eventToCsv(ev: Event, options: RestApiOptions): string;
|
|
90
|
-
declare function eventsToCsv(events: Event[], options: RestApiOptions): string;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Helper function to transform a string to make it more usable in a URL or filename.
|
|
94
|
-
* Converts to lowercase and replaces non-word characters with hyphen ('-').
|
|
95
|
-
* @example
|
|
96
|
-
* makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
|
|
97
|
-
*/
|
|
98
|
-
declare function makeAnchor(s: string): string;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Formats a list events for the classic Hebcal.com JSON API response
|
|
102
|
-
*/
|
|
103
|
-
declare function eventsToClassicApi(events: Event[], options: RestApiOptions, leyning?: boolean): any;
|
|
104
|
-
/**
|
|
105
|
-
* Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
106
|
-
*/
|
|
107
|
-
declare function eventToClassicApiObject(ev: Event, options: RestApiOptions, leyning?: boolean): any;
|
|
108
|
-
|
|
109
|
-
declare function eventsToRss2(events: Event[], options: RestApiOptions): string;
|
|
110
|
-
declare function eventToRssItem2(ev: Event, options: RestApiOptions): string;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Converts a Hebcal event to a FullCalendar.io object
|
|
114
|
-
*/
|
|
115
|
-
declare function eventToFullCalendar(ev: Event, tzid: string, il: boolean): any;
|
|
116
|
-
|
|
117
|
-
export { type LocationPlainObj, type RestApiEventOptions, type RestApiOptions, type StringMap, appendIsraelAndTracking, countryNames, eventToClassicApiObject, eventToCsv, eventToFullCalendar, eventToRssItem2, eventsToClassicApi, eventsToCsv, eventsToRss2, getCalendarTitle, getDownloadFilename, getEventCategories, getHolidayDescription, holidayDescription, locationToPlainObj, makeAnchor, makeMemo, makeTorahMemoText, renderTitleWithoutTime, shouldRenderBrief, toISOString };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|