@combinedk/plugin-host 3.4.0 → 3.5.0
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 +9 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle status carried by entries in `Versioned` collections: `Draft` is offline and
|
|
3
|
+
* `Published` is online. `Archived` is no longer written, because taking a row offline returns it
|
|
4
|
+
* to `Draft`; it stays in the type only so plugins that name it still compile.
|
|
5
|
+
*/
|
|
2
6
|
export type EntityStatus = 'Draft' | 'Published' | 'Archived';
|
|
3
7
|
/**
|
|
4
8
|
* A row returned by the host's plugin-entity endpoints. The wrapper carries
|
|
@@ -31,8 +35,8 @@ export interface ListEntityOptions {
|
|
|
31
35
|
* `/api/plugins/{assemblyId}/entities/{collection}`. Plugin frontends never
|
|
32
36
|
* compose URLs themselves — they call methods on this client.
|
|
33
37
|
*
|
|
34
|
-
* `publish` and `
|
|
35
|
-
* 404 when invoked against a `Live` collection.
|
|
38
|
+
* `publish` (Draft → Published, online) and `unpublish` (Published → Draft, offline) apply only
|
|
39
|
+
* to `Versioned` collections and return 404 when invoked against a `Live` collection.
|
|
36
40
|
*/
|
|
37
41
|
export interface PluginEntityClient {
|
|
38
42
|
list<T = unknown>(collection: string, options?: ListEntityOptions): Promise<PluginEntityRow<T>[]>;
|
|
@@ -41,6 +45,8 @@ export interface PluginEntityClient {
|
|
|
41
45
|
update<T = unknown>(collection: string, id: string, body: unknown): Promise<PluginEntityRow<T>>;
|
|
42
46
|
delete(collection: string, id: string): Promise<void>;
|
|
43
47
|
publish<T = unknown>(collection: string, id: string): Promise<PluginEntityRow<T>>;
|
|
48
|
+
unpublish<T = unknown>(collection: string, id: string): Promise<PluginEntityRow<T>>;
|
|
49
|
+
/** @deprecated Use `unpublish`, which takes the row offline to `Draft` the same way. */
|
|
44
50
|
archive<T = unknown>(collection: string, id: string): Promise<PluginEntityRow<T>>;
|
|
45
51
|
}
|
|
46
52
|
/**
|
package/package.json
CHANGED