unsplash-js
Advanced tools
Comparing version 7.0.4 to 7.0.5
import * as search from './methods/search'; | ||
import * as _internals from './internals'; | ||
export declare const createApi: (args: ({ | ||
apiVersion?: string | undefined; | ||
fetch?: typeof fetch | undefined; | ||
} & Pick<RequestInit, "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> & { | ||
accessKey: string; | ||
apiUrl?: undefined; | ||
}) | ({ | ||
apiVersion?: string | undefined; | ||
fetch?: typeof fetch | undefined; | ||
} & Pick<RequestInit, "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> & { | ||
apiUrl: string; | ||
accessKey?: undefined; | ||
})) => { | ||
export declare const createApi: (args: import("./helpers/request").InitParams) => { | ||
photos: { | ||
get: (a: { | ||
photoId: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/photos/types").Full>>; | ||
list: (a: import("./types/request").PaginationParams | undefined, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/photos/types").Full>>; | ||
list: (a: import("./types/request").PaginationParams | undefined, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: import("./methods/photos/types").Basic[]; | ||
@@ -26,3 +14,3 @@ total: number; | ||
photoId: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/photos/types").Stats>>; | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/photos/types").Stats>>; | ||
getRandom: (a: ({ | ||
@@ -34,6 +22,6 @@ collectionIds?: string[] | undefined; | ||
count?: number | undefined; | ||
} & import("./types/request").OrientationParam) | undefined, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/photos/types").Random>>; | ||
} & import("./types/request").OrientationParam) | undefined, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/photos/types").Random>>; | ||
trackDownload: (a: { | ||
downloadLocation: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
url: string; | ||
@@ -47,3 +35,3 @@ }>>; | ||
username: string; | ||
} & import("./types/request").PaginationParams, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
} & import("./types/request").PaginationParams, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: import("./methods/photos/types").Basic[]; | ||
@@ -54,3 +42,3 @@ total: number; | ||
username: string; | ||
} & import("./types/request").PaginationParams, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
} & import("./types/request").PaginationParams, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: import("./methods/collections/types").Basic[]; | ||
@@ -61,3 +49,3 @@ total: number; | ||
username: string; | ||
} & import("./types/request").PaginationParams, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
} & import("./types/request").PaginationParams, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: import("./methods/photos/types").Basic[]; | ||
@@ -68,6 +56,6 @@ total: number; | ||
username: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/users/types").Full>>; | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/users/types").Full>>; | ||
}; | ||
search: { | ||
getCollections: (a: search.SearchParams, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/search/types/response").Collections>>; | ||
getCollections: (a: search.SearchParams, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/search/types/response").Collections>>; | ||
getPhotos: (a: { | ||
@@ -81,4 +69,4 @@ query: string; | ||
collectionIds?: string[] | undefined; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/search/types/response").Photos>>; | ||
getUsers: (a: search.SearchParams, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/search/types/response").Users>>; | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/search/types/response").Photos>>; | ||
getUsers: (a: search.SearchParams, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/search/types/response").Users>>; | ||
}; | ||
@@ -88,3 +76,3 @@ collections: { | ||
collectionId: string; | ||
} & import("./types/request").PaginationParams & import("./types/request").OrientationParam, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
} & import("./types/request").PaginationParams & import("./types/request").OrientationParam, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: any[]; | ||
@@ -95,4 +83,4 @@ total: number; | ||
collectionId: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<any>>; | ||
list: (a: Pick<import("./types/request").PaginationParams, "page" | "perPage"> | undefined, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<any>>; | ||
list: (a: Pick<import("./types/request").PaginationParams, "page" | "perPage"> | undefined, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: any[]; | ||
@@ -103,3 +91,3 @@ total: number; | ||
collectionId: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<any>>; | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<any>>; | ||
}; | ||
@@ -110,3 +98,3 @@ topics: { | ||
topicIdsOrSlugs?: string[] | undefined; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: import("./methods/topics/types").Basic[]; | ||
@@ -117,6 +105,6 @@ total: number; | ||
topicIdOrSlug: string; | ||
}, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/topics/types").Full>>; | ||
}, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<import("./methods/topics/types").Full>>; | ||
getPhotos: (a: { | ||
topicIdOrSlug: string; | ||
} & import("./types/request").PaginationParams & import("./types/request").OrientationParam, additionalFetchOptions?: Pick<RequestInit, "body" | "cache" | "credentials" | "headers" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
} & import("./types/request").PaginationParams & import("./types/request").OrientationParam, additionalFetchOptions?: RequestInit | undefined) => Promise<import("./helpers/response").ApiResponse<{ | ||
results: import("./methods/photos/types").Basic[]; | ||
@@ -123,0 +111,0 @@ total: number; |
@@ -14,3 +14,3 @@ import { OrientationParam, PaginationParams } from '../../types/request'; | ||
topicIdsOrSlugs?: string[] | undefined; | ||
}, additionalFetchOptions?: Pick<RequestInit, "headers" | "body" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => import("../../helpers/request").CompleteRequestParams; | ||
}, additionalFetchOptions?: RequestInit | undefined) => import("../../helpers/request").CompleteRequestParams; | ||
handleResponse: import("../../helpers/response").HandleResponse<{ | ||
@@ -22,7 +22,7 @@ results: Topic.Basic[]; | ||
export declare const get: { | ||
handleRequest: (a: TopicIdOrSlug, additionalFetchOptions?: Pick<RequestInit, "headers" | "body" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => import("../../helpers/request").CompleteRequestParams; | ||
handleRequest: (a: TopicIdOrSlug, additionalFetchOptions?: RequestInit | undefined) => import("../../helpers/request").CompleteRequestParams; | ||
handleResponse: import("../../helpers/response").HandleResponse<Topic.Full>; | ||
}; | ||
export declare const getPhotos: { | ||
handleRequest: (a: TopicIdOrSlug & PaginationParams & OrientationParam, additionalFetchOptions?: Pick<RequestInit, "headers" | "body" | "cache" | "credentials" | "integrity" | "keepalive" | "mode" | "redirect" | "referrer" | "referrerPolicy" | "signal" | "window"> | undefined) => import("../../helpers/request").CompleteRequestParams; | ||
handleRequest: (a: TopicIdOrSlug & PaginationParams & OrientationParam, additionalFetchOptions?: RequestInit | undefined) => import("../../helpers/request").CompleteRequestParams; | ||
handleResponse: import("../../helpers/response").HandleResponse<{ | ||
@@ -29,0 +29,0 @@ results: Photo.Basic[]; |
{ | ||
"name": "unsplash-js", | ||
"version": "7.0.4", | ||
"version": "7.0.5", | ||
"description": "Official JavaScript wrapper for the Unsplash API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
294490
3406