@spiffcommerce/core 0.10.92 → 0.10.94
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/main.js +2 -2
- package/dist/module.js +2 -2
- package/dist/types.d.ts +18 -2
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -268,7 +268,17 @@ interface StorageService {
|
|
|
268
268
|
setMap<K = any, V = any>(key: string, val: Map<K, V>): void;
|
|
269
269
|
}
|
|
270
270
|
export const persistenceService: StorageService;
|
|
271
|
-
|
|
271
|
+
/**
|
|
272
|
+
* An asset manager provides a way to create and
|
|
273
|
+
* manage assets on the Spiff Commerce Platform.
|
|
274
|
+
*/
|
|
275
|
+
interface AssetManager {
|
|
276
|
+
/**
|
|
277
|
+
* Uploads a file to the Spiff Commerce Platform.
|
|
278
|
+
*/
|
|
279
|
+
uploadFile: (file: File, onProgress: (val: number) => void) => Promise<IServerModel<_Asset1>>;
|
|
280
|
+
}
|
|
281
|
+
declare class AssetService implements AssetManager {
|
|
272
282
|
constructor();
|
|
273
283
|
/**
|
|
274
284
|
* Allows for retrieving an asset, returns the option from a cache if possible.
|
|
@@ -286,7 +296,8 @@ declare class AssetService {
|
|
|
286
296
|
* Upload a user asset to the server. Using callbacks to notify important events.
|
|
287
297
|
* The asset will be stored via the persistence service for future access, if available.
|
|
288
298
|
*/
|
|
289
|
-
uploadAssetWithProgress(file: FileInfo, assetType: _AssetType1, onProgress: (val: number) => void,
|
|
299
|
+
uploadAssetWithProgress(file: FileInfo, assetType: _AssetType1, onProgress: (val: number) => void, anonymous?: boolean, partnerId?: string): Promise<IServerModel<_Asset1>>;
|
|
300
|
+
uploadFile(file: File, onProgress: (val: number) => void): Promise<IServerModel<_Asset1>>;
|
|
290
301
|
removePersistedAsset(assetKey: string): void;
|
|
291
302
|
getPersistedAssets(): PersistedAsset[];
|
|
292
303
|
/**
|
|
@@ -1436,6 +1447,11 @@ interface ClientOptions {
|
|
|
1436
1447
|
*/
|
|
1437
1448
|
export class SpiffCommerceClient {
|
|
1438
1449
|
constructor(options: ClientOptions);
|
|
1450
|
+
/**
|
|
1451
|
+
* @returns The asset manager allows for common operations related to assets
|
|
1452
|
+
* and the Spiff Commerce platform.
|
|
1453
|
+
*/
|
|
1454
|
+
getAssetManager(): AssetManager;
|
|
1439
1455
|
/**
|
|
1440
1456
|
* @returns A list of designs saved.
|
|
1441
1457
|
*/
|