rest-client-vue 1.2.0-b3 → 1.2.1-a

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 CHANGED
@@ -66,8 +66,6 @@ export declare type Resource = object;
66
66
  */
67
67
  export declare type ResourceId<T = string | number> = T;
68
68
 
69
- export declare type ResourcePropertyUpdate = object;
70
-
71
69
  /** A subcollection belonging to each resource of a certain type. */
72
70
  export declare interface ResourceSubcollection {
73
71
  /** The subcollection name, which is used in constructing its path. */
@@ -287,14 +285,23 @@ export declare interface RestCollection<T extends Resource = Resource> {
287
285
  */
288
286
  saveResources: (resources: T[]) => Promise<T[] | undefined>;
289
287
  /**
290
- * Partial update of one or more resources.
288
+ * Partial update of one resource.
289
+ *
290
+ * If you call this with await, it will return once the API call has completed, and if the APi call succeeded, it will
291
+ * return the newly saved item.
292
+ *
293
+ * @param partialResource The partial resource to update.
294
+ */
295
+ updateResource: (partialResource: T) => Promise<T | null | undefined>;
296
+ /**
297
+ * Partial update of multiple resources.
291
298
  *
292
299
  * If you call this with await, it will return once the API call has completed, and if the APi call succeeded, it will
293
- * return the updated items.
300
+ * return the saved items.
294
301
  *
295
- * @param resourcePropertyUpdates A list of resource IDs, property paths, values, and update methods to apply.
302
+ * @param partialResources The partial resources to update.
296
303
  */
297
- updateResources: (resourcePropertyUpdates: T[]) => Promise<T[] | undefined>;
304
+ updateResources: (partialResources: T[]) => Promise<T[] | undefined>;
298
305
  /**
299
306
  * Record which resources have failed validation.
300
307
  *
@@ -482,7 +489,7 @@ export declare interface RestResourceClient<T extends Resource = Resource> {
482
489
  refreshResource: () => Promise<T | null | undefined>;
483
490
  deleteResource: () => Promise<void>;
484
491
  saveResource: (resource: T) => Promise<T | null | undefined>;
485
- updateResource: (resourcePropertyUpdates: T[]) => Promise<T | null | undefined>;
492
+ updateResource: (partialResource: T) => Promise<T | null | undefined>;
486
493
  makeCustomApiRequest: (params: MakeCustomApiRequestParams) => Promise<any>;
487
494
  }
488
495