@levo-so/core 0.3.24 → 0.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -198,7 +198,7 @@ export declare const createLevoClient: (options: ILevoClientOptions) => {
|
|
|
198
198
|
};
|
|
199
199
|
readonly collection: {
|
|
200
200
|
getAllCollections: (data?: import("./types").LevoQuery.FindQuery<"name" | "workspace_id" | "created_at" | "id" | "kind" | "description" | "updated_at" | "icon" | "hidden" | "key" | "readonly" | "on_submit" | "on_update" | "module_name" | "allow_public_submit" | "public_submit_set_by" | "sections" | "views" | "title_field" | "email_field" | "mobile_field" | "settings" | "allow_draft" | "allow_multiple" | "allow_public_view" | "public_view_set_by" | "public_view_set_by_account" | "public_submit_set_by_account" | "entry_count">, options?: WretchOptions) => Promise<IResponseMultiple<ILemaCollection>>;
|
|
201
|
-
getCollectionByIDExpanded: <T = ILemaCollection>(id: string, options?: WretchOptions) => Promise<IResponseSingle<T>>;
|
|
201
|
+
getCollectionByIDExpanded: <T = ILemaCollection>(id: string, options?: WretchOptions) => Promise<IResponseSingle<T, IMetaWithPermissions>>;
|
|
202
202
|
createCollection: (data: ILemaCollection) => Promise<IResponseSingle<ILemaCollection>>;
|
|
203
203
|
saveCollectionData: ({ collection_id, data, options, }: {
|
|
204
204
|
collection_id: string;
|
|
@@ -1871,6 +1871,15 @@ export declare interface IMeta {
|
|
|
1871
1871
|
pages: number;
|
|
1872
1872
|
}
|
|
1873
1873
|
|
|
1874
|
+
/**
|
|
1875
|
+
* `meta` of responses that report the caller's permissions per resource, keyed by resource id.
|
|
1876
|
+
* Scoped to the exact resource — unlike the workspace-wide `access` map, which unions every
|
|
1877
|
+
* role the staff holds regardless of which collection, view, or blog it was granted on.
|
|
1878
|
+
*/
|
|
1879
|
+
export declare interface IMetaWithPermissions<T = Record<string, boolean>> {
|
|
1880
|
+
permissions?: Record<string, IResourcePermission<T>>;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1874
1883
|
export declare interface IModuleStudioConfig {
|
|
1875
1884
|
page_id: string;
|
|
1876
1885
|
preview_url: string;
|
|
@@ -2126,6 +2135,14 @@ export declare interface IRemoteLoggerMiddlewareOptions {
|
|
|
2126
2135
|
context?: Record<string, any>;
|
|
2127
2136
|
}
|
|
2128
2137
|
|
|
2138
|
+
/** The caller's permissions on one resource, as returned in `meta.permissions`. */
|
|
2139
|
+
export declare interface IResourcePermission<T = Record<string, boolean>> {
|
|
2140
|
+
object: string;
|
|
2141
|
+
id: string;
|
|
2142
|
+
/** Empty when the caller holds no grant on this resource type at all. */
|
|
2143
|
+
access: Partial<T>;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2129
2146
|
export declare interface IResponseError {
|
|
2130
2147
|
status: false;
|
|
2131
2148
|
content: IErrorContent;
|