@axium/client 0.18.2 → 0.18.3
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/locales.d.ts +5 -0
- package/dist/requests.js +1 -1
- package/locales/en.json +5 -0
- package/package.json +2 -1
package/dist/locales.d.ts
CHANGED
|
@@ -128,6 +128,11 @@ declare let currentLoaded: {
|
|
|
128
128
|
readonly plugins: "Plugins";
|
|
129
129
|
readonly audit: "Audit Log";
|
|
130
130
|
};
|
|
131
|
+
readonly toast: {
|
|
132
|
+
readonly suspended: "User suspended";
|
|
133
|
+
readonly unsuspended: "User un-suspended";
|
|
134
|
+
readonly user_updated: "User updated";
|
|
135
|
+
};
|
|
131
136
|
readonly audit: {
|
|
132
137
|
readonly any: "Any";
|
|
133
138
|
readonly apply: "Apply";
|
package/dist/requests.js
CHANGED
|
@@ -57,7 +57,7 @@ export async function fetchAPI(method, endpoint, data, ...params) {
|
|
|
57
57
|
}
|
|
58
58
|
const json = await response.json().catch(() => ({ message: 'Unknown server error (invalid JSON response)' }));
|
|
59
59
|
if (!response.ok)
|
|
60
|
-
throw new Error(json.message);
|
|
60
|
+
throw Object.assign(new Error(json.message), { status: response.status });
|
|
61
61
|
if (typeof json == 'object' && json != null && '_warnings' in json) {
|
|
62
62
|
for (const warning of json._warnings)
|
|
63
63
|
console.warn('[API]', warning);
|
package/locales/en.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/client",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"author": "James Prevett <jp@jamespre.dev>",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"./*": "./dist/*.js",
|
|
38
38
|
"./components": "./lib/index.js",
|
|
39
39
|
"./components/*": "./lib/*.svelte",
|
|
40
|
+
"./toast": "./lib/toast.js",
|
|
40
41
|
"./attachments": "./lib/attachments.js",
|
|
41
42
|
"./styles/*": "./styles/*.css"
|
|
42
43
|
},
|