Skip to content

Commit

Permalink
trim discord text (#275)
Browse files Browse the repository at this point in the history
* trim discord text

* run the typings command
  • Loading branch information
jongrim authored Sep 13, 2024
1 parent eae48f2 commit 9a79933
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 3 deletions.
5 changes: 4 additions & 1 deletion infrastructure/api/src/handlers/execute-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export const processGameIntegration = async (event: SNSEvent) => {
text: "New game added to Playabl",
creator: data?.username,
name: entity.title,
description: entity.description_as_flat_text,
description:
entity.description_as_flat_text.length > 2048
? entity.description_as_flat_text.substring(0, 2040).concat("...")
: entity.description_as_flat_text,
url: `https://app.playabl.io/games/${entity.id}`,
imageUrl: publicUrl,
});
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/api/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Transform: AWS::Serverless-2016-10-31
Globals:
Function:
CodeUri: ./src
Runtime: nodejs16.x
Runtime: nodejs20.x
MemorySize: 128

Resources:
Expand Down
138 changes: 137 additions & 1 deletion src/typings/supabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ export type Database = {
owner_id: string | null
path_tokens: string[] | null
updated_at: string | null
user_metadata: Json | null
version: string | null
}
Insert: {
Expand All @@ -985,6 +986,7 @@ export type Database = {
owner_id?: string | null
path_tokens?: string[] | null
updated_at?: string | null
user_metadata?: Json | null
version?: string | null
}
Update: {
Expand All @@ -998,6 +1000,7 @@ export type Database = {
owner_id?: string | null
path_tokens?: string[] | null
updated_at?: string | null
user_metadata?: Json | null
version?: string | null
}
Relationships: [
Expand All @@ -1010,6 +1013,104 @@ export type Database = {
},
]
}
s3_multipart_uploads: {
Row: {
bucket_id: string
created_at: string
id: string
in_progress_size: number
key: string
owner_id: string | null
upload_signature: string
user_metadata: Json | null
version: string
}
Insert: {
bucket_id: string
created_at?: string
id: string
in_progress_size?: number
key: string
owner_id?: string | null
upload_signature: string
user_metadata?: Json | null
version: string
}
Update: {
bucket_id?: string
created_at?: string
id?: string
in_progress_size?: number
key?: string
owner_id?: string | null
upload_signature?: string
user_metadata?: Json | null
version?: string
}
Relationships: [
{
foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
columns: ["bucket_id"]
isOneToOne: false
referencedRelation: "buckets"
referencedColumns: ["id"]
},
]
}
s3_multipart_uploads_parts: {
Row: {
bucket_id: string
created_at: string
etag: string
id: string
key: string
owner_id: string | null
part_number: number
size: number
upload_id: string
version: string
}
Insert: {
bucket_id: string
created_at?: string
etag: string
id?: string
key: string
owner_id?: string | null
part_number: number
size?: number
upload_id: string
version: string
}
Update: {
bucket_id?: string
created_at?: string
etag?: string
id?: string
key?: string
owner_id?: string | null
part_number?: number
size?: number
upload_id?: string
version?: string
}
Relationships: [
{
foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
columns: ["bucket_id"]
isOneToOne: false
referencedRelation: "buckets"
referencedColumns: ["id"]
},
{
foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
columns: ["upload_id"]
isOneToOne: false
referencedRelation: "s3_multipart_uploads"
referencedColumns: ["id"]
},
]
}
}
Views: {
[_ in never]: never
Expand Down Expand Up @@ -1040,7 +1141,7 @@ export type Database = {
Args: {
name: string
}
Returns: unknown
Returns: string[]
}
get_size_by_bucket: {
Args: Record<PropertyKey, never>
Expand All @@ -1049,6 +1150,41 @@ export type Database = {
bucket_id: string
}[]
}
list_multipart_uploads_with_delimiter: {
Args: {
bucket_id: string
prefix_param: string
delimiter_param: string
max_keys?: number
next_key_token?: string
next_upload_token?: string
}
Returns: {
key: string
id: string
created_at: string
}[]
}
list_objects_with_delimiter: {
Args: {
bucket_id: string
prefix_param: string
delimiter_param: string
max_keys?: number
start_after?: string
next_token?: string
}
Returns: {
name: string
id: string
metadata: Json
updated_at: string
}[]
}
operation: {
Args: Record<PropertyKey, never>
Returns: string
}
search: {
Args: {
prefix: string
Expand Down

0 comments on commit 9a79933

Please sign in to comment.