Comparing version 1.2.1 to 1.2.2
import { AxiosInstance } from "axios"; | ||
declare var Butter: (apiToken: string, testMode?: boolean, timeout?: number, axiosHook?: (axios: AxiosInstance) => unknown) => ButterStatic; | ||
export namespace Butter { | ||
interface Response { | ||
data?: any; | ||
status?: number; | ||
statusText?: string; | ||
headers?: any; | ||
config?: any; | ||
} | ||
declare interface ButterResponse { | ||
data?: any; | ||
status?: number; | ||
statusText?: string; | ||
headers?: any; | ||
config?: any; | ||
} | ||
interface PostMethods { | ||
retrieve(slug: string, params?: any): Promise<Response>; | ||
list(params?: any): Promise<Response>; | ||
search(query: string, params?: any): Promise<Response>; | ||
} | ||
declare interface ButterPostMethods { | ||
retrieve(slug: string, params?: any): Promise<ButterResponse>; | ||
list(params?: any): Promise<ButterResponse>; | ||
search(query: string, params?: any): Promise<ButterResponse>; | ||
} | ||
interface CategoryMethods { | ||
retrieve(slug: string, params?: any): Promise<Response>; | ||
list(params?: any): Promise<Response>; | ||
} | ||
declare interface ButterCategoryMethods { | ||
retrieve(slug: string, params?: any): Promise<ButterResponse>; | ||
list(params?: any): Promise<ButterResponse>; | ||
} | ||
interface TagMethods { | ||
retrieve(slug: string, params?: any): Promise<Response>; | ||
list(params?: any): Promise<Response>; | ||
} | ||
declare interface ButterTagMethods { | ||
retrieve(slug: string, params?: any): Promise<ButterResponse>; | ||
list(params?: any): Promise<ButterResponse>; | ||
} | ||
interface AuthorMethods { | ||
retrieve(slug: string, params?: any): Promise<Response>; | ||
list(params?: any): Promise<Response>; | ||
} | ||
declare interface ButterAuthorMethods { | ||
retrieve(slug: string, params?: any): Promise<ButterResponse>; | ||
list(params?: any): Promise<ButterResponse>; | ||
} | ||
interface FeedMethods { | ||
retrieve(slug: string, params?: any): Promise<Response>; | ||
} | ||
declare interface ButterFeedMethods { | ||
retrieve(slug: string, params?: any): Promise<ButterResponse>; | ||
} | ||
interface PageMethods { | ||
retrieve( | ||
page_type: string, | ||
page_slug: string, | ||
params?: any | ||
): Promise<Response>; | ||
list(page_type: string, params?: any): Promise<Response>; | ||
} | ||
declare interface ButterPageMethods { | ||
retrieve(page_type: string, page_slug: string, params?: any): Promise<ButterResponse>; | ||
list(page_type: string, params?: any): Promise<ButterResponse>; | ||
interface ContentMethods { | ||
retrieve(keys: Array<string>, params?: any): Promise<Response>; | ||
} | ||
} | ||
declare interface ButterContentMethods { | ||
retrieve(keys: Array<string>, params?: any): Promise<ButterResponse>; | ||
export class ButterStatic { | ||
post: Butter.PostMethods; | ||
category: Butter.CategoryMethods; | ||
tag: Butter.TagMethods; | ||
author: Butter.AuthorMethods; | ||
feed: Butter.FeedMethods; | ||
page: Butter.PageMethods; | ||
content: Butter.ContentMethods; | ||
constructor( | ||
apiToken: string, | ||
testMode?: boolean, | ||
timeout?: number, | ||
axiosHook?: (axios: AxiosInstance) => unknown | ||
); | ||
} | ||
declare interface ButterStatic { | ||
post: ButterPostMethods; | ||
category: ButterCategoryMethods; | ||
tag: ButterTagMethods; | ||
author: ButterAuthorMethods; | ||
feed: ButterFeedMethods; | ||
page: ButterPageMethods; | ||
content: ButterContentMethods; | ||
} | ||
export const Butter: ( | ||
apiToken: string, | ||
testMode?: boolean, | ||
timeout?: number, | ||
axiosHook?: (axios: AxiosInstance) => unknown | ||
) => ButterStatic; | ||
export = Butter; | ||
export default Butter; |
{ | ||
"name": "buttercms", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "ButterCMS API Client", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
84660
1979