@webx-ui/module-admin 0.19.0 → 0.20.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/dist/http.d.ts +12 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1818 -1556
- package/dist/index.js.map +1 -1
- package/dist/uploads.d.ts +79 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
|
@@ -44,14 +44,26 @@ export declare class HttpError extends Error {
|
|
|
44
44
|
get isUnauthenticated(): boolean;
|
|
45
45
|
get isThrottled(): boolean;
|
|
46
46
|
}
|
|
47
|
+
export interface SendOptions extends RequestOptions {
|
|
48
|
+
/** Sent as it is — bytes, a `Blob`, a string — with no `Content-Type` added for it. */
|
|
49
|
+
body?: BodyInit | null;
|
|
50
|
+
}
|
|
47
51
|
export interface Http {
|
|
48
52
|
get<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
49
53
|
post<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
50
54
|
put<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
51
55
|
patch<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
52
56
|
delete<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
57
|
+
/**
|
|
58
|
+
* A request with the panel's conventions (the CSRF cookie, the standing headers, 419 and 401)
|
|
59
|
+
* and nothing else: the body goes as it is and the response comes back whatever its status.
|
|
60
|
+
* For what JSON does not fit — the pieces of a chunked upload, a `HEAD` asked for a header.
|
|
61
|
+
* Optional so that a hand-made client in a test or a project does not have to grow one.
|
|
62
|
+
*/
|
|
63
|
+
send?(method: string, path: string, options?: SendOptions): Promise<Response>;
|
|
53
64
|
}
|
|
54
65
|
export declare function createHttp(options?: HttpOptions): Http;
|
|
66
|
+
export declare function toError(response: Response): Promise<HttpError>;
|
|
55
67
|
/**
|
|
56
68
|
* Laravel writes the token URL-encoded, and it is read back the same way it was written.
|
|
57
69
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export { useBodyKeys } from './keys';
|
|
|
10
10
|
export { createNotesApi, type EntityNote, type NoteAuthor, type NotesApi } from './notes';
|
|
11
11
|
export { createHistoryApi, historySubjectKey, historyValue, provideHistorySubject, useHistorySubject, type HistoryApi, type HistoryChange, type HistoryEntry, type HistoryEvent, type HistoryPage, type HistoryRun, type HistorySource, type HistorySubject, } from './history';
|
|
12
12
|
export { createLinksApi, emptyLink, type LinkCandidate, type LinkRel, type LinkSourceInfo, type LinkTarget, type LinkValue, type LinksApi, type ResolvedLink, } from './links';
|
|
13
|
-
export { createHttp, readCookie, HttpError, type Http, type HttpOptions, type RequestOptions, } from './http';
|
|
13
|
+
export { createHttp, readCookie, HttpError, type Http, type HttpOptions, type RequestOptions, type SendOptions, } from './http';
|
|
14
|
+
export { forgetUnfinishedUpload, MIN_CHUNK, unfinishedUploads, uploadFingerprint, useChunkedUpload, type ChunkedUpload, type ChunkedUploadOptions, type ChunkedUploadState, type UnfinishedUpload, } from './uploads';
|
|
14
15
|
export { adminTypes } from './screenTypes';
|
|
15
16
|
export { categoryRoutes, createCategoriesApi, itemOrderMode, reorderItems, useCategoryEditor, useCategoryWords, useItemOrder, type CategoriesApi, type CategoriesOptions, type CategoriesPayload, type CategoryDetail, type CategoryEditorContext, type CategoryRow, type CategoryWord, type ItemOrder, type ItemOrderMode, type ItemOrderState, } from './categories';
|
|
16
17
|
export { COLLECTION_MAX_LIMIT, collectionSources, defaultMarkup, normaliseCollection, type CollectionRelated, type CollectionRelationTarget, type CollectionSourceInfo, type CollectionValue, } from './collections/api';
|