Refactor unfurling related types (#6730)

* wip

* fix: refactor unfurl types
This commit is contained in:
Apoorv Mishra
2024-04-03 07:28:30 +05:30
committed by GitHub
parent e0ae044f4c
commit 6a4628afef
19 changed files with 399 additions and 457 deletions

View File

@@ -8,6 +8,8 @@ import {
Client,
CollectionPermission,
DocumentPermission,
JSONValue,
UnfurlResourceType,
} from "@shared/types";
import { BaseSchema } from "@server/routes/api/schema";
import { AccountProvisionerResult } from "./commands/accountProvisioner";
@@ -507,6 +509,11 @@ export type CollectionJSONExport = {
};
};
export type UnfurlResolver = {
unfurl: (url: string, actor?: User) => Promise<any>;
};
export type Unfurl = { [x: string]: JSONValue; type: UnfurlResourceType };
export type UnfurlSignature = (
url: string,
actor?: User
) => Promise<Unfurl | void>;
export type UninstallSignature = (integration: Integration) => Promise<void>;