apps-sdk 1.0.26 → 1.0.27
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/package.json +1 -1
- package/src/libraries/Storage.js +3 -5
- package/types/index.d.ts +3 -3
package/package.json
CHANGED
package/src/libraries/Storage.js
CHANGED
|
@@ -187,14 +187,12 @@ class Storage {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
async handleShareFile(
|
|
191
|
-
const fileUri = FileSystem.documentDirectory + fileName;
|
|
192
|
-
const { uri: localUri } = await FileSystem.downloadAsync(url, fileUri);
|
|
190
|
+
async handleShareFile(fileName) {
|
|
193
191
|
if (!(await Sharing.isAvailableAsync())) {
|
|
194
192
|
alert('Compartir no está disponible en tu plataforma.');
|
|
195
|
-
return;
|
|
193
|
+
return false;
|
|
196
194
|
}
|
|
197
|
-
await Sharing.shareAsync(
|
|
195
|
+
return await Sharing.shareAsync(fileName);
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
|
package/types/index.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ declare module 'apps-sdk' {
|
|
|
56
56
|
getEndpoints(): any;
|
|
57
57
|
setEvents(events: any): void;
|
|
58
58
|
sendEvent(eventType: string, eventKeyword:string, eventData?: object): Promise<void>;
|
|
59
|
-
|
|
59
|
+
}
|
|
60
60
|
|
|
61
61
|
export class Storage {
|
|
62
62
|
storeData(key: string, value: any): Promise<void>;
|
|
@@ -64,9 +64,9 @@ declare module 'apps-sdk' {
|
|
|
64
64
|
printAllKeys(): Promise<void>;
|
|
65
65
|
removeData(key: string): Promise<void>;
|
|
66
66
|
handleDownloadImage(url: string, filename: string): Promise<void>;
|
|
67
|
-
handleShareFile(
|
|
67
|
+
handleShareFile(filename: string): Promise<boolean>;
|
|
68
68
|
createCreationsDir(dirName: string): Promise<void>;
|
|
69
|
-
handleDownloadImageToCreations(base64Image: string, fileName: string, data: object): Promise<
|
|
69
|
+
handleDownloadImageToCreations(base64Image: string, fileName: string, data: object): Promise<{ directoryUri: string, fileUri: string, fileData: any }>;
|
|
70
70
|
getCreations(): Promise<any>;
|
|
71
71
|
deleteCreation(dirName: string): Promise<void>;
|
|
72
72
|
deleteAllCreations(): Promise<void>;
|