@data-client/rest 0.12.7 → 0.13.4

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.
@@ -86,26 +86,26 @@ export interface RestInstance<F extends FetchFunction = FetchFunction, S extends
86
86
  ...Parameters<E>
87
87
  ]): PaginationEndpoint<E, A>;
88
88
  paginated<E extends RestInstanceBase<FetchFunction, any, undefined>, C extends string>(this: E, cursorField: C): PaginationFieldEndpoint<E, C>;
89
- /** Endpoint to append the next page extending a list for pagination
89
+ /** Concatinate the next page of results (GET)
90
90
  * @see https://dataclient.io/rest/api/RestEndpoint#getPage
91
91
  */
92
92
  getPage: 'paginationField' extends keyof O ? O['paginationField'] extends string ? PaginationFieldEndpoint<F & {
93
93
  schema: S;
94
94
  sideEffect: M;
95
95
  } & O, O['paginationField']> : undefined : undefined;
96
- /** Endpoint that pushes (place at end) a newly created entity to this Collection
96
+ /** Create a new item (POST) and `push` to the end
97
97
  * @see https://dataclient.io/rest/api/RestEndpoint#push
98
98
  */
99
99
  push: AddEndpoint<F, ExtractCollection<S>['push'], Exclude<O, 'body' | 'method'> & {
100
100
  body: OptionsToAdderBodyArgument<O> | OptionsToAdderBodyArgument<O>[] | FormData;
101
101
  }>;
102
- /** Endpoint that unshifts (place at start) a newly created entity to this Collection
102
+ /** Create a new item (POST) and `unshift` to the beginning
103
103
  * @see https://dataclient.io/rest/api/RestEndpoint#unshift
104
104
  */
105
105
  unshift: AddEndpoint<F, ExtractCollection<S>['unshift'], Exclude<O, 'body' | 'method'> & {
106
106
  body: OptionsToAdderBodyArgument<O> | OptionsToAdderBodyArgument<O>[] | FormData;
107
107
  }>;
108
- /** Endpoint that assigns newly created entities to their respective keys in this Collection
108
+ /** Create new item(s) (POST) and `Object.assign` merge
109
109
  * @see https://dataclient.io/rest/api/RestEndpoint#assign
110
110
  */
111
111
  assign: AddEndpoint<F, ExtractCollection<S>, Exclude<O, 'body' | 'method'> & {
@@ -55,7 +55,7 @@ export interface Resource<O extends ResourceGenerics = {
55
55
  path: ResourcePath;
56
56
  schema: any;
57
57
  }> extends Extendable<O> {
58
- /** Get a singular item
58
+ /** Get one item (GET)
59
59
  *
60
60
  * @see https://dataclient.io/rest/api/createResource#get
61
61
  */
@@ -63,7 +63,7 @@ export interface Resource<O extends ResourceGenerics = {
63
63
  path: O['path'];
64
64
  schema: O['schema'];
65
65
  }>;
66
- /** Get a list of item
66
+ /** Get an Array of items (GET)
67
67
  *
68
68
  * @see https://dataclient.io/rest/api/createResource#getlist
69
69
  */
@@ -86,26 +86,26 @@ export interface RestInstance<F extends FetchFunction = FetchFunction, S extends
86
86
  ...Parameters<E>
87
87
  ]): PaginationEndpoint<E, A>;
88
88
  paginated<E extends RestInstanceBase<FetchFunction, any, undefined>, C extends string>(this: E, cursorField: C): PaginationFieldEndpoint<E, C>;
89
- /** Endpoint to append the next page extending a list for pagination
89
+ /** Concatinate the next page of results (GET)
90
90
  * @see https://dataclient.io/rest/api/RestEndpoint#getPage
91
91
  */
92
92
  getPage: 'paginationField' extends keyof O ? O['paginationField'] extends string ? PaginationFieldEndpoint<F & {
93
93
  schema: S;
94
94
  sideEffect: M;
95
95
  } & O, O['paginationField']> : undefined : undefined;
96
- /** Endpoint that pushes (place at end) a newly created entity to this Collection
96
+ /** Create a new item (POST) and `push` to the end
97
97
  * @see https://dataclient.io/rest/api/RestEndpoint#push
98
98
  */
99
99
  push: AddEndpoint<F, ExtractCollection<S>['push'], Exclude<O, 'body' | 'method'> & {
100
100
  body: OptionsToAdderBodyArgument<O> | OptionsToAdderBodyArgument<O>[] | FormData;
101
101
  }>;
102
- /** Endpoint that unshifts (place at start) a newly created entity to this Collection
102
+ /** Create a new item (POST) and `unshift` to the beginning
103
103
  * @see https://dataclient.io/rest/api/RestEndpoint#unshift
104
104
  */
105
105
  unshift: AddEndpoint<F, ExtractCollection<S>['unshift'], Exclude<O, 'body' | 'method'> & {
106
106
  body: OptionsToAdderBodyArgument<O> | OptionsToAdderBodyArgument<O>[] | FormData;
107
107
  }>;
108
- /** Endpoint that assigns newly created entities to their respective keys in this Collection
108
+ /** Create new item(s) (POST) and `Object.assign` merge
109
109
  * @see https://dataclient.io/rest/api/RestEndpoint#assign
110
110
  */
111
111
  assign: AddEndpoint<F, ExtractCollection<S>, Exclude<O, 'body' | 'method'> & {
@@ -55,7 +55,7 @@ export interface Resource<O extends ResourceGenerics = {
55
55
  path: ResourcePath;
56
56
  schema: any;
57
57
  }> extends Extendable<O> {
58
- /** Get a singular item
58
+ /** Get one item (GET)
59
59
  *
60
60
  * @see https://dataclient.io/rest/api/createResource#get
61
61
  */
@@ -63,7 +63,7 @@ export interface Resource<O extends ResourceGenerics = {
63
63
  path: O['path'];
64
64
  schema: O['schema'];
65
65
  }>;
66
- /** Get a list of item
66
+ /** Get an Array of items (GET)
67
67
  *
68
68
  * @see https://dataclient.io/rest/api/createResource#getlist
69
69
  */