Glossary
Types
AuthTestResponse
type AuthTestResponse = {
message: string;
};
ContainsCIDResponse
type ContainsCIDResponse = {
containsCid: boolean;
cid: string | null;
};
ContentType
type ContentType =
| "application/json"
| "application/xml"
| "text/plain"
| "text/html"
| "text/css"
| "text/javascript"
| "application/javascript"
| "image/jpeg"
| "image/png"
| "image/gif"
| "image/svg+xml"
| "audio/mpeg"
| "audio/ogg"
| "video/mp4"
| "application/pdf"
| "application/octet-stream"
| string
| null;
DataEndponts
type DataEndponts = {
pinList?: boolean;
userPinnedDataTotal?: boolean;
};
Endpoints
type Endpoints = {
data?: DataEndponts;
pinning?: PinningEndpoints;
};
FileObject
type FileObject = {
name: string;
size: number;
type: string;
lastModified: number;
arrayBuffer: () => Promise<ArrayBuffer>;
};
GatewayAnalyticsQuery
type GatewayAnalyticsQuery = {
gateway_domain: string;
start_date: string;
end_date: string;
cid?: string;
file_name?: string;
user_agent?: string;
country?: string;
region?: string;
referer?: string;
limit?: number;
sort_order?: "asc" | "desc";
};
GetCIDResponse
type GetCIDResponse = {
data?: JSON | string | Blob | null;
contentType: ContentType;
};
GetGroupOptions
type GetGroupOptions = {
groupId: string;
};
GroupCIDOptions
type GroupCIDOptions = {
groupId: string;
cids: string[];
};
GroupOptions
type GroupOptions = {
name: string;
};
GroupQueryOptions
type GroupQueryOptions = {
nameContains?: string;
offset?: number;
limit?: number;
};
GroupResponseItem
type GroupResponseItem = {
id: string;
user_id: string;
name: string;
updatedAt: string;
createdAt: string;
};
JsonBody
type JsonBody = Record<string, unknown>;
KeyListItem
type KeyListItem = {
id: string;
name: string;
key: string;
secret: string;
max_uses: number;
uses: number;
user_id: string;
scopes: KeyScopes;
revoked: boolean;
createdAt: string;
updatedAt: string;
};
KeyListQuery
type KeyListQuery = {
revoked?: boolean;
limitedUse?: boolean;
exhausted?: boolean;
name?: string;
offset?: number;
};
KeyListResponse
type KeyListResponse = {
keys: KeyListItem[];
count: number;
};
KeyOptions
type KeyOptions = {
keyName: string;
permissions: KeyPermissions;
maxUses?: number;
};
KeyPermissions
type KeyPermissions = {
admin?: boolean;
endpoints?: Endpoints;
};
KeyResponse
type KeyResponse = {
JWT: string;
pinata_api_key: string;
pinata_api_secret: string;
};
KeyScopes
type KeyScopes = {
endpoints: {
pinning: {
pinFileToIPFS: boolean;
pinJSONToIPFS: boolean;
};
};
admin: boolean;
};
OptimizeImageOptions
type OptimizeImageOptions = {
width?: number;
height?: number;
dpr?: number;
fit?: "scaleDown" | "contain" | "cover" | "crop" | "pad";
gravity?: "auto" | "side" | string;
quality?: number;
format?: "auto" | "webp";
animation?: boolean;
sharpen?: number;
onError?: boolean;
metadata?: "keep" | "copyright" | "none";
};
PinByCIDResponse
type PinByCIDResponse = {
id: string;
ipfsHash: string;
status: "prechecking" | "retrieving";
name: string;
updated?: boolean;
};
PinataConfig
type PinataConfig = {
pinataJwt: string | undefined;
pinataGateway?: string;
pinataGatewayKey?: string;
customHeaders?: Record<string, string>;
endpointUrl?: string;
};
PinataMetadata
type PinataMetadata = {
name?: string;
keyValues?: Record<string, string | number>;
};
PinataMetadataUpdate
type PinataMetadataUpdate = {
cid: string;
name?: string;
keyValues?: Record<string, string | number>;
};
PinJobItem
type PinJobItem = {
id: string;
ipfs_pin_hash: string;
date_queued: string;
name: string;
status: string;
keyvalues: any;
host_nodes: string[];
pin_policy: {
regions: {
id: string;
desiredReplicationCount: number;
}[];
version: number;
};
};
PinJobQuery
type PinJobQuery = {
sort?: "ASC" | "DSC";
status?:
| "prechecking"
| "retrieving"
| "expired"
| "over_free_limit"
| "over_max_size"
| "invalid_object"
| "bad_host_node";
ipfs_pin_hash?: string;
limit?: number;
offset?: number;
};
PinJobResponse
type PinJobResponse = {
rows: PinJobItem[];
};
PinListItem
type PinListItem = {
id: string;
ipfs_pin_hash: string;
size: number;
user_id: string;
date_pinned: string;
date_unpinned: string | null;
metadata: {
name: string | null;
keyvalues: {
[key: string]: any;
} | null;
};
regions: {
regionId: string;
currentReplicationCount: number;
desiredReplicationCount: number;
}[];
mime_type: string;
number_of_files: number;
};
PinListQuery
type PinListQuery = {
cid?: string;
pinStart?: string;
pinEnd?: string;
pinSizeMin?: number;
pinSizeMax?: number;
pageLimit?: number;
pageOffset?: number;
name?: string;
groupId?: string;
key?: string;
value?: string | number;
operator?:
| "gt"
| "gte"
| "lt"
| "lte"
| "ne"
| "eq"
| "between"
| "notBetween"
| "like"
| "notLike"
| "iLike"
| "notILike"
| "regexp"
| "iRegexp";
};
PinListResponse
type PinListResponse = {
rows: PinListItem[];
};
PinningEndpoints
type PinningEndpoints = {
hashMetadata?: boolean;
hashPinPolicy?: boolean;
pinByHash?: boolean;
pinFileToIPFS?: boolean;
pinJSONToIPFS?: boolean;
pinJobs?: boolean;
unpin?: boolean;
userPinPolicy?: boolean;
};
PinResponse
type PinResponse = {
IpfsHash: string;
PinSize: number;
Timestamp: string;
isDuplicate?: boolean;
};
RevokeKeyResponse
type RevokeKeyResponse = {
key: string;
status: string;
};
SignatureOptions
type SignatureOptions = {
cid: string;
signature: string;
};
SignatureResponse
type SignatureResponse = {
cid: string;
signature: string;
};
SwapCidOptions
type SwapCidOptions = {
cid: string;
swapCid: string;
};
SwapCidResponse
type SwapCidResponse = {
mappedCid: string;
createdAt: string;
};
SwapHistoryOptions
type SwapHistoryOptions = {
cid: string;
domain: string;
};
TimeIntervalGatewayAnalyticsQuery
type TimeIntervalGatewayAnalyticsQuery = GatewayAnalyticsQuery & {
sort_by?: "requests" | "bandwidth";
date_interval: "day" | "week";
};
TimeIntervalGatewayAnalyticsResponse
type TimeIntervalGatewayAnalyticsResponse = {
total_requests: number;
total_bandwidth: number;
time_periods: TimePeriodItem[];
};
TimePeriodItem
type TimePeriodItem = {
period_start_time: string;
requests: number;
bandwidth: number;
};
TopGatewayAnalyticsItem
type TopGatewayAnalyticsItem = {
value: string;
requests: number;
bandwidth: number;
};
TopGatewayAnalyticsQuery
type TopGatewayAnalyticsQuery = GatewayAnalyticsQuery & {
sort_by: "requests" | "bandwidth";
attribute:
| "cid"
| "country"
| "region"
| "user_agent"
| "referer"
| "file_name";
};
UnpinResponse
type UnpinResponse = {
hash: string;
status: string;
};
UpdateGroupOptions
type UpdateGroupOptions = {
name: string;
groupId: string;
};
UploadCIDOptions
type UploadCIDOptions = {
metadata?: PinataMetadata;
peerAddresses?: string[];
keys?: string;
groupId?: string;
};
UploadOptions
type UploadOptions = {
metadata?: PinataMetadata;
pinType?: "async" | "sync" | "cidOnly";
keys?: string;
groupId?: string;
cidVersion?: 0 | 1;
};
UserPinnedDataResponse
type UserPinnedDataResponse = {
pin_count: number;
pin_size_total: number;
pin_size_with_replications_total: number;
};
On this page
- AuthTestResponse
- ContainsCIDResponse
- ContentType
- DataEndponts
- Endpoints
- FileObject
- GatewayAnalyticsQuery
- GetCIDResponse
- GetGroupOptions
- GroupCIDOptions
- GroupOptions
- GroupQueryOptions
- GroupResponseItem
- JsonBody
- KeyListItem
- KeyListQuery
- KeyListResponse
- KeyOptions
- KeyPermissions
- KeyResponse
- KeyScopes
- OptimizeImageOptions
- PinByCIDResponse
- PinataConfig
- PinataMetadata
- PinataMetadataUpdate
- PinJobItem
- PinJobQuery
- PinJobResponse
- PinListItem
- PinListQuery
- PinListResponse
- PinningEndpoints
- PinResponse
- RevokeKeyResponse
- SignatureOptions
- SignatureResponse
- SwapCidOptions
- SwapCidResponse
- SwapHistoryOptions
- TimeIntervalGatewayAnalyticsQuery
- TimeIntervalGatewayAnalyticsResponse
- TimePeriodItem
- TopGatewayAnalyticsItem
- TopGatewayAnalyticsQuery
- UnpinResponse
- UpdateGroupOptions
- UploadCIDOptions
- UploadOptions
- UserPinnedDataResponse