mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
5584089441
* OAuth * store logo * unfurl support * refresh token * support for list * embed list * mention menu for all embeds in a list * multi-level list * logo * account level connection * tsc * Update Icon.tsx * coderabbit feedback * RFC 6749 suggestion --------- Co-authored-by: Tom Moor <tom@getoutline.com>
21 lines
615 B
TypeScript
21 lines
615 B
TypeScript
import isEmpty from "lodash/isEmpty";
|
|
import { z } from "zod";
|
|
import { BaseSchema } from "@server/routes/api/schema";
|
|
|
|
export const SlackPostSchema = BaseSchema.extend({
|
|
query: z
|
|
.object({
|
|
code: z.string().nullish(),
|
|
state: z.string(),
|
|
error: z.string().nullish(),
|
|
})
|
|
.refine((req) => !(isEmpty(req.code) && isEmpty(req.error)), {
|
|
message: "one of code or error is required",
|
|
})
|
|
.refine((req) => isEmpty(req.code) || isEmpty(req.error), {
|
|
message: "code and error cannot both be present",
|
|
}),
|
|
});
|
|
|
|
export type SlackPostReq = z.infer<typeof SlackPostSchema>;
|