@dskripchenko/laravel-admin 1.44.1 → 1.45.1
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/.vite/manifest.json +2 -2
- package/dist/api/errors.d.ts +14 -0
- package/dist/assets/app-B4vfwKxh.js +44 -0
- package/dist/assets/{app-D8xmSFFQ.css → app-D1N69Xpm.css} +1 -1
- package/dist/components/layouts/EmbeddedResourceTable.test.d.ts +1 -0
- package/dist/composables/useActionRunner.d.ts +6 -0
- package/dist/index.cjs +19 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +13467 -13419
- package/dist/index.mjs.map +1 -1
- package/dist/kitContract.test.d.ts +1 -0
- package/dist/source-hash.txt +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/assets/app-BSLBKVsR.js +0 -44
package/dist/.vite/manifest.json
CHANGED
package/dist/api/errors.d.ts
CHANGED
|
@@ -38,3 +38,17 @@ export declare class NetworkError extends Error {
|
|
|
38
38
|
* Turns an HTTP status and an envelope into the right ApiError subclass.
|
|
39
39
|
*/
|
|
40
40
|
export declare function toApiError(status: number, payload: ErrorEnvelope['payload']): ApiError;
|
|
41
|
+
/**
|
|
42
|
+
* The reason the server gave for refusing a request, or `fallback` when it
|
|
43
|
+
* gave none.
|
|
44
|
+
*
|
|
45
|
+
* A validation error answers with its first field message (the envelope's own
|
|
46
|
+
* message is usually a generic "The given data was invalid"), then the
|
|
47
|
+
* envelope's message — which is what an `action_failed` 422 carries. Any
|
|
48
|
+
* other ApiError answers with the envelope's message: a 403 says which
|
|
49
|
+
* permission is missing. A response with no envelope at all (see the
|
|
50
|
+
* client's `transport` marker) and the synthetic "API error 500" the ApiError
|
|
51
|
+
* constructor falls back to are not reasons, so they yield `fallback`. Plain
|
|
52
|
+
* errors (a network failure, a client-side check) answer with their message.
|
|
53
|
+
*/
|
|
54
|
+
export declare function apiErrorMessage(err: unknown, fallback: string): string;
|