rest-client-sdk 7.2.3 → 7.4.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.
- package/README.md +6 -1
- package/dist/index.cjs +583 -1218
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +581 -1214
- package/dist/index.mjs.map +1 -1
- package/dist/types/Mapping/ClassMetadata.d.ts +2 -2
- package/dist/types/RestClientSdk.d.ts +3 -3
- package/dist/types/RestClientSdkInterface.d.ts +1 -1
- package/dist/types/TokenGenerator/AuthorizationCodeFlowTokenGenerator.d.ts +3 -3
- package/dist/types/TokenGenerator/ClientCredentialsGenerator.d.ts +3 -3
- package/dist/types/TokenGenerator/PasswordGenerator.d.ts +3 -3
- package/dist/types/TokenGenerator/ProvidedTokenGenerator.d.ts +1 -1
- package/dist/types/TokenGenerator/TokenGeneratorInterface.d.ts +1 -1
- package/dist/types/TokenGenerator/types.d.ts +3 -3
- package/dist/types/UnitOfWork.d.ts +2 -2
- package/dist/types/client/AbstractClient.d.ts +9 -0
- package/dist/types/serializer/SerializerInterface.d.ts +4 -4
- package/dist/types/utils/logging.d.ts +5 -5
- package/package.json +28 -43
package/README.md
CHANGED
|
@@ -207,13 +207,18 @@ sdk.getRepository('products').create(entity);
|
|
|
207
207
|
|
|
208
208
|
sdk.getRepository('products').update(entity);
|
|
209
209
|
|
|
210
|
+
sdk.getRepository('products').patch(entity);
|
|
211
|
+
|
|
210
212
|
sdk.getRepository('products').delete(entity);
|
|
211
213
|
```
|
|
212
214
|
|
|
213
215
|
All these methods returns promises.
|
|
214
|
-
`create` and `
|
|
216
|
+
`create`, `update` and `patch` returns a `Promise<Entity>` with the new entity.
|
|
215
217
|
`delete` returns `Promise<void>`.
|
|
216
218
|
|
|
219
|
+
`update` and `patch` behave the same way (same arguments, same UnitOfWork
|
|
220
|
+
dirty-field handling) but use the `PUT` and `PATCH` HTTP verbs respectively.
|
|
221
|
+
|
|
217
222
|
### Overriding repository
|
|
218
223
|
|
|
219
224
|
You can override the default repository
|