KeyPermissions

export type KeyPermissions = {
	admin?: boolean;
	endpoints?: Endpoints;
};

Endpoints

export type Endpoints = {
	data?: DataEndponts;
	pinning?: PinningEndpoints;
};

DataEndponts

export type DataEndponts = {
	pinList?: boolean;
	userPinnedDataTotal?: boolean;
};

PinningEndpoints

export type PinningEndpoints = {
	hashMetadata?: boolean;
	hashPinPolicy?: boolean;
	pinByHash?: boolean;
	pinFileToIPFS?: boolean;
	pinJSONToIPFS?: boolean;
	pinJobs?: boolean;
	unpin?: boolean;
	userPinPolicy?: boolean;
};

KeyOptions

export type KeyOptions = {
	keyName: string;
	permissions: KeyPermissions;
	maxUses?: number;
};

KeyResponse

export type KeyResponse = {
	JWT: string;
	pinata_api_key: string;
	pinata_api_secret: string;
};

KeyListQuery

export type KeyListQuery = {
	revoked?: boolean;
	limitedUse?: boolean;
	exhausted?: boolean;
	name?: string;
	offset?: number;
};

KeyListItem

export 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;
};

KeyScopes

type KeyScopes = {
	endpoints: {
		pinning: {
			pinFileToIPFS: boolean;
			pinJSONToIPFS: boolean;
		};
	};
	admin: boolean;
};

KeyListResponse

export type KeyListResponse = {
	keys: KeyListItem[];
	count: number;
};

RevokeKeyResponse

export type RevokeKeyResponse = {
	key: string;
	status: string;
};