@plone/client
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
import { z } from 'zod'; | ||
declare type ActionsArgs = z.infer<typeof getActionsSchema> & { | ||
config: PloneClientConfig; | ||
}; | ||
declare interface ActionsResponse { | ||
document_actions: Object_2[]; | ||
object: Object_2[]; | ||
object_buttons: Object_2[]; | ||
portal_tabs: Object_2[]; | ||
site_actions: Object_2[]; | ||
user: Object_2[]; | ||
} | ||
declare type AliasesArgs = z.infer<typeof getAliasesSchema> & { | ||
config: PloneClientConfig; | ||
}; | ||
declare type AliasesRootArgs = { | ||
config: PloneClientConfig; | ||
}; | ||
declare type BreadcrumbsArgs = z.infer<typeof getBreadcrumbsSchema> & { | ||
config: PloneClientConfig; | ||
}; | ||
declare interface BreadcrumbsResponse { | ||
'@id': string; | ||
items: Item_2; | ||
root: string; | ||
} | ||
declare type Components = 'actions' | 'aliases' | 'breadcrumbs' | 'contextnavigation' | 'navigation' | 'types' | 'workflow'; | ||
@@ -9,2 +40,15 @@ | ||
declare type ContextNavigationArgs = z.infer<typeof getContextNavigationSchema> & { | ||
config: PloneClientConfig; | ||
}; | ||
declare interface ContextNavigationResponse { | ||
'@id': string; | ||
available: boolean; | ||
has_custom_name: boolean; | ||
items: unknown[]; | ||
title: string; | ||
url: string; | ||
} | ||
declare type CreateContentArgs = z.infer<typeof createContentArgsSchema>; | ||
@@ -352,6 +396,2 @@ | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
data: { | ||
@@ -431,4 +471,2 @@ '@type': string; | ||
}; | ||
}, { | ||
path: string; | ||
config: { | ||
@@ -438,2 +476,4 @@ apiPath: string; | ||
}; | ||
}, { | ||
path: string; | ||
data: { | ||
@@ -513,2 +553,6 @@ '@type': string; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}>; | ||
@@ -624,2 +668,45 @@ | ||
declare const getActionsSchema: z.ZodObject<{ | ||
path: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
path: string; | ||
}, { | ||
path: string; | ||
}>; | ||
declare interface GetAliasesResponse { | ||
'@id': string; | ||
items: Array<{ | ||
path: string; | ||
}>; | ||
items_total: number; | ||
} | ||
declare interface GetAliasesRootResponse { | ||
'@id': string; | ||
items: Array<{ | ||
datetime: string; | ||
manual: boolean; | ||
path: string; | ||
'redirect-to': string; | ||
}>; | ||
items_total: number; | ||
} | ||
declare const getAliasesSchema: z.ZodObject<{ | ||
path: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
path: string; | ||
}, { | ||
path: string; | ||
}>; | ||
declare const getBreadcrumbsSchema: z.ZodObject<{ | ||
path: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
path: string; | ||
}, { | ||
path: string; | ||
}>; | ||
declare const getContentArgsSchema: z.ZodObject<{ | ||
@@ -692,2 +779,18 @@ path: z.ZodString; | ||
declare const getContextNavigationSchema: z.ZodObject<{ | ||
path: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
path: string; | ||
}, { | ||
path: string; | ||
}>; | ||
declare const getNavigationSchema: z.ZodObject<{ | ||
path: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
path: string; | ||
}, { | ||
path: string; | ||
}>; | ||
declare type ImageScale = { | ||
@@ -709,2 +812,15 @@ download: string; | ||
declare interface Item_2 { | ||
'@id': string; | ||
title: string; | ||
} | ||
declare interface Item_3 { | ||
'@id': string; | ||
description: string; | ||
items: unknown[]; | ||
review_state: string; | ||
title: string; | ||
} | ||
declare interface Login { | ||
@@ -750,2 +866,18 @@ token: string; | ||
declare type NavigationArgs = z.infer<typeof getNavigationSchema> & { | ||
config: PloneClientConfig; | ||
}; | ||
declare interface NavigationResponse { | ||
'@id': string; | ||
items: Item_3[]; | ||
} | ||
declare interface Object_2 { | ||
icon: string; | ||
id: string; | ||
title: string; | ||
url: string; | ||
} | ||
declare class PloneClient { | ||
@@ -779,6 +911,2 @@ config: PloneClientConfig; | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
data: { | ||
@@ -858,2 +986,6 @@ '@type': string; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<CreateContentResponse>; | ||
@@ -865,6 +997,2 @@ }; | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
data: { | ||
@@ -941,2 +1069,6 @@ allow_discussion?: boolean | undefined; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<UpdateContentResponse>; | ||
@@ -954,2 +1086,87 @@ }; | ||
}; | ||
getBreadcrumbsQuery: (args: Omit<BreadcrumbsArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<BreadcrumbsResponse>; | ||
}; | ||
getNavigationQuery: (args: Omit<NavigationArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<NavigationResponse>; | ||
}; | ||
getContextNavigationQuery: (args: Omit<ContextNavigationArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<ContextNavigationResponse>; | ||
}; | ||
getActionsQuery: (args: Omit<ActionsArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<ActionsResponse>; | ||
}; | ||
getAliasesQuery: (args: Omit<AliasesArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<GetAliasesResponse>; | ||
}; | ||
createAliasesMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ path, data }: Omit<{ | ||
path: string; | ||
data: { | ||
items: { | ||
path: string; | ||
}[]; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<undefined>; | ||
}; | ||
deleteAliasesMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ path, data }: Omit<{ | ||
path: string; | ||
data: { | ||
items: { | ||
path: string; | ||
}[]; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<undefined>; | ||
}; | ||
getAliasesRootQuery: (args: Omit<AliasesRootArgs, "config">) => { | ||
queryKey: string[]; | ||
queryFn: () => Promise<GetAliasesRootResponse>; | ||
}; | ||
createAliasesRootMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ data }: Omit<{ | ||
data: { | ||
items: { | ||
path: string; | ||
datetime: string; | ||
'redirect-to': string; | ||
}[]; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<undefined>; | ||
}; | ||
deleteAliasesRootMutation: () => { | ||
mutationKey: string[]; | ||
mutationFn: ({ path, data }: Omit<{ | ||
path: string; | ||
data: { | ||
items: { | ||
path: string; | ||
}[]; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}, "config">) => Promise<undefined>; | ||
}; | ||
} | ||
@@ -1336,6 +1553,2 @@ export default PloneClient; | ||
path: string; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
data: { | ||
@@ -1412,4 +1625,2 @@ allow_discussion?: boolean | undefined; | ||
}; | ||
}, { | ||
path: string; | ||
config: { | ||
@@ -1419,2 +1630,4 @@ apiPath: string; | ||
}; | ||
}, { | ||
path: string; | ||
data: { | ||
@@ -1491,2 +1704,6 @@ allow_discussion?: boolean | undefined; | ||
}; | ||
config: { | ||
apiPath: string; | ||
token?: string | undefined; | ||
}; | ||
}>; | ||
@@ -1493,0 +1710,0 @@ |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"repository": { | ||
@@ -70,3 +70,2 @@ "type": "git", | ||
"@types/react-dom": "18.0.11", | ||
"@types/superagent": "4.1.16", | ||
"@typescript-eslint/eslint-plugin": "5.57.1", | ||
@@ -93,3 +92,3 @@ "@typescript-eslint/parser": "5.57.1", | ||
"@tanstack/react-query": "4.29.1", | ||
"superagent": "8.0.9", | ||
"axios": "^1.4.0", | ||
"universal-cookie": "^4.0.4", | ||
@@ -96,0 +95,0 @@ "zod": "^3.21.4" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
22
214316
5235
2
+ Addedaxios@^1.4.0
+ Addedaxios@1.7.9(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
- Removedsuperagent@8.0.9
- Removedasap@2.0.6(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedcookiejar@2.1.4(transitive)
- Removeddebug@4.4.0(transitive)
- Removeddezalgo@1.0.4(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.1.1(transitive)
- Removedfast-safe-stringify@2.1.1(transitive)
- Removedformidable@2.1.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.7(transitive)
- Removedget-proto@1.0.1(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhexoid@1.0.0(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
- Removedmethods@1.1.2(transitive)
- Removedmime@2.6.0(transitive)
- Removedms@2.1.3(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedonce@1.4.0(transitive)
- Removedqs@6.14.0(transitive)
- Removedsemver@7.6.3(transitive)
- Removedside-channel@1.1.0(transitive)
- Removedside-channel-list@1.0.0(transitive)
- Removedside-channel-map@1.0.1(transitive)
- Removedside-channel-weakmap@1.0.2(transitive)
- Removedsuperagent@8.0.9(transitive)
- Removedwrappy@1.0.2(transitive)