TypeScript Types Reference
Shared TypeScript interfaces from @pixflare/shared.
Types Overview
25 exported interfaces
Auto-generated
Generated from shared/src/types. Run pnpm docs:gen to update.
AIAnalysisResource
typescript
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 |
UsageStatsResource
typescript
interface UsageStatsResource {
enabled: boolean;
period: {
start: string;
end: string;
days: number;
};
storage: {
total_images: number;
total_bytes: number;
by_day?: Array<{
date: string;
images: number;
bytes: number;
}>;
};
bandwidth: {
total_bytes: number;
by_day?: Array<{
date: string;
bytes: number;
}>;
by_variant_by_day?: Array<{
date: string;
variant: string;
bytes: number;
}>;
by_format_by_day?: Array<{
date: string;
format: string;
bytes: number;
}>;
};
requests: {
total_count: number;
by_day?: Array<{
date: string;
count: number;
}>;
by_variant_by_day?: Array<{
date: string;
variant: string;
count: number;
}>;
by_format_by_day?: Array<{
date: string;
format: string;
count: number;
}>;
by_format?: Record<string, number>;
by_country?: Record<string, number>;
by_referrer?: Array<{
referrer: string;
count: number;
bandwidth_bytes?: number;
}>;
};
image_flow?: Array<{
owner: string;
album_slug: string;
filename: string;
image_id: string;
variant: string;
requests: number;
}>;
}| Field | Type | Required |
|---|---|---|
enabled | boolean | Yes |
period | object | Yes |
storage | object | Yes |
bandwidth | object | Yes |
requests | object | Yes |
image_flow | Array<{ owner: string; album_slug: string; filename: string; image_id: string; variant: string; requests: number; }> | No |
ImageStatsResource
typescript
interface ImageStatsResource {
enabled: boolean;
image_id: string;
period: {
start: string;
end: string;
days: number;
};
bandwidth: {
total_bytes: number;
by_variant: Record<string, number>;
by_format: Record<string, number>;
by_day?: Array<{
date: string;
bytes: number;
}>;
};
requests: {
total_count: number;
by_variant: Record<string, number>;
by_format: Record<string, number>;
by_country?: Record<string, number>;
by_referrer?: Array<{
referrer: string;
count: number;
bandwidth_bytes?: number;
}>;
by_day?: Array<{
date: string;
count: number;
}>;
};
}| Field | Type | Required |
|---|---|---|
enabled | boolean | Yes |
image_id | string | Yes |
period | object | Yes |
bandwidth | object | Yes |
requests | object | Yes |
UsageLimitInfo
typescript
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 |
AuditLogResource
typescript
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 |
BackupConfigResource
typescript
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
typescript
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 |
InvoiceInfo
typescript
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
typescript
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
typescript
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
typescript
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 |
CustomDomainResource
typescript
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 |
DependencyStatus
typescript
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
typescript
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
typescript
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 |
DeploymentInfo
typescript
interface DeploymentInfo {
id: string;
tag: string;
timestamp: string;
}| Field | Type | Required |
|---|---|---|
id | string | Yes |
tag | string | Yes |
timestamp | string | Yes |
ImageResource
typescript
interface ImageResource {
id: string;
owner: string;
filename: string;
album: string;
tags: string[];
urls: {
default: string;
variants: Record<string, string>;
original: string;
};
upload: {
upload_url: string;
expires_at: string;
} | null;
info: {
content_type: string | null;
size_bytes: number | null;
width: number | null;
height: number | null;
};
status: {
uploaded: boolean;
deleted_at: string | null;
variants_ready: VariantPreset[];
is_encrypted: boolean;
};
alt: string | null;
nsfw: boolean;
license: string;
visibility: 'public' | 'private' | 'unlisted';
permission: 'public' | 'private' | 'inherit';
expiration_date: string | null;
is_private: boolean;
is_favourited: boolean;
created_at: string;
updated_at: string;
}| Field | Type | Required |
|---|---|---|
id | string | Yes |
owner | string | Yes |
filename | string | Yes |
album | string | Yes |
tags | string[] | Yes |
urls | object | Yes |
upload | object | null | Yes |
info | object | Yes |
status | object | Yes |
alt | string | null | Yes |
nsfw | boolean | Yes |
license | string | Yes |
visibility | 'public' | 'private' | 'unlisted' | Yes |
permission | 'public' | 'private' | 'inherit' | Yes |
expiration_date | string | null | Yes |
is_private | boolean | Yes |
is_favourited | boolean | Yes |
created_at | string | Yes |
updated_at | string | Yes |
AlbumResource
typescript
interface AlbumResource {
album: string;
title: string;
description: string | null;
permission: 'public' | 'private';
count: number;
created_at: string;
updated_at: string;
cover_url?: string | null;
color?: string | null;
is_favourited?: boolean;
}| 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 |
color | string | null | No |
is_favourited | boolean | No |
TagResource
typescript
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
typescript
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
typescript
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
typescript
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 |
CustomLicenseResource
typescript
interface CustomLicenseResource {
id: string;
name: string;
spdx_identifier: string | null;
copyright_notice: string | null;
author: string | null;
attribution_required: boolean;
commercial_use: boolean;
derivatives_allowed: boolean;
share_alike: boolean;
created_at: string;
updated_at: string;
}| Field | Type | Required |
|---|---|---|
id | string | Yes |
name | string | Yes |
spdx_identifier | string | null | Yes |
copyright_notice | string | null | Yes |
author | string | null | Yes |
attribution_required | boolean | Yes |
commercial_use | boolean | Yes |
derivatives_allowed | boolean | Yes |
share_alike | boolean | Yes |
created_at | string | Yes |
updated_at | string | Yes |
WebhookResource
typescript
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
typescript
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 |
Import from: @pixflare/shared/types
Source: shared/src/types