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 +14 -7
- package/dist/rest-client-vue.js +383 -371
- package/dist/rest-client-vue.umd.cjs +1 -1
- package/dist/src/rest-collection-resources.d.ts +0 -1
- package/dist/src/rest-collection-resources.d.ts.map +1 -1
- package/dist/src/rest-collection.d.ts +13 -4
- package/dist/src/rest-collection.d.ts.map +1 -1
- package/dist/src/rest-resource.d.ts +1 -1
- package/dist/src/rest-resource.d.ts.map +1 -1
- package/dist/src/stores/rest-collection-store.d.ts +29 -13
- package/dist/src/stores/rest-collection-store.d.ts.map +1 -1
- package/dist/src/stores/rest-resource-store.d.ts +7 -7
- package/dist/src/stores/rest-resource-store.d.ts.map +1 -1
- package/package.json +9 -3
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
|
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
|
300
|
+
* return the saved items.
|
294
301
|
*
|
295
|
-
* @param
|
302
|
+
* @param partialResources The partial resources to update.
|
296
303
|
*/
|
297
|
-
updateResources: (
|
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: (
|
492
|
+
updateResource: (partialResource: T) => Promise<T | null | undefined>;
|
486
493
|
makeCustomApiRequest: (params: MakeCustomApiRequestParams) => Promise<any>;
|
487
494
|
}
|
488
495
|
|