@evnt/types 0.1.0
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/README.md +10 -0
- package/dist/event/component/BlueSkyRichtextComponent.d.ts +14 -0
- package/dist/event/component/BlueSkyRichtextComponent.d.ts.map +1 -0
- package/dist/event/component/BlueSkyRichtextComponent.js +2 -0
- package/dist/event/component/LanguagesComponent.d.ts +11 -0
- package/dist/event/component/LanguagesComponent.d.ts.map +1 -0
- package/dist/event/component/LanguagesComponent.js +6 -0
- package/dist/event/component/LinkComponent.d.ts +11 -0
- package/dist/event/component/LinkComponent.d.ts.map +1 -0
- package/dist/event/component/LinkComponent.js +2 -0
- package/dist/event/component/MarkdownComponent.d.ts +7 -0
- package/dist/event/component/MarkdownComponent.d.ts.map +1 -0
- package/dist/event/component/MarkdownComponent.js +2 -0
- package/dist/event/component/SourceComponent.d.ts +5 -0
- package/dist/event/component/SourceComponent.d.ts.map +1 -0
- package/dist/event/component/SourceComponent.js +2 -0
- package/dist/event/component/SplashMediaComponent.d.ts +15 -0
- package/dist/event/component/SplashMediaComponent.d.ts.map +1 -0
- package/dist/event/component/SplashMediaComponent.js +6 -0
- package/dist/event/component/index.d.ts +23 -0
- package/dist/event/component/index.d.ts.map +1 -0
- package/dist/event/component/index.js +2 -0
- package/dist/event/event.d.ts +15 -0
- package/dist/event/event.d.ts.map +1 -0
- package/dist/event/event.js +1 -0
- package/dist/event/instance/activity.d.ts +21 -0
- package/dist/event/instance/activity.d.ts.map +1 -0
- package/dist/event/instance/activity.js +3 -0
- package/dist/event/instance/index.d.ts +14 -0
- package/dist/event/instance/index.d.ts.map +1 -0
- package/dist/event/instance/index.js +2 -0
- package/dist/event/venue/OnlineVenue.d.ts +7 -0
- package/dist/event/venue/OnlineVenue.d.ts.map +1 -0
- package/dist/event/venue/OnlineVenue.js +2 -0
- package/dist/event/venue/PhysicalVenue.d.ts +42 -0
- package/dist/event/venue/PhysicalVenue.d.ts.map +1 -0
- package/dist/event/venue/PhysicalVenue.js +7 -0
- package/dist/event/venue/UnknownVenue.d.ts +5 -0
- package/dist/event/venue/UnknownVenue.d.ts.map +1 -0
- package/dist/event/venue/UnknownVenue.js +2 -0
- package/dist/event/venue/base.d.ts +8 -0
- package/dist/event/venue/base.d.ts.map +1 -0
- package/dist/event/venue/base.js +2 -0
- package/dist/event/venue/index.d.ts +5 -0
- package/dist/event/venue/index.d.ts.map +1 -0
- package/dist/event/venue/index.js +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/types/Media.d.ts +26 -0
- package/dist/types/Media.d.ts.map +1 -0
- package/dist/types/Media.js +5 -0
- package/dist/types/PartialDate.d.ts +10 -0
- package/dist/types/PartialDate.d.ts.map +1 -0
- package/dist/types/PartialDate.js +1 -0
- package/dist/types/Translations.d.ts +4 -0
- package/dist/types/Translations.d.ts.map +1 -0
- package/dist/types/Translations.js +1 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @evnt/types
|
|
2
|
+
|
|
3
|
+
TypeScript type definitions for [Open Evnt](https://evnt.directory) events.
|
|
4
|
+
|
|
5
|
+
All types used across the ecosystem live here - event structure, venues,
|
|
6
|
+
instances, components, partial dates, media, translations, etc.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import type { OpenEvnt, Venue, EventInstance, PartialDate } from "@evnt/types";
|
|
10
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface BlueSkyRichtextComponent {
|
|
2
|
+
$type: "directory.evnt.component.blueSkyRichtext";
|
|
3
|
+
text: string;
|
|
4
|
+
facets: {
|
|
5
|
+
index: {
|
|
6
|
+
byteStart: number;
|
|
7
|
+
byteEnd: number;
|
|
8
|
+
};
|
|
9
|
+
features: {
|
|
10
|
+
$type: string;
|
|
11
|
+
}[];
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=BlueSkyRichtextComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlueSkyRichtextComponent.d.ts","sourceRoot":"","sources":["../../../src/event/component/BlueSkyRichtextComponent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACxC,KAAK,EAAE,0CAA0C,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACP,KAAK,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAC9C,QAAQ,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC9B,EAAE,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare namespace LanguagesComponent {
|
|
2
|
+
interface LanguageInfo {
|
|
3
|
+
code: string;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export interface LanguagesComponent {
|
|
7
|
+
$type: "directory.evnt.component.languages";
|
|
8
|
+
languages: LanguagesComponent.LanguageInfo[];
|
|
9
|
+
}
|
|
10
|
+
export type LanguageInfo = LanguagesComponent.LanguageInfo;
|
|
11
|
+
//# sourceMappingURL=LanguagesComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LanguagesComponent.d.ts","sourceRoot":"","sources":["../../../src/event/component/LanguagesComponent.ts"],"names":[],"mappings":"AAAA,yBAAiB,kBAAkB,CAAC;IACnC,UAAiB,YAAY;QAC5B,IAAI,EAAE,MAAM,CAAC;KACb;CACD;AAED,MAAM,WAAW,kBAAkB;IAClC,KAAK,EAAE,oCAAoC,CAAC;IAC5C,SAAS,EAAE,kBAAkB,CAAC,YAAY,EAAE,CAAC;CAC7C;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PartialDate } from "../../types/PartialDate.js";
|
|
2
|
+
import type { Translations } from "../../types/Translations.js";
|
|
3
|
+
export interface LinkComponent {
|
|
4
|
+
$type: "directory.evnt.component.link";
|
|
5
|
+
url: string;
|
|
6
|
+
name?: Translations;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
opensAt?: PartialDate;
|
|
9
|
+
closesAt?: PartialDate;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=LinkComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkComponent.d.ts","sourceRoot":"","sources":["../../../src/event/component/LinkComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,+BAA+B,CAAC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,WAAW,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownComponent.d.ts","sourceRoot":"","sources":["../../../src/event/component/MarkdownComponent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,mCAAmC,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,GAAG,KAAK,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourceComponent.d.ts","sourceRoot":"","sources":["../../../src/event/component/SourceComponent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,iCAAiC,CAAC;IACzC,GAAG,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Media } from "../../types/Media.js";
|
|
2
|
+
export declare namespace SplashMediaComponent {
|
|
3
|
+
interface Roles {
|
|
4
|
+
background: void;
|
|
5
|
+
poster: void;
|
|
6
|
+
banner: void;
|
|
7
|
+
}
|
|
8
|
+
type SplashMediaRole = keyof Roles | (string & {});
|
|
9
|
+
}
|
|
10
|
+
export interface SplashMediaComponent {
|
|
11
|
+
$type: "directory.evnt.component.splashMedia";
|
|
12
|
+
roles: SplashMediaComponent.SplashMediaRole[];
|
|
13
|
+
media: Media;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SplashMediaComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplashMediaComponent.d.ts","sourceRoot":"","sources":["../../../src/event/component/SplashMediaComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,yBAAiB,oBAAoB,CAAC;IACrC,UAAiB,KAAK;QACrB,UAAU,EAAE,IAAI,CAAC;QACjB,MAAM,EAAE,IAAI,CAAC;QACb,MAAM,EAAE,IAAI,CAAC;KACb;IAED,KAAY,eAAe,GAAG,MAAM,KAAK,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,sCAAsC,CAAC;IAC9C,KAAK,EAAE,oBAAoB,CAAC,eAAe,EAAE,CAAC;IAC9C,KAAK,EAAE,KAAK,CAAC;CACb"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { LinkComponent } from "./LinkComponent.js";
|
|
2
|
+
import type { SourceComponent } from "./SourceComponent.js";
|
|
3
|
+
import type { SplashMediaComponent } from "./SplashMediaComponent.js";
|
|
4
|
+
import type { LanguagesComponent } from "./LanguagesComponent.js";
|
|
5
|
+
import type { MarkdownComponent } from "./MarkdownComponent.js";
|
|
6
|
+
import type { BlueSkyRichtextComponent } from "./BlueSkyRichtextComponent.js";
|
|
7
|
+
export interface ComponentTypes {
|
|
8
|
+
"directory.evnt.component.source": SourceComponent;
|
|
9
|
+
"directory.evnt.component.link": LinkComponent;
|
|
10
|
+
"directory.evnt.component.splashMedia": SplashMediaComponent;
|
|
11
|
+
"directory.evnt.component.languages": LanguagesComponent;
|
|
12
|
+
"directory.evnt.component.markdown": MarkdownComponent;
|
|
13
|
+
"directory.evnt.component.blueSkyRichtext": BlueSkyRichtextComponent;
|
|
14
|
+
}
|
|
15
|
+
export type KnownComponent = ComponentTypes[keyof ComponentTypes];
|
|
16
|
+
export type UnknownComponent = {
|
|
17
|
+
$type: string & {
|
|
18
|
+
_brand?: never;
|
|
19
|
+
};
|
|
20
|
+
} & Record<string, unknown>;
|
|
21
|
+
export type Component<Type extends (keyof ComponentTypes | (string & {})) = keyof ComponentTypes> = Type extends keyof ComponentTypes ? ComponentTypes[Type] : UnknownComponent;
|
|
22
|
+
export type AnyComponent = KnownComponent | UnknownComponent;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/event/component/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC9B,iCAAiC,EAAE,eAAe,CAAC;IACnD,+BAA+B,EAAE,aAAa,CAAC;IAC/C,sCAAsC,EAAE,oBAAoB,CAAC;IAC7D,oCAAoC,EAAE,kBAAkB,CAAC;IACzD,mCAAmC,EAAE,iBAAiB,CAAC;IACvD,0CAA0C,EAAE,wBAAwB,CAAC;CACrE;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM,cAAc,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,CAAC,EAAE,KAAK,CAAA;KAAE,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhG,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,GAAG,MAAM,cAAc,IAC/F,IAAI,SAAS,MAAM,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC;AAE7E,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Translations } from "../types/Translations.js";
|
|
2
|
+
import type { AnyComponent } from "./component/index.js";
|
|
3
|
+
import type { EventInstance } from "./instance/index.js";
|
|
4
|
+
import type { Venue } from "./venue/index.js";
|
|
5
|
+
export interface OpenEvnt {
|
|
6
|
+
v: "0.1";
|
|
7
|
+
name: Translations;
|
|
8
|
+
label?: Translations;
|
|
9
|
+
status?: EventStatus;
|
|
10
|
+
instances?: EventInstance[];
|
|
11
|
+
venues?: Venue[];
|
|
12
|
+
components?: AnyComponent[];
|
|
13
|
+
}
|
|
14
|
+
export type EventStatus = "planned" | "uncertain" | "postponed" | "cancelled" | "suspended";
|
|
15
|
+
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/event/event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,MAAM,WAAW,QAAQ;IACxB,CAAC,EAAE,KAAK,CAAC;IACT,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,WAAW,GACpB,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Translations } from "../../types/Translations.js";
|
|
2
|
+
import type { AnyComponent } from "../component/index.js";
|
|
3
|
+
export declare namespace Activity {
|
|
4
|
+
/** A time in the format HH:MM */
|
|
5
|
+
type Time = `${string}:${string}`;
|
|
6
|
+
/** A duration in the format H:MM, H can be 1+ digits */
|
|
7
|
+
type Duration = `${string}:${string}`;
|
|
8
|
+
interface Slot {
|
|
9
|
+
/** The day of the activity, starting from 1 */
|
|
10
|
+
day?: number;
|
|
11
|
+
time?: Time;
|
|
12
|
+
duration?: Duration;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export interface Activity {
|
|
16
|
+
/** The name of the activity */
|
|
17
|
+
name: Translations;
|
|
18
|
+
slot?: Activity.Slot;
|
|
19
|
+
components?: AnyComponent[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/event/instance/activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,yBAAiB,QAAQ,CAAC;IACzB,iCAAiC;IACjC,KAAY,IAAI,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IAEzC,wDAAwD;IACxD,KAAY,QAAQ,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IAE7C,UAAiB,IAAI;QACpB,+CAA+C;QAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,IAAI,CAAC;QACZ,QAAQ,CAAC,EAAE,QAAQ,CAAC;KACpB;CACD;AAED,MAAM,WAAW,QAAQ;IACxB,+BAA+B;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PartialDate } from "../../types/PartialDate.js";
|
|
2
|
+
import type { AnyComponent } from "../component/index.js";
|
|
3
|
+
import type { EventStatus } from "../event.js";
|
|
4
|
+
import type { Activity } from "./activity.js";
|
|
5
|
+
export interface EventInstance {
|
|
6
|
+
id?: string;
|
|
7
|
+
venueIds: string[];
|
|
8
|
+
start?: PartialDate;
|
|
9
|
+
end?: PartialDate;
|
|
10
|
+
status?: EventStatus;
|
|
11
|
+
activities?: Activity[];
|
|
12
|
+
components?: AnyComponent[];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/event/instance/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnlineVenue.d.ts","sourceRoot":"","sources":["../../../src/event/venue/OnlineVenue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC7C,KAAK,EAAE,6BAA6B,CAAC;IAErC,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { BaseVenue } from "./base.js";
|
|
2
|
+
/** Well-known map service NSIDs for autocomplete.
|
|
3
|
+
* Keys follow the pattern `{reverseDomain}.{entityType}`.
|
|
4
|
+
* Values are identifiers assigned by the respective service for this location. */
|
|
5
|
+
export interface PhysicalVenueMapService {
|
|
6
|
+
"org.openstreetmap.node": never;
|
|
7
|
+
"org.openstreetmap.way": never;
|
|
8
|
+
"org.openstreetmap.relation": never;
|
|
9
|
+
"com.google.places": never;
|
|
10
|
+
"com.foursquare": never;
|
|
11
|
+
"com.what3words": never;
|
|
12
|
+
"org.geonames": never;
|
|
13
|
+
"wiki.data": never;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace PhysicalVenue {
|
|
16
|
+
interface Address {
|
|
17
|
+
/** The ISO 3166-1 alpha-2 country code */
|
|
18
|
+
countryCode?: string;
|
|
19
|
+
/** The postal code of the address, if any */
|
|
20
|
+
postalCode?: string;
|
|
21
|
+
/** Full address string (most likely excluding country and postal code) */
|
|
22
|
+
addr?: string;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export interface PhysicalVenue extends BaseVenue {
|
|
26
|
+
$type: "directory.evnt.venue.physical";
|
|
27
|
+
/** The physical address of the venue */
|
|
28
|
+
address?: PhysicalVenue.Address;
|
|
29
|
+
/**
|
|
30
|
+
* A record mapping service NSIDs to location identifiers.
|
|
31
|
+
*
|
|
32
|
+
* Keys are NSIDs following the pattern `{reverseDomain}.{entityType}`,
|
|
33
|
+
* uniquely identifying a map service and the type of entity it represents
|
|
34
|
+
* (e.g. `org.openstreetmap.node`, `org.openstreetmap.way`).
|
|
35
|
+
*
|
|
36
|
+
* Values are the identifier(s) assigned by that service for this location.
|
|
37
|
+
* A string value represents a single identifier; an array represents multiple
|
|
38
|
+
* (e.g., separate IDs for the building and its address point).
|
|
39
|
+
*/
|
|
40
|
+
maps?: Record<(keyof PhysicalVenueMapService | (string & {})), string | string[]>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=PhysicalVenue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhysicalVenue.d.ts","sourceRoot":"","sources":["../../../src/event/venue/PhysicalVenue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC;;kFAEkF;AAClF,MAAM,WAAW,uBAAuB;IACvC,wBAAwB,EAAE,KAAK,CAAC;IAChC,uBAAuB,EAAE,KAAK,CAAC;IAC/B,4BAA4B,EAAE,KAAK,CAAC;IACpC,mBAAmB,EAAE,KAAK,CAAC;IAC3B,gBAAgB,EAAE,KAAK,CAAC;IACxB,gBAAgB,EAAE,KAAK,CAAC;IACxB,cAAc,EAAE,KAAK,CAAC;IACtB,WAAW,EAAE,KAAK,CAAC;CACnB;AAED,yBAAiB,aAAa,CAAC;IAC9B,UAAiB,OAAO;QACvB,0CAA0C;QAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,6CAA6C;QAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,0EAA0E;QAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;KACd;CACD;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC/C,KAAK,EAAE,+BAA+B,CAAC;IAEvC,wCAAwC;IACxC,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;CAClF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownVenue.d.ts","sourceRoot":"","sources":["../../../src/event/venue/UnknownVenue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC9C,KAAK,EAAE,8BAA8B,CAAC;CACtC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Translations } from "../../types/Translations.js";
|
|
2
|
+
export interface BaseVenue {
|
|
3
|
+
/** Event scoped unique identifier of the venue for relating to instances */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The name of the venue */
|
|
6
|
+
name: Translations;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/event/venue/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,SAAS;IACzB,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAC;IAEX,4BAA4B;IAC5B,IAAI,EAAE,YAAY,CAAC;CACnB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OnlineVenue } from "./OnlineVenue.js";
|
|
2
|
+
import type { PhysicalVenue } from "./PhysicalVenue.js";
|
|
3
|
+
import type { UnknownVenue } from "./UnknownVenue.js";
|
|
4
|
+
export type Venue = PhysicalVenue | OnlineVenue | UnknownVenue;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/event/venue/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,KAAK,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from "./types/PartialDate.js";
|
|
2
|
+
export * from "./types/Translations.js";
|
|
3
|
+
export * from "./types/Media.js";
|
|
4
|
+
export * from "./event/event.js";
|
|
5
|
+
export * from "./event/instance/index.js";
|
|
6
|
+
export * from "./event/instance/activity.js";
|
|
7
|
+
export * from "./event/component/index.js";
|
|
8
|
+
export * from "./event/component/LanguagesComponent.js";
|
|
9
|
+
export * from "./event/component/LinkComponent.js";
|
|
10
|
+
export * from "./event/component/SourceComponent.js";
|
|
11
|
+
export * from "./event/component/SplashMediaComponent.js";
|
|
12
|
+
export * from "./event/component/MarkdownComponent.js";
|
|
13
|
+
export * from "./event/component/BlueSkyRichtextComponent.js";
|
|
14
|
+
export * from "./event/venue/index.js";
|
|
15
|
+
export * from "./event/venue/OnlineVenue.js";
|
|
16
|
+
export * from "./event/venue/PhysicalVenue.js";
|
|
17
|
+
export * from "./event/venue/UnknownVenue.js";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./types/PartialDate.js";
|
|
2
|
+
export * from "./types/Translations.js";
|
|
3
|
+
export * from "./types/Media.js";
|
|
4
|
+
export * from "./event/event.js";
|
|
5
|
+
export * from "./event/instance/index.js";
|
|
6
|
+
export * from "./event/instance/activity.js";
|
|
7
|
+
export * from "./event/component/index.js";
|
|
8
|
+
export * from "./event/component/LanguagesComponent.js";
|
|
9
|
+
export * from "./event/component/LinkComponent.js";
|
|
10
|
+
export * from "./event/component/SourceComponent.js";
|
|
11
|
+
export * from "./event/component/SplashMediaComponent.js";
|
|
12
|
+
export * from "./event/component/MarkdownComponent.js";
|
|
13
|
+
export * from "./event/component/BlueSkyRichtextComponent.js";
|
|
14
|
+
export * from "./event/venue/index.js";
|
|
15
|
+
export * from "./event/venue/OnlineVenue.js";
|
|
16
|
+
export * from "./event/venue/PhysicalVenue.js";
|
|
17
|
+
export * from "./event/venue/UnknownVenue.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Translations } from "./Translations.js";
|
|
2
|
+
export interface Media {
|
|
3
|
+
sources: MediaSource[];
|
|
4
|
+
alt?: Translations;
|
|
5
|
+
presentation?: MediaPresentation;
|
|
6
|
+
}
|
|
7
|
+
export interface MediaDimensions {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export interface MediaSource {
|
|
12
|
+
url?: string;
|
|
13
|
+
blob?: {
|
|
14
|
+
$type: "blob";
|
|
15
|
+
ref: {
|
|
16
|
+
$link: string;
|
|
17
|
+
};
|
|
18
|
+
size: number;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface MediaPresentation {
|
|
23
|
+
blurhash?: string;
|
|
24
|
+
dominantColor?: `#${string}`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Media.d.ts","sourceRoot":"","sources":["../../src/types/Media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,KAAK;IACrB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;SACd,CAAC;QACF,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;CACF;AAED,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,IAAI,MAAM,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare namespace PartialDate {
|
|
2
|
+
type TimezoneIdentifier = string;
|
|
3
|
+
export type YearOnly = `${number}[${TimezoneIdentifier}]`;
|
|
4
|
+
export type YearMonth = `${number}-${number}[${TimezoneIdentifier}]`;
|
|
5
|
+
export type YearMonthDay = `${number}-${number}-${number}[${TimezoneIdentifier}]`;
|
|
6
|
+
export type YearMonthDayTime = `${number}-${number}-${number}T${number}:${number}[${TimezoneIdentifier}]`;
|
|
7
|
+
export {};
|
|
8
|
+
}
|
|
9
|
+
export type PartialDate = PartialDate.YearOnly | PartialDate.YearMonth | PartialDate.YearMonthDay | PartialDate.YearMonthDayTime;
|
|
10
|
+
//# sourceMappingURL=PartialDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PartialDate.d.ts","sourceRoot":"","sources":["../../src/types/PartialDate.ts"],"names":[],"mappings":"AAAA,yBAAiB,WAAW,CAAC;IAC5B,KAAK,kBAAkB,GAAG,MAAM,CAAC;IACjC,MAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,kBAAkB,GAAG,CAAC;IAC1D,MAAM,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,kBAAkB,GAAG,CAAC;IACrE,MAAM,MAAM,YAAY,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,kBAAkB,GAAG,CAAC;IAClF,MAAM,MAAM,gBAAgB,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,kBAAkB,GAAG,CAAC;;CAC1G;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Translations.d.ts","sourceRoot":"","sources":["../../src/types/Translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@evnt/types",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Types for OpenEvnt",
|
|
6
|
+
"author": "OpenEvnt",
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"files": [
|
|
9
|
+
"/dist"
|
|
10
|
+
],
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"homepage": "https://evnt.directory",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/openevnt/evnt.git",
|
|
16
|
+
"directory": "packages/types"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"ts-add-js-extension": "^1.6.6",
|
|
20
|
+
"typescript": "^6.0.3"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc && ts-add-js-extension --dir=dist"
|
|
24
|
+
},
|
|
25
|
+
"types": "./dist/index.d.ts"
|
|
26
|
+
}
|