@webx-ui/module-services 0.1.17 → 0.2.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.
@@ -6,7 +6,7 @@
6
6
  * project its price with a patch rather than a fork of this file. Saving is by autosave — a pause
7
7
  * after the last keystroke, and the moment a field is left — into the draft; the site changes
8
8
  * only on "Publish". Edits are guarded by a revision: a save over somebody else's is refused with
9
- * a 409 and the question of which version the site gets.
9
+ * a 409, merged with theirs, and asked about only where both changed the same place.
10
10
  */
11
11
  type __VLS_Props = {
12
12
  base?: string;
package/dist/api.d.ts CHANGED
@@ -13,7 +13,8 @@ export interface ServicesApi {
13
13
  save(id: number, input: ServiceSave): Promise<ServiceDetail>;
14
14
  /** Throw away what is waiting and keep what the site is showing. */
15
15
  discard(id: number): Promise<ServiceDetail>;
16
- publish(id: number): Promise<ServiceRow>;
16
+ /** `revision` is what the editor held: a draft that moved on since is answered 409, not published. */
17
+ publish(id: number, revision?: string): Promise<ServiceRow>;
17
18
  unpublish(id: number): Promise<ServiceRow>;
18
19
  remove(id: number): Promise<void>;
19
20
  restore(id: number): Promise<ServiceRow>;