import type { ResourceAttribute } from "./ResourceAttribute.js"; import type { ResourceKind } from "./ResourceKind.js"; import type { ResourceMetadata } from "./ResourceMetadata.js"; import type { ResourcePendingUpdate } from "./ResourcePendingUpdate.js"; import type { ResourceStatus } from "./ResourceStatus.js"; import type { Slug } from "./Slug.js"; /** * Represents a resource in the cloud, uploaded by a user */ export type Resource = { /** * unique id */ id: string; /** * id of the document containing the resource */ dataId: string; /** * user id who created the resource */ creatorId: string; /** * slug to shown in the url, could be changed. */ slug: Slug; kind: ResourceKind; metadata: ResourceMetadata; createdAt: string; updatedAt: string; /** * current status */ status: ResourceStatus; /** * if status == ResourceStatus::Rejected, this is the reason for rejection */ rejectedReason: string | null; /** * date when the resource was reviewed */ reviewedAt: string | null; /** * user id who reviewed the resource */ reviewedBy: string | null; /** * should be filled if `status == ResourceStatus::Deleted` */ deletedAt: string | null; /** * resource attributes */ attributes: Array; /** * resource version (increased every time the resource is updated) */ version: number; /** * number of stars */ stars: number; /** * number of downloads */ downloads: number; /** * Pending update waiting for reviewer approval (only present on Published resources) */ pendingUpdate: ResourcePendingUpdate | null; /** * Reason a pending update was rejected (visible to creator after rejection) */ rejectedPendingReason: string | null; }; //# sourceMappingURL=Resource.d.ts.map