TypeScript Types Reference
Shared TypeScript interfaces from @pixflare/shared.
Types Overview
23 exported interfaces
Auto-generated
Generated from shared/src/types.ts. Run pnpm docs:gen to update.
ImageResource
interface ImageResource {
id: string;
owner: string;
filename: string;
album: string;
tags: string[];
urls: {;
default: string;
variants: Record<string, string>;
original: string;
}| Field | Type | Required |
|---|---|---|
id | string | Yes |
owner | string | Yes |
filename | string | Yes |
album | string | Yes |
tags | string[] | Yes |
urls | { | Yes |
default | string | Yes |
variants | Record<string, string> | Yes |
original | string | Yes |
AlbumResource
interface AlbumResource {
album: string;
title: string;
description: string | null;
permission: 'public' | 'private';
count: number;
created_at: string;
updated_at: string;
cover_url?: string | null;
}| Field | Type | Required | | ------------- | --------- | ---------- | --- | | album | string | Yes | | title | string | Yes | | description | string | null | Yes | | permission | 'public' | 'private' | Yes | | count | number | Yes | | created_at | string | Yes | | updated_at | string | Yes | | cover_url | string | null | No |
TagResource
interface TagResource {
tag: string;
description?: string | null;
color?: string | null;
count: number;
created_at?: string;
updated_at?: string;
}| Field | Type | Required | | ------------- | -------- | -------- | --- | | tag | string | Yes | | description | string | null | No | | color | string | null | No | | count | number | Yes | | created_at | string | No | | updated_at | string | No |
ProfileResource
interface ProfileResource {
owner: string;
name: string | null;
profile_picture: string | null;
bio: string | null;
website: string | null;
github: string | null;
profile_visibility: 'public' | 'private';
}| Field | Type | Required | | -------------------- | --------- | ---------- | --- | | owner | string | Yes | | name | string | null | Yes | | profile_picture | string | null | Yes | | bio | string | null | Yes | | website | string | null | Yes | | github | string | null | Yes | | profile_visibility | 'public' | 'private' | Yes |
PublicProfileResource
interface PublicProfileResource {
owner: string;
name: string | null;
profile_picture: string | null;
bio: string | null;
website: string | null;
github: string | null;
public_albums_count: number;
public_images_count: number;
}| Field | Type | Required | | --------------------- | -------- | -------- | --- | | owner | string | Yes | | name | string | null | Yes | | profile_picture | string | null | Yes | | bio | string | null | Yes | | website | string | null | Yes | | github | string | null | Yes | | public_albums_count | number | Yes | | public_images_count | number | Yes |
ApiKeyResource
interface ApiKeyResource {
key_id: string;
key?: string;
name: string | null;
scopes: string[];
created_at: string;
expires_at: string | null;
last_used_at: string | null;
revoked_at: string | null;
allowed_ips: string[] | null;
}| Field | Type | Required | | -------------- | ---------- | -------- | --- | | key_id | string | Yes | | key | string | No | | name | string | null | Yes | | scopes | string[] | Yes | | created_at | string | Yes | | expires_at | string | null | Yes | | last_used_at | string | null | Yes | | revoked_at | string | null | Yes | | allowed_ips | string[] | null | Yes |
UsageStatsResource
interface UsageStatsResource {
enabled: boolean;
period: {;
start: string;
end: string;
days: number;
}| Field | Type | Required |
|---|---|---|
enabled | boolean | Yes |
period | { | Yes |
start | string | Yes |
end | string | Yes |
days | number | Yes |
ImageStatsResource
interface ImageStatsResource {
enabled: boolean;
image_id: string;
period: {;
start: string;
end: string;
days: number;
}| Field | Type | Required |
|---|---|---|
enabled | boolean | Yes |
image_id | string | Yes |
period | { | Yes |
start | string | Yes |
end | string | Yes |
days | number | Yes |
DependencyStatus
interface DependencyStatus {
ok: boolean;
latency_ms?: number;
error?: string;
metadata?: Record<string, unknown>;
}| Field | Type | Required |
|---|---|---|
ok | boolean | Yes |
latency_ms | number | No |
error | string | No |
metadata | Record<string, unknown> | No |
ScheduledJobInfo
interface ScheduledJobInfo {
name: string;
enabled: boolean;
schedule: string;
description: string;
}| Field | Type | Required |
|---|---|---|
name | string | Yes |
enabled | boolean | Yes |
schedule | string | Yes |
description | string | Yes |
BindingInfo
interface BindingInfo {
database?: string;
storage_bucket?: string;
cache_namespace?: string;
variant_queue?: string;
backup_queue?: string;
analytics?: string;
vectorize_index?: string;
}| Field | Type | Required |
|---|---|---|
database | string | No |
storage_bucket | string | No |
cache_namespace | string | No |
variant_queue | string | No |
backup_queue | string | No |
analytics | string | No |
vectorize_index | string | No |
BackupConfigResource
interface BackupConfigResource {
enabled: boolean;
s3_endpoint: string;
s3_region: string;
s3_bucket: string;
s3_path_prefix: string;
s3_access_key_id: string;
last_tested_at: string | null;
test_status: 'success' | 'failed' | null;
last_sync_at: string | null;
created_at: string;
updated_at: string;
}| Field | Type | Required | | ------------------ | ---------- | -------- | ----- | --- | | enabled | boolean | Yes | | s3_endpoint | string | Yes | | s3_region | string | Yes | | s3_bucket | string | Yes | | s3_path_prefix | string | Yes | | s3_access_key_id | string | Yes | | last_tested_at | string | null | Yes | | test_status | 'success' | 'failed' | null | Yes | | last_sync_at | string | null | Yes | | created_at | string | Yes | | updated_at | string | Yes |
BackupStatsResource
interface BackupStatsResource {
total_images: number;
pending: number;
syncing: number;
synced: number;
failed: number;
last_sync_at: string | null;
}| Field | Type | Required | | -------------- | -------- | -------- | --- | | total_images | number | Yes | | pending | number | Yes | | syncing | number | Yes | | synced | number | Yes | | failed | number | Yes | | last_sync_at | string | null | Yes |
CustomDomainResource
interface CustomDomainResource {
id: string;
hostname: string;
status: CustomDomainStatus;
verification_method?: CustomDomainVerificationMethod;
cname_target?: string;
txt_name?: string;
txt_value?: string;
last_error?: string;
created_at: string;
updated_at: string;
}| Field | Type | Required |
|---|---|---|
id | string | Yes |
hostname | string | Yes |
status | CustomDomainStatus | Yes |
verification_method | CustomDomainVerificationMethod | No |
cname_target | string | No |
txt_name | string | No |
txt_value | string | No |
last_error | string | No |
created_at | string | Yes |
updated_at | string | Yes |
WebhookResource
interface WebhookResource {
id: string;
url: string;
events: WebhookEvent[];
description: string | null;
enabled: boolean;
failure_count: number;
last_triggered_at: string | null;
created_at: string;
updated_at: string;
secret?: string;
}| Field | Type | Required | | ------------------- | ---------------- | -------- | --- | | id | string | Yes | | url | string | Yes | | events | WebhookEvent[] | Yes | | description | string | null | Yes | | enabled | boolean | Yes | | failure_count | number | Yes | | last_triggered_at | string | null | Yes | | created_at | string | Yes | | updated_at | string | Yes | | secret | string | No |
WebhookDeliveryResource
interface WebhookDeliveryResource {
id: string;
event_type: string;
status: number;
duration_ms: number | null;
attempt: number;
delivered_at: string;
}| Field | Type | Required | | -------------- | -------- | -------- | --- | | id | string | Yes | | event_type | string | Yes | | status | number | Yes | | duration_ms | number | null | Yes | | attempt | number | Yes | | delivered_at | string | Yes |
AIAnalysisResource
interface AIAnalysisResource {
image_id: string;
labels: string[];
label_scores: number[];
caption: string | null;
colors: RGBColor[];
nsfw_score: number | null;
nsfw_flagged: boolean;
model_version: string;
processing_time_ms: number;
created_at: string;
}| Field | Type | Required | | -------------------- | ------------ | -------- | --- | | image_id | string | Yes | | labels | string[] | Yes | | label_scores | number[] | Yes | | caption | string | null | Yes | | colors | RGBColor[] | Yes | | nsfw_score | number | null | Yes | | nsfw_flagged | boolean | Yes | | model_version | string | Yes | | processing_time_ms | number | Yes | | created_at | string | Yes |
AuditLogResource
interface AuditLogResource {
id: string;
created_at: string;
action: string;
resource_type: string;
resource_id: string | null;
status: string;
affected_count: number;
description: string;
}| Field | Type | Required | | ---------------- | -------- | -------- | --- | | id | string | Yes | | created_at | string | Yes | | action | string | Yes | | resource_type | string | Yes | | resource_id | string | null | Yes | | status | string | Yes | | affected_count | number | Yes | | description | string | Yes |
UsageLimitInfo
interface UsageLimitInfo {
enabled: boolean;
current: number;
limit: number | null;
percentage: number;
plan: string;
grace_percentage: number;
}| Field | Type | Required | | ------------------ | --------- | -------- | --- | | enabled | boolean | Yes | | current | number | Yes | | limit | number | null | Yes | | percentage | number | Yes | | plan | string | Yes | | grace_percentage | number | Yes |
InvoiceInfo
interface InvoiceInfo {
id: string;
amount_paid: number;
amount_due: number;
status: string;
created: string;
invoice_pdf: string | null;
hosted_invoice_url: string | null;
}| Field | Type | Required | | -------------------- | -------- | -------- | --- | | id | string | Yes | | amount_paid | number | Yes | | amount_due | number | Yes | | status | string | Yes | | created | string | Yes | | invoice_pdf | string | null | Yes | | hosted_invoice_url | string | null | Yes |
PaymentMethodInfo
interface PaymentMethodInfo {
type: string;
last4: string;
brand: string;
exp_month?: number;
exp_year?: number;
}| Field | Type | Required |
|---|---|---|
type | string | Yes |
last4 | string | Yes |
brand | string | Yes |
exp_month | number | No |
exp_year | number | No |
SubscriptionInfo
interface SubscriptionInfo {
plan_tier: string;
status: string | null;
current_period_start: string | null;
current_period_end: string | null;
cancel_at_period_end: boolean;
canceled_at: string | null;
billing_cycle: 'monthly' | 'annual' | null;
price_usd: number;
invoices: InvoiceInfo[];
payment_method: PaymentMethodInfo | null;
is_sponsor?: boolean;
}| Field | Type | Required | | ---------------------- | ------------------ | -------- | ----- | --- | | plan_tier | string | Yes | | status | string | null | Yes | | current_period_start | string | null | Yes | | current_period_end | string | null | Yes | | cancel_at_period_end | boolean | Yes | | canceled_at | string | null | Yes | | billing_cycle | 'monthly' | 'annual' | null | Yes | | price_usd | number | Yes | | invoices | InvoiceInfo[] | Yes | | payment_method | PaymentMethodInfo | null | Yes | | is_sponsor | boolean | No |
BillingPlanInfo
interface BillingPlanInfo {
tier: string;
name: string;
price_monthly_usd: number;
price_annual_usd: number;
stripe_price_monthly?: string;
stripe_price_annual?: string;
max_images: number;
features: string[];
is_current: boolean;
}| Field | Type | Required |
|---|---|---|
tier | string | Yes |
name | string | Yes |
price_monthly_usd | number | Yes |
price_annual_usd | number | Yes |
stripe_price_monthly | string | No |
stripe_price_annual | string | No |
max_images | number | Yes |
features | string[] | Yes |
is_current | boolean | Yes |
Import from: @pixflare/shared/types
Source: shared/src/types.ts