@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
32 lines • 1.1 kB
TypeScript
/**
* ```js
* import { getMessages } from '@amityco/ts-sdk-react-native'
* const messages = await getMessages(['foo', 'bar'])
* ```
*
* Fetches a collection of {@link Amity.Message} objects
*
* @param messageIds the IDs of the {@link Amity.Message} to fetch
* @returns the associated collection of {@link Amity.Message} objects
*
* @category Message API
* @async
*/
export declare const getMessages: {
(messageIds: Amity.Message['messageId'][]): Promise<Amity.Cached<Amity.InternalMessage[]>>;
/**
* ```js
* import { getMessages } from '@amityco/ts-sdk-react-native'
* const messages = getMessages.locally(['foo', 'bar']) ?? []
* ```
*
* Fetches a collection of {@link Amity.Message} objects from cache
*
* @param messageIds the IDs of the {@link Amity.Message} to fetch
* @returns the associated collection of {@link Amity.Message} objects
*
* @category Message API
*/
locally(messageIds: Amity.Message['messageId'][]): Amity.Cached<Amity.InternalMessage[]> | undefined;
};
//# sourceMappingURL=getMessages.d.ts.map