@notidotbot/noti-api-client 1.6.13 → 1.7.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.
@@ -0,0 +1,168 @@
1
+ import { CancelOutWebResponses } from '../types';
2
+ import { WebDataManager } from '../core/manager';
3
+ /**
4
+ * PUBLIC fishing catalogue.
5
+ *
6
+ * Unauthenticated and safe to call from a browser: every endpoint serves static catalogue data —
7
+ * species, rarities, collections, habitats and dock tiers — and nothing per-guild or per-user. There
8
+ * is no `auth` parameter on any method here, which is deliberate rather than an oversight.
9
+ *
10
+ * Namespaced `/minigames/fishing/...` because fishing is the FIRST minigame, not the only one; a
11
+ * second game slots in beside it without a breaking path change for existing consumers.
12
+ *
13
+ * Responses are cached for an hour with `stale-while-revalidate`, so polling this is cheap.
14
+ */
15
+ export declare class APIMinigamesFishing {
16
+ private web;
17
+ constructor(web: WebDataManager);
18
+ /** Index: counts and the list of available endpoints. */
19
+ getOverview(): Promise<import("../types").WebResponse<FishingOverview>>;
20
+ /**
21
+ * The species catalogue.
22
+ *
23
+ * Returned unpaginated — the catalogue is small by design — with `total` alongside so a consumer
24
+ * never has to guess whether it was truncated. Filters are exact-match; an unknown value yields an
25
+ * empty list rather than an error, so you can filter optimistically.
26
+ */
27
+ listSpecies({ rarity, habitat, family, seasonalSet }?: MinigamesFishingFunctionsInput['listSpecies']): Promise<import("../types").WebResponse<FishingSpeciesList>>;
28
+ getSpecies({ speciesId }: MinigamesFishingFunctionsInput['getSpecies']): Promise<import("../types").WebResponse<FishingSpecies>>;
29
+ /**
30
+ * Rarity tiers and their base weights.
31
+ *
32
+ * `mythic` is included with `rollable: false` — it is never obtainable by casting (boss drops,
33
+ * seasonal events and collection completion only), and stating that as data means a consumer does
34
+ * not have to infer it from a missing weight. Per-guild reweights are guild config and are NOT
35
+ * exposed here.
36
+ */
37
+ listRarities(): Promise<import("../types").WebResponse<FishingRarity[]>>;
38
+ /** Collection sets. Derived from the catalogue, so none is gated on an uncatchable species. */
39
+ listCollections(): Promise<import("../types").WebResponse<FishingCollection[]>>;
40
+ /** Habitats and BOTH unlock requirements — the server's dock tier and the player's own level. */
41
+ listHabitats(): Promise<import("../types").WebResponse<FishingHabitat[]>>;
42
+ /** Dock tiers, their build manifests, the component list and the prestige name ladder. */
43
+ getDock(): Promise<import("../types").WebResponse<FishingDock>>;
44
+ }
45
+ export type MinigamesFishingFunctionsInput = {
46
+ 'getOverview': Record<string, never>;
47
+ 'listSpecies': {
48
+ rarity?: FishingRarityName;
49
+ habitat?: FishingHabitatName;
50
+ family?: string;
51
+ seasonalSet?: string;
52
+ };
53
+ 'getSpecies': {
54
+ speciesId: string;
55
+ };
56
+ 'listRarities': Record<string, never>;
57
+ 'listCollections': Record<string, never>;
58
+ 'listHabitats': Record<string, never>;
59
+ 'getDock': Record<string, never>;
60
+ };
61
+ export type MinigamesFishingGetReturnTypes = {
62
+ 'getOverviewRaw': Awaited<ReturnType<APIMinigamesFishing['getOverview']>>;
63
+ 'getOverviewSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['getOverview']>>>;
64
+ 'listSpeciesRaw': Awaited<ReturnType<APIMinigamesFishing['listSpecies']>>;
65
+ 'listSpeciesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['listSpecies']>>>;
66
+ 'getSpeciesRaw': Awaited<ReturnType<APIMinigamesFishing['getSpecies']>>;
67
+ 'getSpeciesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['getSpecies']>>>;
68
+ 'listRaritiesRaw': Awaited<ReturnType<APIMinigamesFishing['listRarities']>>;
69
+ 'listRaritiesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['listRarities']>>>;
70
+ 'listCollectionsRaw': Awaited<ReturnType<APIMinigamesFishing['listCollections']>>;
71
+ 'listCollectionsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['listCollections']>>>;
72
+ 'listHabitatsRaw': Awaited<ReturnType<APIMinigamesFishing['listHabitats']>>;
73
+ 'listHabitatsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['listHabitats']>>>;
74
+ 'getDockRaw': Awaited<ReturnType<APIMinigamesFishing['getDock']>>;
75
+ 'getDockSuccess': CancelOutWebResponses<Awaited<ReturnType<APIMinigamesFishing['getDock']>>>;
76
+ };
77
+ /** Rollable tiers plus `mythic`, which is never obtainable by casting. */
78
+ export type FishingRarityName = 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary' | 'mythic';
79
+ export type FishingHabitatName = 'shallow' | 'deep' | 'reef' | 'abyss';
80
+ export type FishingOverview = {
81
+ game: 'fishing';
82
+ counts: {
83
+ species: number;
84
+ /** Species actually obtainable by casting — excludes mythic and junk. */
85
+ rollableSpecies: number;
86
+ collections: number;
87
+ components: number;
88
+ dockTiers: number;
89
+ badges: number;
90
+ };
91
+ endpoints: string[];
92
+ };
93
+ export type FishingSpecies = {
94
+ id: string;
95
+ name: string;
96
+ rarity: FishingRarityName;
97
+ habitat: FishingHabitatName;
98
+ family: string;
99
+ baseValueCoins: number;
100
+ weightRangeG: {
101
+ min: number;
102
+ max: number;
103
+ };
104
+ /**
105
+ * BOTH gates. The dock tier opens the water for the whole server; the player still needs their own
106
+ * level. Showing only one makes the other look like a bug when it blocks someone.
107
+ */
108
+ requires: {
109
+ dockTier: number;
110
+ playerLevel: number;
111
+ };
112
+ /** Null unless the species belongs to a limited-edition set. */
113
+ seasonal: {
114
+ set: string;
115
+ startsAt: string | null;
116
+ endsAt: string | null;
117
+ } | null;
118
+ /** False for mythic and junk — obtainable, but never from a cast. */
119
+ rollable: boolean;
120
+ };
121
+ export type FishingSpeciesList = {
122
+ species: FishingSpecies[];
123
+ /** Stated so a consumer never has to guess whether the list was truncated. It is not. */
124
+ total: number;
125
+ };
126
+ export type FishingRarity = {
127
+ rarity: FishingRarityName;
128
+ rollable: boolean;
129
+ baseWeight: number;
130
+ /** Share of the roll at default weights. Per-guild overrides are not exposed. */
131
+ approxShare: number;
132
+ speciesCount: number;
133
+ /** Present only on non-rollable tiers, explaining where they actually come from. */
134
+ source?: string;
135
+ };
136
+ export type FishingCollection = {
137
+ id: string;
138
+ type: 'family' | 'habitat';
139
+ speciesIds: string[];
140
+ size: number;
141
+ };
142
+ export type FishingHabitat = {
143
+ habitat: FishingHabitatName;
144
+ requiresDockTier: number;
145
+ requiresPlayerLevel: number;
146
+ speciesCount: number;
147
+ };
148
+ export type FishingDockTier = {
149
+ tier: number;
150
+ /** `{ componentId: quantity }` needed to build this tier. */
151
+ componentManifest: Record<string, number>;
152
+ scrapRequired: number;
153
+ contributorTarget: number;
154
+ buildTimeMinutes: number;
155
+ habitatUnlocked: FishingHabitatName | null;
156
+ };
157
+ export type FishingComponent = {
158
+ id: string;
159
+ name: string;
160
+ band: 'common' | 'uncommon' | 'rare' | 'veryRare';
161
+ };
162
+ export type FishingDock = {
163
+ tiers: FishingDockTier[];
164
+ components: FishingComponent[];
165
+ /** The named part of the ladder. It continues past this with numerals — see `prestigeNote`. */
166
+ prestigeNames: readonly string[];
167
+ prestigeNote: string;
168
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APIMinigamesFishing = void 0;
4
+ // Data.
5
+ /**
6
+ * PUBLIC fishing catalogue.
7
+ *
8
+ * Unauthenticated and safe to call from a browser: every endpoint serves static catalogue data —
9
+ * species, rarities, collections, habitats and dock tiers — and nothing per-guild or per-user. There
10
+ * is no `auth` parameter on any method here, which is deliberate rather than an oversight.
11
+ *
12
+ * Namespaced `/minigames/fishing/...` because fishing is the FIRST minigame, not the only one; a
13
+ * second game slots in beside it without a breaking path change for existing consumers.
14
+ *
15
+ * Responses are cached for an hour with `stale-while-revalidate`, so polling this is cheap.
16
+ */
17
+ class APIMinigamesFishing {
18
+ web;
19
+ constructor(web) {
20
+ this.web = web;
21
+ }
22
+ /** Index: counts and the list of available endpoints. */
23
+ async getOverview() {
24
+ return await this.web.request({
25
+ method: 'GET',
26
+ endpoint: this.web.qp('/minigames/fishing'),
27
+ });
28
+ }
29
+ /**
30
+ * The species catalogue.
31
+ *
32
+ * Returned unpaginated — the catalogue is small by design — with `total` alongside so a consumer
33
+ * never has to guess whether it was truncated. Filters are exact-match; an unknown value yields an
34
+ * empty list rather than an error, so you can filter optimistically.
35
+ */
36
+ async listSpecies({ rarity, habitat, family, seasonalSet } = {}) {
37
+ return await this.web.request({
38
+ method: 'GET',
39
+ endpoint: this.web.qp('/minigames/fishing/species', { rarity, habitat, family, seasonalSet }),
40
+ });
41
+ }
42
+ async getSpecies({ speciesId }) {
43
+ return await this.web.request({
44
+ method: 'GET',
45
+ endpoint: this.web.qp('/minigames/fishing/species/' + speciesId),
46
+ });
47
+ }
48
+ /**
49
+ * Rarity tiers and their base weights.
50
+ *
51
+ * `mythic` is included with `rollable: false` — it is never obtainable by casting (boss drops,
52
+ * seasonal events and collection completion only), and stating that as data means a consumer does
53
+ * not have to infer it from a missing weight. Per-guild reweights are guild config and are NOT
54
+ * exposed here.
55
+ */
56
+ async listRarities() {
57
+ return await this.web.request({
58
+ method: 'GET',
59
+ endpoint: this.web.qp('/minigames/fishing/rarities'),
60
+ });
61
+ }
62
+ /** Collection sets. Derived from the catalogue, so none is gated on an uncatchable species. */
63
+ async listCollections() {
64
+ return await this.web.request({
65
+ method: 'GET',
66
+ endpoint: this.web.qp('/minigames/fishing/collections'),
67
+ });
68
+ }
69
+ /** Habitats and BOTH unlock requirements — the server's dock tier and the player's own level. */
70
+ async listHabitats() {
71
+ return await this.web.request({
72
+ method: 'GET',
73
+ endpoint: this.web.qp('/minigames/fishing/habitats'),
74
+ });
75
+ }
76
+ /** Dock tiers, their build manifests, the component list and the prestige name ladder. */
77
+ async getDock() {
78
+ return await this.web.request({
79
+ method: 'GET',
80
+ endpoint: this.web.qp('/minigames/fishing/dock'),
81
+ });
82
+ }
83
+ }
84
+ exports.APIMinigamesFishing = APIMinigamesFishing;
@@ -23,6 +23,9 @@ import { APIOther } from '../classes/other';
23
23
  import { APIGuild } from '../classes/guild';
24
24
  import { APIEmotes } from '../classes/emotes';
25
25
  import { APIFiles } from '../classes/files';
26
+ import { APIMinigamesFishing } from '../classes/minigamesFishing';
27
+ import { APIGuildFishing } from '../classes/guildFishing';
28
+ import { APIAdminFishing } from '../classes/adminFishing';
26
29
  import { APIAdmin } from '../classes/admin';
27
30
  import { APIVods } from '../classes/vods';
28
31
  import { APIUser } from '../classes/user';
@@ -38,6 +41,9 @@ export declare class WebDataManager {
38
41
  readonly vods: APIVods;
39
42
  readonly files: APIFiles;
40
43
  readonly admin: APIAdmin;
44
+ readonly adminFishing: APIAdminFishing;
45
+ readonly guildFishing: APIGuildFishing;
46
+ readonly minigamesFishing: APIMinigamesFishing;
41
47
  readonly other: APIOther;
42
48
  readonly guild: APIGuild;
43
49
  readonly teams: APITeams;
@@ -28,6 +28,9 @@ const other_1 = require("../classes/other");
28
28
  const guild_1 = require("../classes/guild");
29
29
  const emotes_1 = require("../classes/emotes");
30
30
  const files_1 = require("../classes/files");
31
+ const minigamesFishing_1 = require("../classes/minigamesFishing");
32
+ const guildFishing_1 = require("../classes/guildFishing");
33
+ const adminFishing_1 = require("../classes/adminFishing");
31
34
  const admin_1 = require("../classes/admin");
32
35
  const vods_1 = require("../classes/vods");
33
36
  const user_1 = require("../classes/user");
@@ -42,6 +45,9 @@ class WebDataManager {
42
45
  vods = new vods_1.APIVods(this);
43
46
  files = new files_1.APIFiles(this);
44
47
  admin = new admin_1.APIAdmin(this);
48
+ adminFishing = new adminFishing_1.APIAdminFishing(this);
49
+ guildFishing = new guildFishing_1.APIGuildFishing(this);
50
+ minigamesFishing = new minigamesFishing_1.APIMinigamesFishing(this);
45
51
  other = new other_1.APIOther(this);
46
52
  guild = new guild_1.APIGuild(this);
47
53
  teams = new teams_1.APITeams(this);
package/dist/index.d.ts CHANGED
@@ -3,6 +3,9 @@ export * from './types';
3
3
  export * from './classes/@me';
4
4
  export * from './classes/user';
5
5
  export * from './classes/admin';
6
+ export * from './classes/adminFishing';
7
+ export * from './classes/guildFishing';
8
+ export * from './classes/minigamesFishing';
6
9
  export * from './classes/emotes';
7
10
  export * from './classes/files';
8
11
  export * from './classes/other';
package/dist/index.js CHANGED
@@ -20,6 +20,9 @@ __exportStar(require("./types"), exports);
20
20
  __exportStar(require("./classes/@me"), exports);
21
21
  __exportStar(require("./classes/user"), exports);
22
22
  __exportStar(require("./classes/admin"), exports);
23
+ __exportStar(require("./classes/adminFishing"), exports);
24
+ __exportStar(require("./classes/guildFishing"), exports);
25
+ __exportStar(require("./classes/minigamesFishing"), exports);
23
26
  __exportStar(require("./classes/emotes"), exports);
24
27
  __exportStar(require("./classes/files"), exports);
25
28
  __exportStar(require("./classes/other"), exports);
@@ -47,6 +47,25 @@ export declare const placeholders: {
47
47
  lastTriggerUserId: string;
48
48
  lastTriggerUserMention: string;
49
49
  };
50
+ scheduledMessage: {
51
+ guildName: string;
52
+ guildMemberCount: string;
53
+ guildId: string;
54
+ channelName: string;
55
+ channelId: string;
56
+ nextRun: string;
57
+ lastRun: string;
58
+ date: string;
59
+ time: string;
60
+ };
61
+ rolePanel: {
62
+ guildName: string;
63
+ guildId: string;
64
+ channelName: string;
65
+ channelId: string;
66
+ panelName: string;
67
+ roleCount: string;
68
+ };
50
69
  live: {
51
70
  kick: {
52
71
  platform: string;
@@ -50,6 +50,25 @@ exports.placeholders = {
50
50
  'lastTriggerUserId': '123456789',
51
51
  'lastTriggerUserMention': '<@123456789>',
52
52
  },
53
+ scheduledMessage: {
54
+ 'guildName': 'Example Guild',
55
+ 'guildMemberCount': '123',
56
+ 'guildId': '123456789',
57
+ 'channelName': 'Example Channel',
58
+ 'channelId': '123456789',
59
+ 'nextRun': '<t:164099520:R>',
60
+ 'lastRun': '<t:164099520:R>',
61
+ 'date': '05/08/2026',
62
+ 'time': '14:30',
63
+ },
64
+ rolePanel: {
65
+ 'guildName': 'Example Guild',
66
+ 'guildId': '123456789',
67
+ 'channelName': 'Example Channel',
68
+ 'channelId': '123456789',
69
+ 'panelName': 'Example Panel',
70
+ 'roleCount': '5',
71
+ },
53
72
  live: {
54
73
  kick: {
55
74
  'platform': 'Kick',
@@ -20,6 +20,9 @@ export declare const GuildRolePanelZod: {
20
20
  messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
21
  maxRoles: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
22
22
  logChannelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ webhookEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
24
+ webhookUsername: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
25
+ webhookAvatarUrl: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
23
26
  requireAccountAgeDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
24
27
  requireJoinAgeDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
28
  requireMessageCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -71,6 +74,9 @@ export declare const GuildRolePanelZod: {
71
74
  }>;
72
75
  maxRoles: z.ZodNullable<z.ZodNumber>;
73
76
  logChannelId: z.ZodNullable<z.ZodString>;
77
+ webhookEnabled: z.ZodDefault<z.ZodBoolean>;
78
+ webhookUsername: z.ZodDefault<z.ZodNullable<z.ZodString>>;
79
+ webhookAvatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
74
80
  requireAccountAgeDays: z.ZodNullable<z.ZodNumber>;
75
81
  requireJoinAgeDays: z.ZodNullable<z.ZodNumber>;
76
82
  requireMessageCount: z.ZodNullable<z.ZodNumber>;
@@ -16,6 +16,10 @@ const mainSchemaFields = {
16
16
  assignMode: RolePanelAssignModeEnum,
17
17
  maxRoles: zod_2.z.number().min(1).nullable(),
18
18
  logChannelId: zod_1.SnowFlake.nullable(),
19
+ // Premium Plus (RolePanelWebhooks): post the panel under a custom webhook identity.
20
+ webhookEnabled: zod_2.z.boolean().default(false),
21
+ webhookUsername: zod_2.z.string().min(1).max(80).nullable().default(null),
22
+ webhookAvatarUrl: zod_2.z.string().url().max(2000).nullable().default(null),
19
23
  requireAccountAgeDays: zod_2.z.number().min(0).nullable(),
20
24
  requireJoinAgeDays: zod_2.z.number().min(0).nullable(),
21
25
  requireMessageCount: zod_2.z.number().min(0).nullable(),