@weapnl/js-junction 0.0.1 → 0.0.2
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/CHANGELOG.md +2 -124
- package/index.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,127 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
## v3.3.4
|
|
9
|
-
- Changed how empty array/object is sent to API through form-data. Previously a key with a `null` value would be sent, now a key with an empty string value will be sent.
|
|
10
|
-
|
|
11
|
-
## v3.3.3
|
|
12
|
-
- Changed how empty array/object is sent to API through form-data. Previously no key or value would be sent, now a key with a `null` value will be sent.
|
|
13
|
-
|
|
14
|
-
## v3.3.2
|
|
15
|
-
- Added new option to `attribute, relation or accessor` called `jsonKey` which specifies the key to use when parsing from/to json.
|
|
16
|
-
|
|
17
|
-
## v3.3.1
|
|
18
|
-
- Now using *signal* instead of the deprecated *cancel token* to cancel requests.
|
|
19
|
-
- Updated `axios` to `1.3`.
|
|
20
|
-
- Fixed dependency vulnerabilities (`npm audit fix`).
|
|
21
|
-
|
|
22
|
-
## v3.3.0
|
|
23
|
-
- Added ability to set global headers.
|
|
24
|
-
|
|
25
|
-
## v3.2.0
|
|
26
|
-
- Added ability to set response interceptors.
|
|
27
|
-
|
|
28
|
-
## v3.1.0
|
|
29
|
-
- Fixed bug where `null` values were omitted when using a FormData request.
|
|
30
|
-
|
|
31
|
-
## v3.0.5
|
|
32
|
-
- Fixed the bug where the given data was merged into the files object in the `storeFiles` method.
|
|
33
|
-
|
|
34
|
-
## v3.0.4
|
|
35
|
-
- Added build service in docker-compose.
|
|
36
|
-
- Booleans are now cast to `'0'` or `'1'` in form data.
|
|
37
|
-
|
|
38
|
-
## v3.0.3
|
|
39
|
-
- Fixed bug where `model.show()` would allow an empty parameter, effectively causing an `index` request to be executed.
|
|
40
|
-
- When type of `attribute, relation or accessor` is Object, and the json value is an Array, convert it to an Object.
|
|
41
|
-
|
|
42
|
-
## v3.0.2
|
|
43
|
-
- Improvement to some JSDoc's for better autocomplete.
|
|
44
|
-
- Made data of FormData recursive when using the `storeFiles` method on the `Request` model.
|
|
45
|
-
|
|
46
|
-
## v3.0.1
|
|
47
|
-
- Fixed bug where `false` values would be parsed as `null`.
|
|
48
|
-
|
|
49
|
-
## v3.0.0
|
|
50
|
-
- Added docker-compose file.
|
|
51
|
-
- Now using `/src/index.js` as main file instead of `/dist/index.js`.
|
|
52
|
-
- Added a pluck method.
|
|
53
|
-
|
|
54
|
-
## v2.7.5
|
|
55
|
-
- Added `toJson` and `fromJson` options for accessors.
|
|
56
|
-
|
|
57
|
-
## v2.7.4
|
|
58
|
-
- Fixed a bug where the default value for Accessor's was not used properly.
|
|
59
|
-
|
|
60
|
-
## v2.7.3
|
|
61
|
-
- Fixed a bug where query params would contain empty or null values.
|
|
62
|
-
|
|
63
|
-
## v2.7.2
|
|
64
|
-
- Fixed a bug in `Caster.js` where Array type would be cast to an array inside an array (for example `[["test@email.com"]]`).
|
|
65
|
-
|
|
66
|
-
## v2.7.1
|
|
67
|
-
- Fixed a bug in `Caster.js` where an error was thrown if an accessor value of type `Model` was null/undefined.
|
|
68
|
-
- Added `storeFiles()` to the `batch` class.
|
|
69
|
-
|
|
70
|
-
## v2.7.0
|
|
71
|
-
- Added `counts` to count relations (#3).
|
|
72
|
-
- Added ability to perform an action using the `action()` method in the Request class.
|
|
73
|
-
- **BREAKING:** `save()` method on Model class doesn't accept `identifier` parameter anymore.
|
|
74
|
-
|
|
75
|
-
## v2.6.0
|
|
76
|
-
- Added ability to store files through the `storeFiles()` method in the request class.
|
|
77
|
-
- Added method (`customParameters`) to add custom parameters to a request.
|
|
78
|
-
- Now handling any status code between 200-300 as a successful request.
|
|
79
|
-
- Fixed a bug where the `Caster` class tried to cast an `undefined` value and crashed. Added extra check which returns `null` when the value to be cast is `undefined`
|
|
80
|
-
|
|
81
|
-
## v2.5.1
|
|
82
|
-
- Fixed bug where the `whereIn` filter set the wrong variable for the column.
|
|
83
|
-
|
|
84
|
-
## v2.5.0
|
|
85
|
-
- Added `save()` method to Model and Batch classes.
|
|
86
|
-
- Now setting properties on model instead of using getters/setters.
|
|
87
|
-
- Fixed bug where default attribute/relation values weren't set when creating a new model.
|
|
88
|
-
- Added ability to set type for `accessors` so they can be cast.
|
|
89
|
-
|
|
90
|
-
## v2.4.0
|
|
91
|
-
- Fixed bug where having 2 models with relations to each other would result in an infinite loop.
|
|
92
|
-
- Added `extraData` parameter to the `store()` and `update()` methods on a `Model`.
|
|
93
|
-
- Added function (`batch`) to run multiple requests at the same time (#2).
|
|
94
|
-
- Added ability to set default values in constructor of models.
|
|
95
|
-
- Response events are now async safe.
|
|
96
|
-
- Changed how casting is done and the caster doesn't try to cast `null` values anymore.
|
|
97
|
-
- Now formatting error messages so nested errors are returned as objects.
|
|
98
|
-
|
|
99
|
-
## v2.3.1
|
|
100
|
-
- Fixed bug where converting to snake case would break when using dot notation.
|
|
101
|
-
|
|
102
|
-
## v2.3.0
|
|
103
|
-
- **BREAKING:** Removed the `defaults()` and `casts()` methods in favor of a new `attributes()` method for better expandability of the package.
|
|
104
|
-
- Added `relations()` and `accessors()` methods to the Model class.
|
|
105
|
-
- **BREAKING:** Removed the `getAttribute()` and `setAttribute()` methods of the Model class.
|
|
106
|
-
- **BREAKING:** `toJson()` now returns the attributes, accessors and relations instead of just the attributes.
|
|
107
|
-
|
|
108
|
-
## v2.2.0
|
|
109
|
-
- Now converting columns to snake case in `order`, `search`, `whereIn` and `wheres`.
|
|
110
|
-
- Moved `pagination` from modifiers to separate class (in accordance with https://repo.weap.nl/packages/laravel/restapi/-/merge_requests/8).
|
|
111
|
-
- Added optional `findPageById` parameter to `pagination` to find the page the given id is on.
|
|
112
|
-
|
|
113
|
-
## v2.1.0
|
|
114
|
-
- Added `casts()` method to the `Model` class so specific casts can be done on incoming json.
|
|
115
|
-
- Fixed a bug where in some filters the wrong separator was used to generate the url.
|
|
116
|
-
|
|
117
|
-
## v2.0.0
|
|
118
|
-
- Added `Model` class with included query builder for an easier syntax than the existing requests.
|
|
119
|
-
- Changed entry file from `api.js` to a new file `index.js`.
|
|
120
|
-
- Moved some code from `Request` to new class `Connection` to support the new `Model` class.
|
|
121
|
-
- Moved `filter` and `modifier` methods to mixins.
|
|
122
|
-
- **BREAKING:** Changed how the `api` is initialized and configured. Read `README.md` for more info.
|
|
123
|
-
|
|
124
|
-
## v1.1.0
|
|
125
|
-
- Added custom callbacks `onSuccess`, `onError`, `onValidationError`, `onUnauthorized`, `onForbidden`.
|
|
126
|
-
|
|
127
|
-
## v1.0.0
|
|
128
|
-
- Initial version
|
|
5
|
+
## v0.0.1
|
|
6
|
+
- Initial version.
|
package/index.d.ts
CHANGED