@mana-app/types 0.0.15 → 0.0.17

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.
@@ -69,16 +69,18 @@ export interface AdditionalInfoBase<TType extends AdditionalInfoType = Additiona
69
69
  readonly type: TType;
70
70
  id: string;
71
71
  title: string;
72
+ }
73
+ export interface AdditionalInfoHasMore {
72
74
  hasMore: boolean;
73
75
  }
74
76
  export type AdditionalInfoSection = StaffSection | HighlightsSection | CharactersSection | LinksSection | TagsSection;
75
- export type StaffSection = AdditionalInfoBase<AdditionalInfoType.Staff> & {
77
+ export type StaffSection = AdditionalInfoBase<AdditionalInfoType.Staff> & AdditionalInfoHasMore & {
76
78
  items: StaffItem[];
77
79
  };
78
- export type HighlightsSection = AdditionalInfoBase<AdditionalInfoType.Highlights> & {
80
+ export type HighlightsSection = AdditionalInfoBase<AdditionalInfoType.Highlights> & AdditionalInfoHasMore & {
79
81
  items: SimpleHighlight[];
80
82
  };
81
- export type CharactersSection = AdditionalInfoBase<AdditionalInfoType.Characters> & {
83
+ export type CharactersSection = AdditionalInfoBase<AdditionalInfoType.Characters> & AdditionalInfoHasMore & {
82
84
  items: CharacterItem[];
83
85
  };
84
86
  export type LinksSection = AdditionalInfoBase<AdditionalInfoType.Links> & {
@@ -113,15 +115,48 @@ export type LinkItem = AdditionalInfoItemBase<AdditionalInfoType.Links> & {
113
115
  };
114
116
  export type TagItem = AdditionalInfoItemBase<AdditionalInfoType.Tags> & Tag;
115
117
  export type AdditionalInfoSectionItem = StaffItem | CharacterItem | SimpleHighlight | LinkItem | TagItem;
116
- export type WithoutType<T extends {
118
+ export type WithoutType<T> = T extends {
117
119
  readonly type: any;
118
- }> = Omit<T, "type">;
119
- export declare function staffItem(input: WithoutType<StaffItem>): StaffItem;
120
- export declare function characterItem(input: WithoutType<CharacterItem>): CharacterItem;
121
- export declare function linkItem(input: WithoutType<LinkItem>): LinkItem;
122
- export declare function tagItem(input: WithoutType<TagItem>): TagItem;
123
- export declare function staffSection(input: WithoutType<StaffSection>): StaffSection;
124
- export declare function highlightsSection(input: WithoutType<HighlightsSection>): HighlightsSection;
125
- export declare function charactersSection(input: WithoutType<CharactersSection>): CharactersSection;
126
- export declare function linksSection(input: WithoutType<LinksSection>): LinksSection;
127
- export declare function tagsSection(input: WithoutType<TagsSection>): TagsSection;
120
+ } ? Omit<T, "type"> : T;
121
+ export declare const staff: {
122
+ item(input: WithoutType<StaffItem>): StaffItem;
123
+ section(input: WithoutType<StaffSection>): StaffSection;
124
+ };
125
+ export declare const highlights: {
126
+ item(input: SimpleHighlight): SimpleHighlight;
127
+ section(input: WithoutType<HighlightsSection>): HighlightsSection;
128
+ };
129
+ export declare const characters: {
130
+ item(input: WithoutType<CharacterItem>): CharacterItem;
131
+ section(input: WithoutType<CharactersSection>): CharactersSection;
132
+ };
133
+ export declare const links: {
134
+ item(input: WithoutType<LinkItem>): LinkItem;
135
+ section(input: WithoutType<LinksSection>): LinksSection;
136
+ };
137
+ export declare const tags: {
138
+ item(input: WithoutType<TagItem>): TagItem;
139
+ section(input: WithoutType<TagsSection>): TagsSection;
140
+ };
141
+ export declare const additionalInfo: {
142
+ staff: {
143
+ item(input: WithoutType<StaffItem>): StaffItem;
144
+ section(input: WithoutType<StaffSection>): StaffSection;
145
+ };
146
+ highlights: {
147
+ item(input: SimpleHighlight): SimpleHighlight;
148
+ section(input: WithoutType<HighlightsSection>): HighlightsSection;
149
+ };
150
+ characters: {
151
+ item(input: WithoutType<CharacterItem>): CharacterItem;
152
+ section(input: WithoutType<CharactersSection>): CharactersSection;
153
+ };
154
+ links: {
155
+ item(input: WithoutType<LinkItem>): LinkItem;
156
+ section(input: WithoutType<LinksSection>): LinksSection;
157
+ };
158
+ tags: {
159
+ item(input: WithoutType<TagItem>): TagItem;
160
+ section(input: WithoutType<TagsSection>): TagsSection;
161
+ };
162
+ };
@@ -1,15 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdditionalInfoType = void 0;
4
- exports.staffItem = staffItem;
5
- exports.characterItem = characterItem;
6
- exports.linkItem = linkItem;
7
- exports.tagItem = tagItem;
8
- exports.staffSection = staffSection;
9
- exports.highlightsSection = highlightsSection;
10
- exports.charactersSection = charactersSection;
11
- exports.linksSection = linksSection;
12
- exports.tagsSection = tagsSection;
3
+ exports.additionalInfo = exports.tags = exports.links = exports.characters = exports.highlights = exports.staff = exports.AdditionalInfoType = void 0;
13
4
  var AdditionalInfoType;
14
5
  (function (AdditionalInfoType) {
15
6
  AdditionalInfoType[AdditionalInfoType["Staff"] = 1] = "Staff";
@@ -19,30 +10,53 @@ var AdditionalInfoType;
19
10
  AdditionalInfoType[AdditionalInfoType["Tags"] = 5] = "Tags";
20
11
  })(AdditionalInfoType || (exports.AdditionalInfoType = AdditionalInfoType = {}));
21
12
  ;
22
- function staffItem(input) {
23
- return Object.assign({ type: AdditionalInfoType.Staff }, input);
24
- }
25
- function characterItem(input) {
26
- return Object.assign({ type: AdditionalInfoType.Characters }, input);
27
- }
28
- function linkItem(input) {
29
- return Object.assign({ type: AdditionalInfoType.Links }, input);
30
- }
31
- function tagItem(input) {
32
- return Object.assign({ type: AdditionalInfoType.Tags }, input);
33
- }
34
- function staffSection(input) {
35
- return Object.assign({ type: AdditionalInfoType.Staff }, input);
36
- }
37
- function highlightsSection(input) {
38
- return Object.assign({ type: AdditionalInfoType.Highlights }, input);
39
- }
40
- function charactersSection(input) {
41
- return Object.assign({ type: AdditionalInfoType.Characters }, input);
42
- }
43
- function linksSection(input) {
44
- return Object.assign({ type: AdditionalInfoType.Links }, input);
45
- }
46
- function tagsSection(input) {
47
- return Object.assign({ type: AdditionalInfoType.Tags }, input);
48
- }
13
+ function withType(type, input) {
14
+ return Object.assign({ type }, input);
15
+ }
16
+ exports.staff = {
17
+ item(input) {
18
+ return withType(AdditionalInfoType.Staff, input);
19
+ },
20
+ section(input) {
21
+ return withType(AdditionalInfoType.Staff, input);
22
+ },
23
+ };
24
+ exports.highlights = {
25
+ item(input) {
26
+ return input;
27
+ },
28
+ section(input) {
29
+ return withType(AdditionalInfoType.Highlights, input);
30
+ },
31
+ };
32
+ exports.characters = {
33
+ item(input) {
34
+ return withType(AdditionalInfoType.Characters, input);
35
+ },
36
+ section(input) {
37
+ return withType(AdditionalInfoType.Characters, input);
38
+ },
39
+ };
40
+ exports.links = {
41
+ item(input) {
42
+ return withType(AdditionalInfoType.Links, input);
43
+ },
44
+ section(input) {
45
+ return withType(AdditionalInfoType.Links, input);
46
+ },
47
+ };
48
+ exports.tags = {
49
+ item(input) {
50
+ return withType(AdditionalInfoType.Tags, input);
51
+ },
52
+ section(input) {
53
+ return withType(AdditionalInfoType.Tags, input);
54
+ },
55
+ };
56
+ exports.additionalInfo = {
57
+ staff: exports.staff,
58
+ highlights: exports.highlights,
59
+ characters: exports.characters,
60
+ links: exports.links,
61
+ tags: exports.tags,
62
+ };
@@ -18,10 +18,10 @@ export type Tag = BaseInteractable & {
18
18
  /**
19
19
  * A boolean indicating the titles marked with this tag contain Adult Content
20
20
  */
21
- nsfw?: boolean;
21
+ isNsfw?: boolean;
22
22
  /**
23
23
  * The URL of an image to display with this tag
24
24
  */
25
25
  image?: string;
26
- noninteractive?: boolean;
26
+ isNonInteractive?: boolean;
27
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mana-app/types",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {