@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.
Files changed (2) hide show
  1. package/dist/index.d.ts +9 -3
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- /** Lifecycle status carried by entries in `Versioned` collections. */
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 `archive` apply only to `Versioned` collections and return
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combinedk/plugin-host",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Types and contracts for plugin frontends mounted into the Combine DataController host shell.",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",