@plone/client
Advanced tools
Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1
@@ -742,2 +742,204 @@ import { z } from 'zod'; | ||
declare class PloneClient { | ||
config: PloneClientConfig; | ||
static initialize: (config: PloneClientConfig) => InstanceType<typeof PloneClient>; | ||
constructor(config: PloneClientConfig); | ||
login: (loginArgs: Omit<LoginArgs, 'config'>) => Promise<string>; | ||
getConfig: () => { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
loginQuery: (args: Omit<{ | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
username: string; | ||
password: string; | ||
}, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<Login>; | ||
}; | ||
getContentQuery: (args: Omit<ContentArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<GetContentResponse>; | ||
}; | ||
createContentMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ path, data }: Omit<{ | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
data: { | ||
'@type': string; | ||
title: string; | ||
'@id'?: string | undefined; | ||
'@static_behaviors'?: unknown; | ||
allow_discussion?: boolean | undefined; | ||
blocks?: unknown; | ||
blocks_layout?: string[] | undefined; | ||
contributors?: string[] | undefined; | ||
creators?: string[] | undefined; | ||
description?: string | undefined; | ||
effective?: string | null | undefined; | ||
exclude_from_nav?: boolean | undefined; | ||
expires?: string | null | undefined; | ||
id?: string | undefined; | ||
language?: string | undefined; | ||
preview_caption?: string | undefined; | ||
preview_image?: { | ||
data: string; | ||
'content-type': string; | ||
encoding: string; | ||
filename: string; | ||
} | undefined; | ||
relatedItems?: { | ||
'@id': string; | ||
'@type': string; | ||
description: string; | ||
effective: string; | ||
exclude_from_nav: boolean; | ||
expires: string; | ||
id: string; | ||
CreationDate: string; | ||
Creator: string; | ||
Date: string; | ||
Description: string; | ||
ModificationDate: string; | ||
Subject: unknown[]; | ||
Title: string; | ||
Type: string; | ||
UID: string; | ||
commentators: unknown[]; | ||
created: string; | ||
getId: string; | ||
getObjSize: string; | ||
getPath: string; | ||
getURL: string; | ||
image_field: string; | ||
is_folderish: boolean; | ||
listCreators: string[]; | ||
mime_type: string; | ||
modified: string; | ||
portal_type: string; | ||
review_state: string; | ||
title: string; | ||
total_comments: number; | ||
EffectiveDate?: unknown; | ||
ExpirationDate?: unknown; | ||
author_name?: unknown; | ||
cmf_uid?: unknown; | ||
end?: unknown; | ||
getIcon?: unknown; | ||
getRemoteUrl?: unknown; | ||
hasPreviewImage?: unknown; | ||
head_title?: unknown; | ||
image_scales?: unknown; | ||
in_response_to?: unknown; | ||
last_comment_date?: unknown; | ||
location?: unknown; | ||
nav_title?: unknown; | ||
start?: unknown; | ||
sync_uid?: unknown; | ||
}[] | undefined; | ||
rights?: string | null | undefined; | ||
}; | ||
}, "config">) => Promise<CreateContentResponse>; | ||
}; | ||
updateContentMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ path, data }: Omit<{ | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
data: { | ||
allow_discussion?: boolean | undefined; | ||
blocks?: unknown; | ||
blocks_layout?: string[] | undefined; | ||
contributors?: string[] | undefined; | ||
creators?: string[] | undefined; | ||
description?: string | undefined; | ||
effective?: string | null | undefined; | ||
exclude_from_nav?: boolean | undefined; | ||
expires?: string | null | undefined; | ||
id?: string | null | undefined; | ||
preview_caption?: string | undefined; | ||
preview_image?: { | ||
data: string; | ||
'content-type': string; | ||
encoding: string; | ||
filename: string; | ||
} | undefined; | ||
relatedItems?: { | ||
'@id': string; | ||
'@type': string; | ||
description: string; | ||
effective: string; | ||
exclude_from_nav: boolean; | ||
expires: string; | ||
id: string; | ||
CreationDate: string; | ||
Creator: string; | ||
Date: string; | ||
Description: string; | ||
ModificationDate: string; | ||
Subject: unknown[]; | ||
Title: string; | ||
Type: string; | ||
UID: string; | ||
commentators: unknown[]; | ||
created: string; | ||
getId: string; | ||
getObjSize: string; | ||
getPath: string; | ||
getURL: string; | ||
image_field: string; | ||
is_folderish: boolean; | ||
listCreators: string[]; | ||
mime_type: string; | ||
modified: string; | ||
portal_type: string; | ||
review_state: string; | ||
title: string; | ||
total_comments: number; | ||
EffectiveDate?: unknown; | ||
ExpirationDate?: unknown; | ||
author_name?: unknown; | ||
cmf_uid?: unknown; | ||
end?: unknown; | ||
getIcon?: unknown; | ||
getRemoteUrl?: unknown; | ||
hasPreviewImage?: unknown; | ||
head_title?: unknown; | ||
image_scales?: unknown; | ||
in_response_to?: unknown; | ||
last_comment_date?: unknown; | ||
location?: unknown; | ||
nav_title?: unknown; | ||
start?: unknown; | ||
sync_uid?: unknown; | ||
}[] | undefined; | ||
rights?: string | undefined; | ||
table_of_contents?: boolean | null | undefined; | ||
title?: string | undefined; | ||
}; | ||
}, "config">) => Promise<UpdateContentResponse>; | ||
}; | ||
deleteContentMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ path }: Omit<{ | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<undefined>; | ||
}; | ||
} | ||
export default PloneClient; | ||
declare type PloneClientConfig = z.infer<typeof PloneClientConfigSchema>; | ||
@@ -744,0 +946,0 @@ |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.0-alpha.0", | ||
"version": "1.0.0-alpha.1", | ||
"repository": { | ||
@@ -15,0 +15,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
340752
7190