import * as Option from "../Option.ts"; import * as Schema from "../Schema.ts"; /** * Schema for the address messages go to: a channel, a thread or a direct * conversation on one platform. * * **Details** * * `id` is opaque to the core and owned by the adapter. Slack's is * `{team}/{channel}` or `{team}/{channel}/{thread_ts}`, Discord's is the * channel snowflake. * * @stability unstable * @category schemas * @since 4.1.5 */ export declare const ChatThread: Schema.Struct<{ readonly platform: Schema.String; readonly id: Schema.String; }>; /** * The address messages go to: a channel, a thread or a direct conversation on * one platform. * * @stability unstable * @category models * @since 4.1.5 */ export type ChatThread = typeof ChatThread.Type; /** * Creates a thread address from a platform name and the adapter's id. * * @stability unstable * @category constructors * @since 4.1.5 */ export declare const make: (platform: string, id: string) => ChatThread; /** * Returns whether two thread addresses name the same platform and id. * * @stability unstable * @category comparisons * @since 4.1.5 */ export declare const equals: (self: ChatThread, that: ChatThread) => boolean; /** * Formats a thread address as `{platform}:{id}`. * * **When to use** * * Use to build session keys, entity ids and URLs from an address. * * **Gotchas** * * The format is frozen once released, because consumers persist it. * * @see {@link fromString} for the inverse * * @stability unstable * @category converting * @since 4.1.5 */ export declare const toString: (thread: ChatThread) => string; /** * Parses a `{platform}:{id}` string into a thread address. * * **Details** * * The platform is everything before the first `:`, so an id may contain * `:`. Both parts must be non-empty, otherwise the result is `None`. * * @see {@link toString} for the inverse * * @stability unstable * @category converting * @since 4.1.5 */ export declare const fromString: (value: string) => Option.Option; /** * Schema that decodes a `{platform}:{id}` string into a `ChatThread` and * encodes it back. * * **Gotchas** * * The string format is frozen once released, because consumers persist it. * * @stability unstable * @category schemas * @since 4.1.5 */ export declare const FromString: Schema.Codec; //# sourceMappingURL=ChatThread.d.ts.map