@omniplex/api-types 0.2.0 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +136 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -141,6 +141,41 @@ export interface CreateBotChangelogPayload {
141
141
  content: string;
142
142
  version: string;
143
143
  }
144
+ export interface ServerChangelog {
145
+ id: string;
146
+ title: string;
147
+ content: string;
148
+ version: string;
149
+ created_by: string;
150
+ created_at: string;
151
+ }
152
+ export interface ServerChangelogList {
153
+ changelogs: ServerChangelog[];
154
+ }
155
+ export interface ServerVoteChannelOption {
156
+ id: string;
157
+ name: string;
158
+ }
159
+ export interface ServerVoteChannel {
160
+ channel_id: string | null;
161
+ channels: ServerVoteChannelOption[];
162
+ available: boolean;
163
+ }
164
+ export interface ServerChangelogFeedEntry {
165
+ id: string;
166
+ server_id: string;
167
+ name: string;
168
+ avatar: string;
169
+ title: string;
170
+ content: string;
171
+ version: string;
172
+ created_at: string;
173
+ }
174
+ export interface ServerChangelogFeedFilters {
175
+ q?: string;
176
+ tag?: string;
177
+ server?: string;
178
+ }
144
179
  /** One result row of the cross-bot command search (GET /bots/@commands) --
145
180
  * just enough of the owning bot's identity to display and link back to it. */
146
181
  export interface BotCommandSearchResult {
@@ -959,6 +994,53 @@ export interface ListIndexServer {
959
994
  spotlight: IndexServer[];
960
995
  recently_bumped?: IndexServer[];
961
996
  }
997
+ export type PageGradient = "aurora" | "sunset" | "ocean" | "forest" | "candy" | "midnight" | "ember" | "mono";
998
+ export interface PageStyle {
999
+ gradient: PageGradient | null;
1000
+ accent: string | null;
1001
+ image_version: string | null;
1002
+ dim: number;
1003
+ blur: number;
1004
+ image_position: "top" | "center" | "bottom";
1005
+ fixed: boolean;
1006
+ }
1007
+ export interface ManagedPageStyle extends PageStyle {
1008
+ premium: boolean;
1009
+ unlocked_until: string | null;
1010
+ pending_version: string | null;
1011
+ pending_since: string | null;
1012
+ rejected_reason: string | null;
1013
+ }
1014
+ export interface PageStyleUpdate {
1015
+ gradient: PageGradient | null;
1016
+ accent: string | null;
1017
+ dim: number;
1018
+ blur: number;
1019
+ image_position: "top" | "center" | "bottom";
1020
+ fixed: boolean;
1021
+ remove_image?: boolean;
1022
+ }
1023
+ export interface StatsHistoryMonth {
1024
+ month: string;
1025
+ votes: number | null;
1026
+ voters: number | null;
1027
+ approved: number | null;
1028
+ denied: number | null;
1029
+ new_bots: number;
1030
+ new_servers: number;
1031
+ new_users: number | null;
1032
+ }
1033
+ export interface StatsHistory {
1034
+ votes_all_time: number;
1035
+ votes_this_month: number;
1036
+ voters_all_time: number;
1037
+ votes_since: string | null;
1038
+ approvals: number;
1039
+ denials: number;
1040
+ reviews_since: string | null;
1041
+ months: StatsHistoryMonth[];
1042
+ generated_at: string;
1043
+ }
962
1044
  export interface ListStats {
963
1045
  total_bots: number;
964
1046
  total_approved_bots: number;
@@ -979,12 +1061,24 @@ export interface ListStats {
979
1061
  total_denied_servers: number;
980
1062
  total_vote_banned_servers: number;
981
1063
  }
1064
+ export type AppQuestionType = "short" | "long" | "choice" | "multi" | "yesno" | "number" | "url" | "rating";
1065
+ export interface AppQuestionCondition {
1066
+ question_id: string;
1067
+ values: string[];
1068
+ }
982
1069
  export interface AppQuestion {
983
1070
  id: string;
984
1071
  question: string;
985
1072
  paragraph: string;
986
1073
  placeholder: string;
987
1074
  short: boolean;
1075
+ type?: AppQuestionType;
1076
+ options?: string[];
1077
+ optional?: boolean;
1078
+ min_length?: number;
1079
+ max_length?: number;
1080
+ show_if?: AppQuestionCondition | null;
1081
+ flag?: string[];
988
1082
  }
989
1083
  export interface AppPosition {
990
1084
  id: string;
@@ -1039,7 +1133,9 @@ export interface AutoVoteTargetInput {
1039
1133
  start_minute: number;
1040
1134
  end_minute: number;
1041
1135
  timezone: string;
1136
+ paused?: boolean;
1042
1137
  }
1138
+ export type AutoVoteNotify = "off" | "each" | "daily";
1043
1139
  export interface AutoVoteTarget extends AutoVoteTargetInput {
1044
1140
  name: string;
1045
1141
  avatar: string;
@@ -1047,6 +1143,7 @@ export interface AutoVoteTarget extends AutoVoteTargetInput {
1047
1143
  last_skip_reason: string | null;
1048
1144
  cooldown_until: string | null;
1049
1145
  in_schedule: boolean;
1146
+ paused: boolean;
1050
1147
  }
1051
1148
  export interface AutoVoteStatus {
1052
1149
  subscribed: boolean;
@@ -1054,13 +1151,52 @@ export interface AutoVoteStatus {
1054
1151
  current_period_end: string | null;
1055
1152
  cancel_at_period_end: boolean;
1056
1153
  price_cents: number;
1154
+ yearly_price_cents: number;
1057
1155
  max_targets: number;
1156
+ extra_slots: number;
1157
+ max_extra_slots: number;
1158
+ slot_price_cents: number;
1159
+ billing_interval: "month" | "year";
1160
+ booster_slots: number;
1058
1161
  targets: AutoVoteTarget[];
1162
+ notify: AutoVoteNotify;
1163
+ }
1164
+ export interface AutoVotePricing {
1165
+ price_cents: number;
1166
+ yearly_price_cents: number;
1167
+ slot_price_cents: number;
1168
+ yearly_slot_price_cents: number;
1169
+ included_slots: number;
1170
+ max_extra_slots: number;
1059
1171
  }
1060
1172
  export interface PlanList {
1061
1173
  plans: PaymentPlan[];
1062
1174
  credits_per_cent?: number;
1063
1175
  max_credit_share?: number;
1176
+ auto_vote?: AutoVotePricing;
1177
+ }
1178
+ export interface BoosterPerkTarget {
1179
+ target_type: "bot" | "server";
1180
+ target_id: string;
1181
+ name: string;
1182
+ avatar: string;
1183
+ }
1184
+ export interface SitePrefs {
1185
+ prefs: Record<string, unknown>;
1186
+ updated_at: string | null;
1187
+ }
1188
+ export interface BoosterPerks {
1189
+ boosting: boolean;
1190
+ in_server: boolean;
1191
+ boosting_since: string | null;
1192
+ target: BoosterPerkTarget | null;
1193
+ last_claim_at: string | null;
1194
+ next_renewal_at: string | null;
1195
+ last_error: string | null;
1196
+ just_applied: boolean;
1197
+ premium_days: number;
1198
+ auto_vote_slots: number;
1199
+ renewal_days: number;
1064
1200
  }
1065
1201
  export interface PaypalMeta {
1066
1202
  paypal_client_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniplex/api-types",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "TypeScript types for the Omniplex API (Popplio).",
5
5
  "license": "MIT",
6
6
  "type": "module",