rhythia-api 171.0.0 → 173.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rhythia-api",
3
- "version": "171.0.0",
3
+ "version": "173.0.0",
4
4
  "main": "index.ts",
5
5
  "author": "online-contributors",
6
6
  "scripts": {
@@ -23,6 +23,7 @@
23
23
  "@types/bun": "^1.1.6",
24
24
  "@types/lodash": "^4.17.7",
25
25
  "@types/node": "^22.2.0",
26
+ "@types/validator": "^13.12.2",
26
27
  "@vercel/edge": "^1.1.2",
27
28
  "@vercel/node": "^3.2.8",
28
29
  "aws-lambda": "^1.0.7",
@@ -43,6 +44,8 @@
43
44
  "supabase": "^2.1.1",
44
45
  "tsx": "^4.17.0",
45
46
  "utf-8-validate": "^6.0.4",
47
+ "validator": "^13.12.0",
48
+ "zero-width": "^1.0.29",
46
49
  "zod": "^3.23.8"
47
50
  }
48
51
  }
package/types/database.ts CHANGED
@@ -156,6 +156,7 @@ export type Database = {
156
156
  clans: {
157
157
  Row: {
158
158
  acronym: string | null
159
+ allowed_users: Json
159
160
  avatar_url: string | null
160
161
  created_at: string
161
162
  description: string | null
@@ -165,6 +166,7 @@ export type Database = {
165
166
  }
166
167
  Insert: {
167
168
  acronym?: string | null
169
+ allowed_users?: Json
168
170
  avatar_url?: string | null
169
171
  created_at?: string
170
172
  description?: string | null
@@ -174,6 +176,7 @@ export type Database = {
174
176
  }
175
177
  Update: {
176
178
  acronym?: string | null
179
+ allowed_users?: Json
177
180
  avatar_url?: string | null
178
181
  created_at?: string
179
182
  description?: string | null
@@ -194,14 +197,17 @@ export type Database = {
194
197
  discordWebhooks: {
195
198
  Row: {
196
199
  id: number
200
+ type: Database["public"]["Enums"]["discordWebhookType"] | null
197
201
  webhook_link: string
198
202
  }
199
203
  Insert: {
200
204
  id?: number
205
+ type?: Database["public"]["Enums"]["discordWebhookType"] | null
201
206
  webhook_link?: string
202
207
  }
203
208
  Update: {
204
209
  id?: number
210
+ type?: Database["public"]["Enums"]["discordWebhookType"] | null
205
211
  webhook_link?: string
206
212
  }
207
213
  Relationships: []
@@ -414,6 +420,7 @@ export type Database = {
414
420
  }
415
421
  Enums: {
416
422
  banTypes: "cool" | "silenced" | "restricted" | "excluded"
423
+ discordWebhookType: "maps" | "scores"
417
424
  }
418
425
  CompositeTypes: {
419
426
  [_ in never]: never
@@ -29,6 +29,16 @@ export function rateMap(map: SSPMParsedMap) {
29
29
  return rate(notes);
30
30
  }
31
31
 
32
+ export function rateMapNotes(map: [number, number, number][]) {
33
+ let notes = map.map((marker) => ({
34
+ time: marker[0],
35
+ x: marker[1],
36
+ y: marker[2],
37
+ }));
38
+
39
+ return rate(notes);
40
+ }
41
+
32
42
  export function rateMapOld(map: SSPMMap) {
33
43
  let notes = map.notes.map((marker) => ({
34
44
  time: marker.position,