mirror of
https://github.com/docmost/docmost.git
synced 2026-05-24 03:02:42 +08:00
641ce142df
* SCIM - init (EE) * accept db transaction * sync * Content parser support for scim+json * patch scimmy * sync * return early if userIds is empty * sync * SCIM db table * fixes * scim tokens * backfill * feat(audit): add scim token events * rename scim migration * fix * fix translation * cleanup
35 lines
896 B
TypeScript
35 lines
896 B
TypeScript
import api from "@/lib/api-client";
|
|
import {
|
|
IScimToken,
|
|
ICreateScimTokenRequest,
|
|
IRevokeScimTokenRequest,
|
|
IUpdateScimTokenRequest,
|
|
} from "@/ee/scim/types/scim-token.types";
|
|
import { IPagination, QueryParams } from "@/lib/types.ts";
|
|
|
|
export async function getScimTokens(
|
|
params?: QueryParams,
|
|
): Promise<IPagination<IScimToken>> {
|
|
const req = await api.post("/scim-tokens", { ...params });
|
|
return req.data;
|
|
}
|
|
|
|
export async function createScimToken(
|
|
data: ICreateScimTokenRequest,
|
|
): Promise<IScimToken> {
|
|
const req = await api.post<IScimToken>("/scim-tokens/create", data);
|
|
return req.data;
|
|
}
|
|
|
|
export async function updateScimToken(
|
|
data: IUpdateScimTokenRequest,
|
|
): Promise<void> {
|
|
await api.post("/scim-tokens/update", data);
|
|
}
|
|
|
|
export async function revokeScimToken(
|
|
data: IRevokeScimTokenRequest,
|
|
): Promise<void> {
|
|
await api.post("/scim-tokens/revoke", data);
|
|
}
|