diff --git a/src/component/_generated/component.ts b/src/component/_generated/component.ts index 615e85c..e7cc823 100644 --- a/src/component/_generated/component.ts +++ b/src/component/_generated/component.ts @@ -52,6 +52,7 @@ export type ComponentApi = mutableContent?: boolean; numPreviousFailures: number; priority?: "default" | "normal" | "high"; + richContent?: { audio?: string; image?: string; video?: string }; sound?: string | null; state: | "awaiting_delivery" @@ -93,6 +94,7 @@ export type ComponentApi = mutableContent?: boolean; numPreviousFailures: number; priority?: "default" | "normal" | "high"; + richContent?: { audio?: string; image?: string; video?: string }; sound?: string | null; state: | "awaiting_delivery" @@ -168,6 +170,7 @@ export type ComponentApi = | "time-sensitive"; mutableContent?: boolean; priority?: "default" | "normal" | "high"; + richContent?: { audio?: string; image?: string; video?: string }; sound?: string | null; subtitle?: string; title?: string; @@ -200,6 +203,7 @@ export type ComponentApi = | "time-sensitive"; mutableContent?: boolean; priority?: "default" | "normal" | "high"; + richContent?: { audio?: string; image?: string; video?: string }; sound?: string | null; subtitle?: string; title?: string; diff --git a/src/component/_generated/dataModel.ts b/src/component/_generated/dataModel.ts index 8541f31..f97fd19 100644 --- a/src/component/_generated/dataModel.ts +++ b/src/component/_generated/dataModel.ts @@ -38,7 +38,7 @@ export type Doc = DocumentByName< * Convex documents are uniquely identified by their `Id`, which is accessible * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids). * - * Documents can be loaded using `db.get(id)` in query and mutation functions. + * Documents can be loaded using `db.get(tableName, id)` in query and mutation functions. * * IDs are just strings at runtime, but this type can be used to distinguish them from other * strings when type checking. diff --git a/src/component/_generated/server.ts b/src/component/_generated/server.ts index 24994e4..739b02f 100644 --- a/src/component/_generated/server.ts +++ b/src/component/_generated/server.ts @@ -107,11 +107,6 @@ export const internalAction: ActionBuilder = */ export const httpAction: HttpActionBuilder = httpActionGeneric; -type GenericCtx = - | GenericActionCtx - | GenericMutationCtx - | GenericQueryCtx; - /** * A set of services for use within Convex query functions. * diff --git a/src/component/schema.ts b/src/component/schema.ts index dae4a97..4f7d47f 100644 --- a/src/component/schema.ts +++ b/src/component/schema.ts @@ -26,6 +26,13 @@ export const notificationFields = { channelId: v.optional(v.string()), categoryId: v.optional(v.string()), mutableContent: v.optional(v.boolean()), + richContent: v.optional( + v.object({ + image: v.optional(v.string()), + audio: v.optional(v.string()), + video: v.optional(v.string()), + }), + ), }; /** @@ -143,6 +150,18 @@ export type NotificationFields = { * Defaults to false. */ mutableContent?: boolean; + + /** + * iOS Only + * + * Rich content to display with the notification. + * Contains URLs to media files (image, audio, or video) to be displayed with the notification. + */ + richContent?: { + image?: string; + audio?: string; + video?: string; + }; }; export const notificationState = v.union(