@notidotbot/noti-api-client 1.5.3 → 1.5.4

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.
@@ -8,6 +8,12 @@ export declare class APIAdmin {
8
8
  getEmailList({ auth }: AdminFunctionsInput['getEmailList']): Promise<import("../types").WebResponse<EmailList>>;
9
9
  getAnalytics<T extends string = string>({ auth, lookback }: AdminFunctionsInput['getAnalytics']): Promise<import("../types").WebResponse<Analytics<T, string>>>;
10
10
  stripeCharge({ auth, guildId, subscriptionId, amountCents, description, dueDays }: AdminFunctionsInput['stripeCharge']): Promise<import("../types").WebResponse<AdminStripeChargeResponse>>;
11
+ getFixUrlRules({ auth }: AdminFunctionsInput['getFixUrlRules']): Promise<import("../types").WebResponse<FixUrlRule[]>>;
12
+ createFixUrlRule({ auth, original, replacement, enabled }: AdminFunctionsInput['createFixUrlRule']): Promise<import("../types").WebResponse<FixUrlRule>>;
13
+ updateFixUrlRule({ auth, ruleId, original, replacement, enabled }: AdminFunctionsInput['updateFixUrlRule']): Promise<import("../types").WebResponse<FixUrlRule>>;
14
+ deleteFixUrlRule({ auth, ruleId }: AdminFunctionsInput['deleteFixUrlRule']): Promise<import("../types").WebResponse<string>>;
15
+ getNotificationProviders({ auth }: AdminFunctionsInput['getNotificationProviders']): Promise<import("../types").WebResponse<NotificationProviderStatus[]>>;
16
+ setNotificationProvider({ auth, name, enabled }: AdminFunctionsInput['setNotificationProvider']): Promise<import("../types").WebResponse<NotificationProvider>>;
11
17
  }
12
18
  export type AdminFunctionsInput = {
13
19
  'getAdmin': {
@@ -28,6 +34,34 @@ export type AdminFunctionsInput = {
28
34
  description?: string;
29
35
  dueDays?: number;
30
36
  };
37
+ 'getFixUrlRules': {
38
+ auth: string;
39
+ };
40
+ 'createFixUrlRule': {
41
+ auth: string;
42
+ original: string;
43
+ replacement: string;
44
+ enabled?: boolean;
45
+ };
46
+ 'updateFixUrlRule': {
47
+ auth: string;
48
+ ruleId: string;
49
+ original?: string;
50
+ replacement?: string;
51
+ enabled?: boolean;
52
+ };
53
+ 'deleteFixUrlRule': {
54
+ auth: string;
55
+ ruleId: string;
56
+ };
57
+ 'getNotificationProviders': {
58
+ auth: string;
59
+ };
60
+ 'setNotificationProvider': {
61
+ auth: string;
62
+ name: NotificationProviderName;
63
+ enabled: boolean;
64
+ };
31
65
  };
32
66
  export type AdminGetReturnTypes = {
33
67
  'getAdminRaw': Awaited<ReturnType<APIAdmin['getAdmin']>>;
@@ -38,6 +72,38 @@ export type AdminGetReturnTypes = {
38
72
  'getAnalyticsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getAnalytics']>>>;
39
73
  'stripeChargeRaw': Awaited<ReturnType<APIAdmin['stripeCharge']>>;
40
74
  'stripeChargeSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['stripeCharge']>>>;
75
+ 'getFixUrlRulesRaw': Awaited<ReturnType<APIAdmin['getFixUrlRules']>>;
76
+ 'getFixUrlRulesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getFixUrlRules']>>>;
77
+ 'createFixUrlRuleRaw': Awaited<ReturnType<APIAdmin['createFixUrlRule']>>;
78
+ 'createFixUrlRuleSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['createFixUrlRule']>>>;
79
+ 'updateFixUrlRuleRaw': Awaited<ReturnType<APIAdmin['updateFixUrlRule']>>;
80
+ 'updateFixUrlRuleSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['updateFixUrlRule']>>>;
81
+ 'deleteFixUrlRuleRaw': Awaited<ReturnType<APIAdmin['deleteFixUrlRule']>>;
82
+ 'deleteFixUrlRuleSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['deleteFixUrlRule']>>>;
83
+ 'getNotificationProvidersRaw': Awaited<ReturnType<APIAdmin['getNotificationProviders']>>;
84
+ 'getNotificationProvidersSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['getNotificationProviders']>>>;
85
+ 'setNotificationProviderRaw': Awaited<ReturnType<APIAdmin['setNotificationProvider']>>;
86
+ 'setNotificationProviderSuccess': CancelOutWebResponses<Awaited<ReturnType<APIAdmin['setNotificationProvider']>>>;
87
+ };
88
+ export type NotificationProviderName = 'kick' | 'twitch' | 'rumble' | 'tiktok' | 'youtube' | 'vods' | 'clips' | 'gameDeal' | 'gameChangelog' | 'roblox';
89
+ export type FixUrlRule = {
90
+ dbId: string;
91
+ original: string;
92
+ replacement: string;
93
+ enabled: boolean;
94
+ createdAt: Date;
95
+ updatedAt: Date;
96
+ };
97
+ export type NotificationProvider = {
98
+ dbId: string;
99
+ name: string;
100
+ enabled: boolean;
101
+ updatedAt: Date;
102
+ };
103
+ export type NotificationProviderStatus = {
104
+ name: NotificationProviderName;
105
+ enabled: boolean;
106
+ updatedAt: Date | null;
41
107
  };
42
108
  export type EmailList = {
43
109
  userId: string;
@@ -40,5 +40,41 @@ class APIAdmin {
40
40
  endpoint: this.web.qp('/admin/stripe/charge'),
41
41
  });
42
42
  }
43
+ async getFixUrlRules({ auth }) {
44
+ return await this.web.request({
45
+ method: 'GET', auth,
46
+ endpoint: this.web.qp('/admin/fixurl/rules'),
47
+ });
48
+ }
49
+ async createFixUrlRule({ auth, original, replacement, enabled }) {
50
+ return await this.web.request({
51
+ method: 'POST', auth, body: { original, replacement, enabled },
52
+ endpoint: this.web.qp('/admin/fixurl/rules'),
53
+ });
54
+ }
55
+ async updateFixUrlRule({ auth, ruleId, original, replacement, enabled }) {
56
+ return await this.web.request({
57
+ method: 'PATCH', auth, body: { original, replacement, enabled },
58
+ endpoint: this.web.qp('/admin/fixurl/rules/' + ruleId),
59
+ });
60
+ }
61
+ async deleteFixUrlRule({ auth, ruleId }) {
62
+ return await this.web.request({
63
+ method: 'DELETE', auth,
64
+ endpoint: this.web.qp('/admin/fixurl/rules/' + ruleId),
65
+ });
66
+ }
67
+ async getNotificationProviders({ auth }) {
68
+ return await this.web.request({
69
+ method: 'GET', auth,
70
+ endpoint: this.web.qp('/admin/providers'),
71
+ });
72
+ }
73
+ async setNotificationProvider({ auth, name, enabled }) {
74
+ return await this.web.request({
75
+ method: 'PATCH', auth, body: { enabled },
76
+ endpoint: this.web.qp('/admin/providers/' + name),
77
+ });
78
+ }
43
79
  }
44
80
  exports.APIAdmin = APIAdmin;
@@ -0,0 +1,123 @@
1
+ import { WebDataManager } from '../core/manager';
2
+ import { CancelOutWebResponses } from '../types';
3
+ export declare class APIGuildFixURL {
4
+ private web;
5
+ constructor(web: WebDataManager);
6
+ getConfig({ auth, guildId }: GuildFixURLFunctionsInput['getConfig']): Promise<import("../types").WebResponse<GuildFixUrlConfig>>;
7
+ setEnabled({ auth, guildId, enabled }: GuildFixURLFunctionsInput['setEnabled']): Promise<import("../types").WebResponse<string>>;
8
+ getGlobalRules({ auth, guildId }: GuildFixURLFunctionsInput['getGlobalRules']): Promise<import("../types").WebResponse<GuildFixUrlGlobalRule[]>>;
9
+ addBlacklistedChannel({ auth, guildId, channelId }: GuildFixURLFunctionsInput['addBlacklistedChannel']): Promise<import("../types").WebResponse<string>>;
10
+ removeBlacklistedChannel({ auth, guildId, channelId }: GuildFixURLFunctionsInput['removeBlacklistedChannel']): Promise<import("../types").WebResponse<string>>;
11
+ setWebhookMode({ auth, guildId, enabled }: GuildFixURLFunctionsInput['setWebhookMode']): Promise<import("../types").WebResponse<string>>;
12
+ getWebhookCredentials({ auth, guildId }: GuildFixURLFunctionsInput['getWebhookCredentials']): Promise<import("../types").WebResponse<GuildFixUrlWebhookCredentials>>;
13
+ setWebhookCredentials({ auth, guildId, webhookId, webhookToken }: GuildFixURLFunctionsInput['setWebhookCredentials']): Promise<import("../types").WebResponse<string>>;
14
+ createCustomRule({ auth, guildId, original, replacement }: GuildFixURLFunctionsInput['createCustomRule']): Promise<import("../types").WebResponse<string>>;
15
+ updateCustomRule({ auth, guildId, ruleId, original, replacement, enabled }: GuildFixURLFunctionsInput['updateCustomRule']): Promise<import("../types").WebResponse<string>>;
16
+ deleteCustomRule({ auth, guildId, ruleId }: GuildFixURLFunctionsInput['deleteCustomRule']): Promise<import("../types").WebResponse<string>>;
17
+ }
18
+ export type GuildFixURLFunctionsInput = {
19
+ 'getConfig': {
20
+ auth: string;
21
+ guildId: string;
22
+ };
23
+ 'setEnabled': {
24
+ auth: string;
25
+ guildId: string;
26
+ enabled: boolean;
27
+ };
28
+ 'getGlobalRules': {
29
+ auth: string;
30
+ guildId: string;
31
+ };
32
+ 'addBlacklistedChannel': {
33
+ auth: string;
34
+ guildId: string;
35
+ channelId: string;
36
+ };
37
+ 'removeBlacklistedChannel': {
38
+ auth: string;
39
+ guildId: string;
40
+ channelId: string;
41
+ };
42
+ 'setWebhookMode': {
43
+ auth: string;
44
+ guildId: string;
45
+ enabled: boolean;
46
+ };
47
+ 'getWebhookCredentials': {
48
+ auth: string;
49
+ guildId: string;
50
+ };
51
+ 'setWebhookCredentials': {
52
+ auth: string;
53
+ guildId: string;
54
+ webhookId?: string | null;
55
+ webhookToken?: string | null;
56
+ };
57
+ 'createCustomRule': {
58
+ auth: string;
59
+ guildId: string;
60
+ original: string;
61
+ replacement: string;
62
+ };
63
+ 'updateCustomRule': {
64
+ auth: string;
65
+ guildId: string;
66
+ ruleId: string;
67
+ original?: string;
68
+ replacement?: string;
69
+ enabled?: boolean;
70
+ };
71
+ 'deleteCustomRule': {
72
+ auth: string;
73
+ guildId: string;
74
+ ruleId: string;
75
+ };
76
+ };
77
+ export type GuildFixURLReturnTypes = {
78
+ 'getConfigRaw': Awaited<ReturnType<APIGuildFixURL['getConfig']>>;
79
+ 'getConfigSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['getConfig']>>>;
80
+ 'setEnabledRaw': Awaited<ReturnType<APIGuildFixURL['setEnabled']>>;
81
+ 'setEnabledSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['setEnabled']>>>;
82
+ 'getGlobalRulesRaw': Awaited<ReturnType<APIGuildFixURL['getGlobalRules']>>;
83
+ 'getGlobalRulesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['getGlobalRules']>>>;
84
+ 'addBlacklistedChannelRaw': Awaited<ReturnType<APIGuildFixURL['addBlacklistedChannel']>>;
85
+ 'addBlacklistedChannelSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['addBlacklistedChannel']>>>;
86
+ 'removeBlacklistedChannelRaw': Awaited<ReturnType<APIGuildFixURL['removeBlacklistedChannel']>>;
87
+ 'removeBlacklistedChannelSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['removeBlacklistedChannel']>>>;
88
+ 'setWebhookModeRaw': Awaited<ReturnType<APIGuildFixURL['setWebhookMode']>>;
89
+ 'setWebhookModeSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['setWebhookMode']>>>;
90
+ 'getWebhookCredentialsRaw': Awaited<ReturnType<APIGuildFixURL['getWebhookCredentials']>>;
91
+ 'getWebhookCredentialsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['getWebhookCredentials']>>>;
92
+ 'setWebhookCredentialsRaw': Awaited<ReturnType<APIGuildFixURL['setWebhookCredentials']>>;
93
+ 'setWebhookCredentialsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['setWebhookCredentials']>>>;
94
+ 'createCustomRuleRaw': Awaited<ReturnType<APIGuildFixURL['createCustomRule']>>;
95
+ 'createCustomRuleSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['createCustomRule']>>>;
96
+ 'updateCustomRuleRaw': Awaited<ReturnType<APIGuildFixURL['updateCustomRule']>>;
97
+ 'updateCustomRuleSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['updateCustomRule']>>>;
98
+ 'deleteCustomRuleRaw': Awaited<ReturnType<APIGuildFixURL['deleteCustomRule']>>;
99
+ 'deleteCustomRuleSuccess': CancelOutWebResponses<Awaited<ReturnType<APIGuildFixURL['deleteCustomRule']>>>;
100
+ };
101
+ export type GuildFixUrlRule = {
102
+ dbId: string;
103
+ original: string;
104
+ replacement: string;
105
+ enabled: boolean;
106
+ guildFixUrlId: string;
107
+ };
108
+ export type GuildFixUrlConfig = {
109
+ enabled: boolean;
110
+ blacklistedChannels: string[];
111
+ webhookEnabled: boolean;
112
+ customRules: GuildFixUrlRule[];
113
+ canUseWebhook: boolean;
114
+ canUseCustomRules: boolean;
115
+ };
116
+ export type GuildFixUrlGlobalRule = {
117
+ original: string;
118
+ replacement: string;
119
+ };
120
+ export type GuildFixUrlWebhookCredentials = {
121
+ webhookId: string | null;
122
+ webhookToken: string | null;
123
+ };
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APIGuildFixURL = void 0;
4
+ // Data.
5
+ class APIGuildFixURL {
6
+ web;
7
+ constructor(web) {
8
+ this.web = web;
9
+ }
10
+ // Methods.
11
+ async getConfig({ auth, guildId }) {
12
+ return await this.web.request({
13
+ method: 'GET', auth,
14
+ endpoint: this.web.qp('/data/fixurl/' + guildId),
15
+ });
16
+ }
17
+ async setEnabled({ auth, guildId, enabled }) {
18
+ return await this.web.request({
19
+ method: 'PATCH', auth, body: { enabled },
20
+ endpoint: this.web.qp('/data/fixurl/' + guildId),
21
+ });
22
+ }
23
+ async getGlobalRules({ auth, guildId }) {
24
+ return await this.web.request({
25
+ method: 'GET', auth,
26
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/global-rules'),
27
+ });
28
+ }
29
+ async addBlacklistedChannel({ auth, guildId, channelId }) {
30
+ return await this.web.request({
31
+ method: 'POST', auth, body: { channelId },
32
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/blacklist'),
33
+ });
34
+ }
35
+ async removeBlacklistedChannel({ auth, guildId, channelId }) {
36
+ return await this.web.request({
37
+ method: 'DELETE', auth,
38
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/blacklist/' + channelId),
39
+ });
40
+ }
41
+ async setWebhookMode({ auth, guildId, enabled }) {
42
+ return await this.web.request({
43
+ method: 'PATCH', auth, body: { enabled },
44
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/webhook'),
45
+ });
46
+ }
47
+ async getWebhookCredentials({ auth, guildId }) {
48
+ return await this.web.request({
49
+ method: 'GET', auth,
50
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/webhook/credentials'),
51
+ });
52
+ }
53
+ async setWebhookCredentials({ auth, guildId, webhookId, webhookToken }) {
54
+ return await this.web.request({
55
+ method: 'PUT', auth, body: { webhookId, webhookToken },
56
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/webhook/credentials'),
57
+ });
58
+ }
59
+ async createCustomRule({ auth, guildId, original, replacement }) {
60
+ return await this.web.request({
61
+ method: 'POST', auth, body: { original, replacement },
62
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/rules'),
63
+ });
64
+ }
65
+ async updateCustomRule({ auth, guildId, ruleId, original, replacement, enabled }) {
66
+ return await this.web.request({
67
+ method: 'PATCH', auth, body: { original, replacement, enabled },
68
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/rules/' + ruleId),
69
+ });
70
+ }
71
+ async deleteCustomRule({ auth, guildId, ruleId }) {
72
+ return await this.web.request({
73
+ method: 'DELETE', auth,
74
+ endpoint: this.web.qp('/data/fixurl/' + guildId + '/rules/' + ruleId),
75
+ });
76
+ }
77
+ }
78
+ exports.APIGuildFixURL = APIGuildFixURL;
@@ -27,6 +27,8 @@ export declare class APIPremium {
27
27
  * Authenticated with the shared backend secret — pass `auth` as `'Bearer ' + NOTI_BACKEND_SECRET`.
28
28
  */
29
29
  syncSupportRolesFor({ auth, discordId }: PremiumFunctionsInput['syncSupportRolesFor']): Promise<import("../types").WebResponse<SyncSupportRolesResult>>;
30
+ getSupportPremiumGuilds({ auth }: PremiumFunctionsInput['getSupportPremiumGuilds']): Promise<import("../types").WebResponse<SupportPremiumGuilds>>;
31
+ getSupportPremiumGuild({ auth, guildId }: PremiumFunctionsInput['getSupportPremiumGuild']): Promise<import("../types").WebResponse<SupportPremiumGuild>>;
30
32
  }
31
33
  export type PremiumFunctionsInput<T extends 'guild' | 'user' = never, I extends boolean = never> = {
32
34
  'getPremumData': {
@@ -86,6 +88,13 @@ export type PremiumFunctionsInput<T extends 'guild' | 'user' = never, I extends
86
88
  auth: string;
87
89
  discordId: string;
88
90
  };
91
+ 'getSupportPremiumGuilds': {
92
+ auth: string;
93
+ };
94
+ 'getSupportPremiumGuild': {
95
+ auth: string;
96
+ guildId: string;
97
+ };
89
98
  };
90
99
  export type PremiumReturnTypes = {
91
100
  'getPremumDataRaw': Awaited<ReturnType<APIPremium['getPremumData']>>;
@@ -116,6 +125,10 @@ export type PremiumReturnTypes = {
116
125
  'syncSupportRolesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPremium['syncSupportRoles']>>>;
117
126
  'syncSupportRolesForRaw': Awaited<ReturnType<APIPremium['syncSupportRolesFor']>>;
118
127
  'syncSupportRolesForSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPremium['syncSupportRolesFor']>>>;
128
+ 'getSupportPremiumGuildsRaw': Awaited<ReturnType<APIPremium['getSupportPremiumGuilds']>>;
129
+ 'getSupportPremiumGuildsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPremium['getSupportPremiumGuilds']>>>;
130
+ 'getSupportPremiumGuildRaw': Awaited<ReturnType<APIPremium['getSupportPremiumGuild']>>;
131
+ 'getSupportPremiumGuildSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPremium['getSupportPremiumGuild']>>>;
119
132
  };
120
133
  export type CreateCheckoutSessionBody<T extends 'guild' | 'user'> = T extends 'guild' ? {
121
134
  email: string;
@@ -176,7 +189,7 @@ export type UpdatePremiumData<T extends 'guild' | 'user'> = T extends 'guild' ?
176
189
  newPlanId?: string;
177
190
  newBitfield?: string | null;
178
191
  } : never;
179
- export type ListOfDefaultItems = Partial<Omit<NonNullable<DeepRequired<Guild>['premium']>, 'tier' | 'enabled' | 'dbId' | 'guildId'>>;
192
+ export type ListOfDefaultItems = Partial<Omit<NonNullable<DeepRequired<Guild>['premium']>, 'tier' | 'enabled' | 'assignedAt' | 'updatedAt' | 'dbId' | 'guildId'>>;
180
193
  export type RemoveAdditional<T> = T extends `additional${infer Rest}` ? Rest : T;
181
194
  export type JoinWithDefault<T> = T extends string ? `default${T}` : never;
182
195
  export type SliceAdditionalFromItem = {
@@ -257,6 +270,23 @@ export type SyncSupportRolesResult = {
257
270
  removed: string[];
258
271
  roles: string[];
259
272
  };
273
+ export type SupportPremiumGuildRow = {
274
+ guildId: string;
275
+ guildName: string | null;
276
+ tier: string;
277
+ assignedAt: Date;
278
+ };
279
+ export type SupportPremiumGuilds = {
280
+ premium: SupportPremiumGuildRow[];
281
+ premiumPlus: SupportPremiumGuildRow[];
282
+ };
283
+ export type SupportPremiumGuild = {
284
+ guildId: string;
285
+ guildName: string | null;
286
+ tier: string;
287
+ isPremiumPlus: boolean;
288
+ assignedAt: Date;
289
+ };
260
290
  export type ChangeSubscriptionAddonsBody = {
261
291
  subscriptionId: string;
262
292
  newAddons: {
@@ -108,5 +108,17 @@ class APIPremium {
108
108
  endpoint: this.web.qp('/support/premium/sync/' + discordId),
109
109
  });
110
110
  }
111
+ async getSupportPremiumGuilds({ auth }) {
112
+ return await this.web.request({
113
+ method: 'GET', auth,
114
+ endpoint: this.web.qp('/support/premium/guilds'),
115
+ });
116
+ }
117
+ async getSupportPremiumGuild({ auth, guildId }) {
118
+ return await this.web.request({
119
+ method: 'GET', auth,
120
+ endpoint: this.web.qp('/support/premium/guilds/' + guildId),
121
+ });
122
+ }
111
123
  }
112
124
  exports.APIPremium = APIPremium;
@@ -1,5 +1,6 @@
1
1
  import { APIPlatformAction } from '../classes/guildPlatformAction';
2
2
  import { APIGuildStarboard } from '../classes/guildStarboard';
3
+ import { APIGuildFixURL } from '../classes/guildFixURL';
3
4
  import { APIGuildPlatform } from '../classes/guildPlatform';
4
5
  import { APIGuildGiveaway } from '../classes/guildGiveaway';
5
6
  import { APIGuildDrops } from '../classes/guildDrops';
@@ -48,6 +49,7 @@ export declare class WebDataManager {
48
49
  readonly guildGiveaway: APIGuildGiveaway;
49
50
  readonly guildStarboard: APIGuildStarboard;
50
51
  readonly guildPlatformAction: APIPlatformAction;
52
+ readonly guildFixURL: APIGuildFixURL;
51
53
  readonly games: APIGames;
52
54
  constructor(url: string, options?: {
53
55
  log?: boolean;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.WebDataManager = void 0;
7
7
  const guildPlatformAction_1 = require("../classes/guildPlatformAction");
8
8
  const guildStarboard_1 = require("../classes/guildStarboard");
9
+ const guildFixURL_1 = require("../classes/guildFixURL");
9
10
  const guildPlatform_1 = require("../classes/guildPlatform");
10
11
  const guildGiveaway_1 = require("../classes/guildGiveaway");
11
12
  const guildDrops_1 = require("../classes/guildDrops");
@@ -52,6 +53,7 @@ class WebDataManager {
52
53
  guildGiveaway = new guildGiveaway_1.APIGuildGiveaway(this);
53
54
  guildStarboard = new guildStarboard_1.APIGuildStarboard(this);
54
55
  guildPlatformAction = new guildPlatformAction_1.APIPlatformAction(this);
56
+ guildFixURL = new guildFixURL_1.APIGuildFixURL(this);
55
57
  games = new games_1.APIGames(this);
56
58
  constructor(url, options) {
57
59
  this.url = url;
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export * from './classes/guildPlatform';
21
21
  export * from './classes/guildGiveaway';
22
22
  export * from './classes/guildStarboard';
23
23
  export * from './classes/guildPlatformAction';
24
+ export * from './classes/guildFixURL';
24
25
  export * from './classes/games';
25
26
  export { GuildMessageTypeEnum, StreamerMessageTypeEnum, PlatformEnum, $Enums } from './other/enums';
26
27
  export type { Prisma, TSPrisma } from '@prisma/client';
package/dist/index.js CHANGED
@@ -38,6 +38,7 @@ __exportStar(require("./classes/guildPlatform"), exports);
38
38
  __exportStar(require("./classes/guildGiveaway"), exports);
39
39
  __exportStar(require("./classes/guildStarboard"), exports);
40
40
  __exportStar(require("./classes/guildPlatformAction"), exports);
41
+ __exportStar(require("./classes/guildFixURL"), exports);
41
42
  __exportStar(require("./classes/games"), exports);
42
43
  // Re-export Prisma generated enums (browser-safe)
43
44
  var enums_1 = require("./other/enums");
@@ -9,4 +9,4 @@ export type AddonNames = RemoveAdditional<keyof ListOfAdditionalAddons> & string
9
9
  export type DefaultAddons = AddDefault<AddonNames>;
10
10
  export declare const addonNames: AddonNames[];
11
11
  export declare const defaultAddons: DefaultAddons[];
12
- export type ListOfAdditionalAddons = RemoveDBIds<DeepNonNullable<Omit<NonNullable<DeepRequired<Guild>['premium']>, 'tier' | 'enabled'>>, 'dbId' | 'guildId'>;
12
+ export type ListOfAdditionalAddons = RemoveDBIds<DeepNonNullable<Omit<NonNullable<DeepRequired<Guild>['premium']>, 'tier' | 'enabled' | 'assignedAt' | 'updatedAt'>>, 'dbId' | 'guildId'>;
@@ -89,6 +89,8 @@ export declare const GuildFeatures: {
89
89
  GiveawayEntryLimit: bigint;
90
90
  DisableDoubleVoteEntry: bigint;
91
91
  YouTubeNotifications: bigint;
92
+ FixUrlWebhook: bigint;
93
+ FixUrlCustomRules: bigint;
92
94
  };
93
95
  export declare const GuildFeaturesText: Record<keyof typeof GuildFeatures, string>;
94
96
  export declare const UserFeatures: {
@@ -164,8 +166,10 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
164
166
  GiveawayEntryLimit: bigint;
165
167
  DisableDoubleVoteEntry: bigint;
166
168
  YouTubeNotifications: bigint;
169
+ FixUrlWebhook: bigint;
170
+ FixUrlCustomRules: bigint;
167
171
  };
168
- t: Record<"StickyMessages" | "StatusRoles" | "Starboards" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications", string>;
172
+ t: Record<"StickyMessages" | "StatusRoles" | "Starboards" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "FixUrlWebhook" | "FixUrlCustomRules", string>;
169
173
  all: bigint;
170
174
  static b: {
171
175
  BaseSyncableRoles: bigint;
@@ -218,8 +222,10 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
218
222
  GiveawayEntryLimit: bigint;
219
223
  DisableDoubleVoteEntry: bigint;
220
224
  YouTubeNotifications: bigint;
225
+ FixUrlWebhook: bigint;
226
+ FixUrlCustomRules: bigint;
221
227
  };
222
- static t: Record<"StickyMessages" | "StatusRoles" | "Starboards" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications", string>;
228
+ static t: Record<"StickyMessages" | "StatusRoles" | "Starboards" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "FixUrlWebhook" | "FixUrlCustomRules", string>;
223
229
  static all: bigint;
224
230
  convertBitToField<T extends EnumValues<typeof GuildFeatures>>(bit: T): string | null;
225
231
  }
@@ -174,6 +174,8 @@ exports.GuildFeatures = {
174
174
  GiveawayEntryLimit: 1n << 48n,
175
175
  DisableDoubleVoteEntry: 1n << 49n,
176
176
  YouTubeNotifications: 1n << 50n,
177
+ FixUrlWebhook: 1n << 59n,
178
+ FixUrlCustomRules: 1n << 60n,
177
179
  };
178
180
  exports.GuildFeaturesText = {
179
181
  BaseSyncableRoles: 'Basic Syncable Roles',
@@ -226,6 +228,8 @@ exports.GuildFeaturesText = {
226
228
  GiveawayEntryLimit: 'Giveaway Entry Limit',
227
229
  DisableDoubleVoteEntry: 'Disable Double Vote Entry',
228
230
  YouTubeNotifications: 'YouTube Notifications',
231
+ FixUrlWebhook: 'Fix URL Webhook Mode',
232
+ FixUrlCustomRules: 'Fix URL Custom Rules',
229
233
  };
230
234
  exports.UserFeatures = {
231
235
  HasOneServerPremium: 1n << 0n,
@@ -24,6 +24,8 @@ export declare const GuildZod: {
24
24
  additionalYoutubeConnections: z.ZodNumber;
25
25
  additionalTiktokConnections: z.ZodNumber;
26
26
  customBot: z.ZodBoolean;
27
+ assignedAt: z.ZodDate;
28
+ updatedAt: z.ZodDate;
27
29
  }, z.core.$strip>>>;
28
30
  bitfield: z.ZodNullable<z.ZodString>;
29
31
  overrideBranding: z.ZodNullable<z.ZodBoolean>;
@@ -272,6 +274,8 @@ export declare const GuildZod: {
272
274
  additionalYoutubeConnections: z.ZodNumber;
273
275
  additionalTiktokConnections: z.ZodNumber;
274
276
  customBot: z.ZodBoolean;
277
+ assignedAt: z.ZodDate;
278
+ updatedAt: z.ZodDate;
275
279
  }, z.core.$strip>;
276
280
  readonly GuildDisableBrandingSchema: z.ZodObject<{
277
281
  stickyMessage: z.ZodNullable<z.ZodBoolean>;
@@ -64,6 +64,8 @@ const GuildPremiumSchema = zod_2.z.object({
64
64
  additionalYoutubeConnections: zod_2.z.number().min(0),
65
65
  additionalTiktokConnections: zod_2.z.number().min(0),
66
66
  customBot: zod_2.z.boolean(),
67
+ assignedAt: zod_2.z.date(),
68
+ updatedAt: zod_2.z.date(),
67
69
  });
68
70
  const GuildDisableBrandingSchema = zod_2.z.object({
69
71
  stickyMessage: zod_2.z.boolean().nullable(),