Add localized emoji search
This commit is contained in:
parent
ce0fb22041
commit
e90553b3b3
17 changed files with 878 additions and 97 deletions
21
ts/types/OptionalResource.ts
Normal file
21
ts/types/OptionalResource.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import z from 'zod';
|
||||
|
||||
export const OptionalResourceSchema = z.object({
|
||||
digest: z.string(),
|
||||
url: z.string(),
|
||||
size: z.number(),
|
||||
});
|
||||
|
||||
export type OptionalResourceType = z.infer<typeof OptionalResourceSchema>;
|
||||
|
||||
export const OptionalResourcesDictSchema = z.record(
|
||||
z.string(),
|
||||
OptionalResourceSchema
|
||||
);
|
||||
|
||||
export type OptionalResourcesDictType = z.infer<
|
||||
typeof OptionalResourcesDictSchema
|
||||
>;
|
17
ts/types/emoji.ts
Normal file
17
ts/types/emoji.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import z from 'zod';
|
||||
|
||||
export const LocaleEmojiSchema = z.object({
|
||||
emoji: z.string(),
|
||||
shortName: z.string(),
|
||||
tags: z.string().array(),
|
||||
rank: z.number(),
|
||||
});
|
||||
|
||||
export type LocaleEmojiType = z.infer<typeof LocaleEmojiSchema>;
|
||||
|
||||
export const LocaleEmojiListSchema = LocaleEmojiSchema.array();
|
||||
|
||||
export type LocaleEmojiListType = z.infer<typeof LocaleEmojiListSchema>;
|
Loading…
Add table
Add a link
Reference in a new issue