@luminocity/lemonate-gateway 8.2.3 → 8.2.5
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/index.d.ts +24 -13
- package/dist/lemonate-gateway.cjs.js +3 -3
- package/dist/lemonate-gateway.cjs.js.map +1 -1
- package/dist/lemonate-gateway.esm.js +3 -3
- package/dist/lemonate-gateway.esm.js.map +1 -1
- package/dist/lemonate-gateway.umd.js +3 -3
- package/dist/lemonate-gateway.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
|
+
import * as axios from 'axios';
|
|
2
3
|
import { AxiosInstance, ResponseType } from 'axios';
|
|
3
4
|
import WebSocket from 'isomorphic-ws';
|
|
4
5
|
import FormData from 'form-data';
|
|
@@ -613,7 +614,7 @@ type BaseBlogArticle = {
|
|
|
613
614
|
tags: string[];
|
|
614
615
|
slug?: string;
|
|
615
616
|
};
|
|
616
|
-
type ProgressCallback = (percent: number, loaded: number, total: number | undefined) => void;
|
|
617
|
+
type ProgressCallback$1 = (percent: number, loaded: number, total: number | undefined) => void;
|
|
617
618
|
type ConversationEntry = {
|
|
618
619
|
_id: string;
|
|
619
620
|
text: string;
|
|
@@ -1568,7 +1569,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
1568
1569
|
execute(method: string, resource: string, data?: unknown, options?: Partial<{
|
|
1569
1570
|
responseType: ResponseType;
|
|
1570
1571
|
withNext: boolean;
|
|
1571
|
-
progressCallback?: ProgressCallback;
|
|
1572
|
+
progressCallback?: ProgressCallback$1;
|
|
1572
1573
|
emitOnSuccess: string;
|
|
1573
1574
|
headers: {
|
|
1574
1575
|
[key: string]: string;
|
|
@@ -1921,14 +1922,14 @@ declare class ApiClient extends EventEmitter {
|
|
|
1921
1922
|
* @param {Function} [progressCallback] - Download progress callback.
|
|
1922
1923
|
* @returns {Promise<Blob>} The downloaded item.
|
|
1923
1924
|
*/
|
|
1924
|
-
downloadItem(id: string, progressCallback?: ProgressCallback): Promise<any>;
|
|
1925
|
+
downloadItem(id: string, progressCallback?: ProgressCallback$1): Promise<any>;
|
|
1925
1926
|
/**
|
|
1926
1927
|
* Download a public item by ID.
|
|
1927
1928
|
* @param {string} id - The item ID.
|
|
1928
1929
|
* @param {Function} [loadingProgressFunc] - Download progress callback.
|
|
1929
1930
|
* @returns {Promise<Blob>} The downloaded item.
|
|
1930
1931
|
*/
|
|
1931
|
-
publicDownloadItem(id: any, loadingProgressFunc?: ProgressCallback): Promise<any>;
|
|
1932
|
+
publicDownloadItem(id: any, loadingProgressFunc?: ProgressCallback$1): Promise<any>;
|
|
1932
1933
|
/**
|
|
1933
1934
|
* Get the hash of an item by ID.
|
|
1934
1935
|
* @param {string} id - The item ID.
|
|
@@ -1958,7 +1959,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
1958
1959
|
* @param {AbortController} [controller] - Abort controller for the request.
|
|
1959
1960
|
* @returns {Promise<Object>} The response.
|
|
1960
1961
|
*/
|
|
1961
|
-
uploadThumbnail(id: string, size: number, bufferOrFile: any, filename?: string, progressCallback?: ProgressCallback, controller?: AbortController): Promise<any>;
|
|
1962
|
+
uploadThumbnail(id: string, size: number, bufferOrFile: any, filename?: string, progressCallback?: ProgressCallback$1, controller?: AbortController): Promise<any>;
|
|
1962
1963
|
/**
|
|
1963
1964
|
* Get a public thumbnail for an item.
|
|
1964
1965
|
* @param {string} size - The thumbnail size.
|
|
@@ -2023,7 +2024,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
2023
2024
|
* @param {AbortController} [controller] - Abort controller for the request.
|
|
2024
2025
|
* @returns {Promise<Object>} The created item.
|
|
2025
2026
|
*/
|
|
2026
|
-
uploadAndCreate(folderId: string, data: any, filename: string, options: any, progressCallback?: ProgressCallback, controller?: AbortController): Promise<any>;
|
|
2027
|
+
uploadAndCreate(folderId: string, data: any, filename: string, options: any, progressCallback?: ProgressCallback$1, controller?: AbortController): Promise<any>;
|
|
2027
2028
|
/**
|
|
2028
2029
|
* Upload a file to an existing item.
|
|
2029
2030
|
* @param itemId - The item ID.
|
|
@@ -2034,7 +2035,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
2034
2035
|
* @param [options.omitHandleDependencyChange] - If true, will not cause previews and thumbnails to rerender
|
|
2035
2036
|
* @param [options.keepThumbnails] - If true, will not remove thumbnails to be rerendered
|
|
2036
2037
|
*/
|
|
2037
|
-
upload(itemId: string, bufferOrFile: Buffer | File | Blob | string, filename: string, progressCallback?: ProgressCallback, controller?: AbortController, options?: {
|
|
2038
|
+
upload(itemId: string, bufferOrFile: Buffer | File | Blob | string, filename: string, progressCallback?: ProgressCallback$1, controller?: AbortController, options?: {
|
|
2038
2039
|
omitHandleDependencyChange?: boolean;
|
|
2039
2040
|
keepThumbnails?: boolean;
|
|
2040
2041
|
}): Promise<void>;
|
|
@@ -2071,7 +2072,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
2071
2072
|
* @param {Function} [progressCallback] - Download progress callback.
|
|
2072
2073
|
* @returns {Promise<Blob>} The downloaded attachment.
|
|
2073
2074
|
*/
|
|
2074
|
-
downloadAttachmentPOP(id: string, name: string, queryParam?: number, index?: number, progressCallback?: ProgressCallback): Promise<any>;
|
|
2075
|
+
downloadAttachmentPOP(id: string, name: string, queryParam?: number, index?: number, progressCallback?: ProgressCallback$1): Promise<any>;
|
|
2075
2076
|
_getAttachmentUrlPath(id: string, name: string, queryParam?: number, index?: number, isPublic?: boolean): string;
|
|
2076
2077
|
/**
|
|
2077
2078
|
* Download attachment
|
|
@@ -2082,7 +2083,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
2082
2083
|
* @param [progressCallback] - Download progress callback.
|
|
2083
2084
|
* @returns The attachment data.
|
|
2084
2085
|
*/
|
|
2085
|
-
downloadAttachment(id: string, name: string, queryParam?: number, index?: number, progressCallback?: ProgressCallback): Promise<{
|
|
2086
|
+
downloadAttachment(id: string, name: string, queryParam?: number, index?: number, progressCallback?: ProgressCallback$1): Promise<{
|
|
2086
2087
|
blob: Blob;
|
|
2087
2088
|
}>;
|
|
2088
2089
|
/**
|
|
@@ -2094,7 +2095,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
2094
2095
|
* @param {Function} [progressCallback] - Download progress callback.
|
|
2095
2096
|
* @returns {Promise<Blob>} The downloaded attachment.
|
|
2096
2097
|
*/
|
|
2097
|
-
downloadPublicAttachment(id: string, name: string, queryParam?: number, index?: number, progressCallback?: ProgressCallback): Promise<any>;
|
|
2098
|
+
downloadPublicAttachment(id: string, name: string, queryParam?: number, index?: number, progressCallback?: ProgressCallback$1): Promise<any>;
|
|
2098
2099
|
/**
|
|
2099
2100
|
* Upload an attachment to an item. This endpoint needs admin permissions.
|
|
2100
2101
|
* @param {string} id - Id of the item to attach the file to
|
|
@@ -2107,7 +2108,7 @@ declare class ApiClient extends EventEmitter {
|
|
|
2107
2108
|
* @param {AbortController} [controller] - Abort controller for the request.
|
|
2108
2109
|
* @return {Promise<Object>}
|
|
2109
2110
|
*/
|
|
2110
|
-
uploadAttachment(id: string, name: string, queryParam?: number, index?: number, bufferOrFile?: any, filename?: string, progressCallback?: ProgressCallback, controller?: AbortController): Promise<any>;
|
|
2111
|
+
uploadAttachment(id: string, name: string, queryParam?: number, index?: number, bufferOrFile?: any, filename?: string, progressCallback?: ProgressCallback$1, controller?: AbortController): Promise<any>;
|
|
2111
2112
|
/**
|
|
2112
2113
|
* Invalidates attachment in attachmentCache and then deletes attachment
|
|
2113
2114
|
* @param {string} id - The item ID.
|
|
@@ -4088,6 +4089,12 @@ declare namespace Package {
|
|
|
4088
4089
|
export type { Package_MetadataItem as MetadataItem };
|
|
4089
4090
|
}
|
|
4090
4091
|
|
|
4092
|
+
type ProgressCallback = (progressInfo: {
|
|
4093
|
+
phase: string;
|
|
4094
|
+
percent: number;
|
|
4095
|
+
bytesTotal: number;
|
|
4096
|
+
bytesLoaded: number;
|
|
4097
|
+
}) => void;
|
|
4091
4098
|
declare class ItemRepo {
|
|
4092
4099
|
apiClient: ApiClient;
|
|
4093
4100
|
activeItem: PreparedItem | undefined;
|
|
@@ -4131,7 +4138,7 @@ declare class ItemRepo {
|
|
|
4131
4138
|
createNewScript(parent: Block, index: number | undefined, ownerItem: PreparedItem): Script;
|
|
4132
4139
|
removeScript(script: Script, parent: Block): void;
|
|
4133
4140
|
findBlock(id: string): Block | null;
|
|
4134
|
-
loadPackage(url: string): Promise<PreparedItem>;
|
|
4141
|
+
loadPackage(url: string, progressCallback?: ProgressCallback): Promise<PreparedItem>;
|
|
4135
4142
|
createPackageItemUrl(itemId: string): string | null;
|
|
4136
4143
|
revokePackageItemUrl(url: string): void;
|
|
4137
4144
|
_loadPackageContentRecursively(item: any, reportProgressFunc: Function): Promise<PreparedItem[]>;
|
|
@@ -4325,6 +4332,10 @@ declare const _default: {
|
|
|
4325
4332
|
* @param {{minS?:number, maxS?:number, minL?:number, maxL?:number, return?:'hex'|'hsl'|'rgb'}} [opts]
|
|
4326
4333
|
*/
|
|
4327
4334
|
colorFromString(str: string, opts?: any): string;
|
|
4335
|
+
downloadFile(url: string, progressCallback?: (percent: number, bytesTotal: number, bytesLoaded: number) => void): Promise<axios.AxiosResponse<any, any> | {
|
|
4336
|
+
data: Blob;
|
|
4337
|
+
mimeType: string;
|
|
4338
|
+
}>;
|
|
4328
4339
|
};
|
|
4329
4340
|
|
|
4330
4341
|
declare class ProfilerEntry {
|
|
@@ -12432,4 +12443,4 @@ declare class CustomField extends Snapshotable {
|
|
|
12432
12443
|
}
|
|
12433
12444
|
|
|
12434
12445
|
export { AccessDeniedException, AggregatedItem, ApiClient, ApiGateway, Block, CustomField, EventEmitter, Field, InvalidArgumentException, InvalidStateException, Item, ItemCache$1 as ItemCache, ItemRepo, ItemVisibility, LinkableItemsCache, LoaderException, Package as PackageTools, PreparedItem, Profiler, Proxifier, ProxyEvent, QuotaExceededException, Script, ScriptField, Snapshot, Storage, Template, TemplateFactory, ThumbCache, UndoManager, eventBus, getDatatypeByName, getDatatypes, hasPermission, profileAsyncBlock, profileBlock, _default as tools, verifyAcl };
|
|
12435
|
-
export type { Acl, Attachments, BaseBlogArticle, ConversationEntry, CustomFieldDefinition, FolderListingOptions, FolderListingWithOptions, ItemOptions, ItemQueryOptions, ItemQueryWithOptions, ItemWithOptions, JobState, Me, ProgressCallback, UserInfo };
|
|
12446
|
+
export type { Acl, Attachments, BaseBlogArticle, ConversationEntry, CustomFieldDefinition, FolderListingOptions, FolderListingWithOptions, ItemOptions, ItemQueryOptions, ItemQueryWithOptions, ItemWithOptions, JobState, Me, ProgressCallback$1 as ProgressCallback, UserInfo };
|