import type { ResourceAttribute } from "./ResourceAttribute.js"; import type { ResourceId } from "./ResourceId.js"; import type { ResourceKind } from "./ResourceKind.js"; import type { ResourceMetadata } from "./ResourceMetadata.js"; import type { ResourceStatus } from "./ResourceStatus.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; /** * Visual id composed of creator username and resource name.\ * Warning: as username and resource name could be changed, this id is not stable.\ * Use it for display purposes only */ friendlyId: ResourceId; 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; }; //# sourceMappingURL=Resource.d.ts.map