Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-dropbox-sdk

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-dropbox-sdk - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

2

dist/Dropbox-sdk.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("es6-promise")):"function"==typeof define&&define.amd?define(["es6-promise"],t):"object"==typeof exports?exports.Dropbox=t(require("es6-promise")):e.Dropbox=t(e["es6-promise"])}(this,function(e){return function(e){function t(s){if(r[s])return r[s].exports;var n=r[s]={exports:{},id:s,loaded:!1};return e[s].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var s=r(7);e.exports=s},function(e,t,r){function s(){return i}function n(){var e=Array.prototype.slice.call(arguments);return o.fetch.apply(null,e)}var i=r(8),o={fetch:s()};n.harness=o,e.exports=n},function(e,t){function r(e){return"https://"+e+".dropboxapi.com/2/"}e.exports=r},function(t,r){t.exports=e},function(e,t){function r(e){return JSON.stringify(e).replace(s,function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)})}var s=/[\u007f-\uffff]/g;e.exports=r},function(e,t,r){var s,n=r(10);r(9),s=function(e){e=e||{},this.accessToken=e.accessToken,this.clientId=e.clientId,this.selectUser=e.selectUser,this.proxy=e.proxy},s.prototype.setAccessToken=function(e){this.accessToken=e},s.prototype.getAccessToken=function(){return this.accessToken},s.prototype.setClientId=function(e){this.clientId=e},s.prototype.getClientId=function(){return this.clientId},s.prototype.setProxy=function(e){this.proxy=e},s.prototype.getProxy=function(){return this.proxy},s.prototype.getAuthenticationUrl=function(e,t){var r,s="https://www.dropbox.com/oauth2/authorize",n=this.getClientId();if(!n)throw new Error("A client id is required. You can set the client id using .setClientId().");if(!e)throw new Error("A redirect uri is required.");return r=s+"?response_type=token&client_id="+n,e&&(r=r+"&redirect_uri="+e),t&&(r=r+"&state="+t),r},s.prototype.authenticateWithCordova=function(e,t){var r="https://www.dropbox.com/1/oauth2/redirect_receiver",s=this.getAuthenticationUrl(r),n=window.open(s,"_blank"),i=!1,o=function(e){window.setTimeout(function(){n.close()},10),t()},u=function(r){var s="&error=",i=r.url.indexOf(s);if(i>-1)window.setTimeout(function(){n.close()},10),t();else{var o="#access_token=",u=r.url.indexOf(o),a=r.url.indexOf("&token_type=");if(u>-1){u+=o.length,window.setTimeout(function(){n.close()},10);var c=r.url.substring(u,a);e(c)}}},a=function(e){i||(n.removeEventListener("loaderror",o),n.removeEventListener("loadstop",u),n.removeEventListener("exit",a),i=!0)};n.addEventListener("loaderror",o),n.addEventListener("loadstop",u),n.addEventListener("exit",a)},s.prototype.request=function(e,t,r,s,i){var o=null;switch(i){case n.RPC:o=this.getRpcRequest();break;case n.DOWNLOAD:o=this.getDownloadRequest();break;case n.UPLOAD:o=this.getUploadRequest();break;default:throw new Error("Invalid request style: "+i)}return o(e,t,r,s,this.getAccessToken(),this.selectUser,this.proxy)},s.prototype.setRpcRequest=function(e){s.prototype.rpcRequest=e},s.prototype.getRpcRequest=function(){return void 0===s.prototype.rpcRequest&&(s.prototype.rpcRequest=r(12)),s.prototype.rpcRequest},s.prototype.setDownloadRequest=function(e){s.prototype.downloadRequest=e},s.prototype.getDownloadRequest=function(){return void 0===s.prototype.downloadRequest&&(s.prototype.downloadRequest=r(6)),s.prototype.downloadRequest},s.prototype.setUploadRequest=function(e){s.prototype.uploadRequest=e},s.prototype.getUploadRequest=function(){return void 0===s.prototype.uploadRequest&&(s.prototype.uploadRequest=r(13)),s.prototype.uploadRequest},e.exports=s},function(e,t,r){var s,n,i=r(3).Promise,o=r(2),u=r(4),a=r(1);s=function(e){return{status:e.status,error:e.toString()}},n=function(e,t,r,n,c,p){if("user"!==r)throw new Error("Unexpected auth type: "+r);var h=function(r,h){var f={method:"POST",headers:{Authorization:"Bearer "+c,"Dropbox-API-Arg":u(t)}};p&&(f.headers["Dropbox-API-Select-User"]=p),a(o(n)+e,f).then(function(e){var t;if(!e.ok)throw t=new Error("Request failed"),t.status=e.status,t;return e}).then(function(e){return i.all([e.buffer&&e.buffer()||e.blob(),i.resolve(e.headers)])}).then(function(e){var t=e[0],s=e[1],n=JSON.parse(s.get("dropbox-api-result"));n.fileBinary=t,r(n)}).catch(function(e){h(s(e))})};return new i(h)},e.exports=n},function(e,t,r){var s,n=r(5),i=r(11);s=function(e){n.call(this,e)},s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype=Object.assign(s.prototype,i),s.prototype.filesGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"api","download")},e.exports=s},function(e,t){"use strict";var r={};!function(e){function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function n(e){this.map={},e instanceof n?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function u(e){var t=new FileReader,r=o(t);return t.readAsArrayBuffer(e),r}function a(e){var t=new FileReader,r=o(t);return t.readAsText(e),r}function c(e){for(var t=new Uint8Array(e),r=new Array(t.length),s=0;s<t.length;s++)r[s]=String.fromCharCode(t[s]);return r.join("")}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(m.arrayBuffer&&m.blob&&g(e))this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!q(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(u)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return a(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=f(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),s=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(n))}}),t}function y(e){var t=new n,r=e.replace(/\r?\n[\t ]+/g," ");return r.split(/\r?\n/).forEach(function(e){var r=e.split(":"),s=r.shift().trim();if(s){var n=r.join(":").trim();t.append(s,n)}}),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new n(t.headers),this.url=t.url||"",this._initBody(e)}var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=function(e){return e&&DataView.prototype.isPrototypeOf(e)},q=ArrayBuffer.isView||function(e){return e&&b.indexOf(Object.prototype.toString.call(e))>-1};n.prototype.append=function(e,s){e=t(e),s=r(s);var n=this.map[e];this.map[e]=n?n+","+s:s},n.prototype.delete=function(e){delete this.map[t(e)]},n.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,s){this.map[t(e)]=r(s)},n.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},n.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),s(e)},n.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),s(e)},n.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),s(e)},m.iterable&&(n.prototype[Symbol.iterator]=n.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},h.call(l.prototype),h.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];_.redirect=function(e,t){if(w.indexOf(t)===-1)throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=l,e.Response=_,e.fetch=function(e,t){return new Promise(function(r,s){var n=new l(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;r(new _(t,e))},i.onerror=function(){s(new TypeError("Network request failed"))},i.ontimeout=function(){s(new TypeError("Network request failed"))},i.open(n.method,n.url,!0),"include"===n.credentials?i.withCredentials=!0:"omit"===n.credentials&&(i.withCredentials=!1),"responseType"in i&&m.blob&&(i.responseType="blob"),n.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"==typeof n._bodyInit?null:n._bodyInit)})},e.fetch.polyfill=!0}(r),e.exports=r.fetch},function(e,t){"function"!=typeof Object.assign&&!function(){Object.assign=function(e){"use strict";var t,r,s,n;if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(t=Object(e),r=1;r<arguments.length;r++)if(s=arguments[r],void 0!==s&&null!==s)for(n in s)s.hasOwnProperty(n)&&(t[n]=s[n]);return t}}()},function(e,t){var r={RPC:"rpc",DOWNLOAD:"download",UPLOAD:"upload"};e.exports=r},function(e,t){var r={};r.authTokenFromOauth1=function(e){return this.request("auth/token/from_oauth1",e,"app","api","rpc")},r.authTokenRevoke=function(e){return this.request("auth/token/revoke",e,"user","api","rpc")},r.filesAlphaGetMetadata=function(e){return this.request("files/alpha/get_metadata",e,"user","api","rpc")},r.filesAlphaUpload=function(e){return this.request("files/alpha/upload",e,"user","content","upload")},r.filesCopy=function(e){return this.request("files/copy",e,"user","api","rpc")},r.filesCopyBatch=function(e){return this.request("files/copy_batch",e,"user","api","rpc")},r.filesCopyBatchCheck=function(e){return this.request("files/copy_batch/check",e,"user","api","rpc")},r.filesCopyReferenceGet=function(e){return this.request("files/copy_reference/get",e,"user","api","rpc")},r.filesCopyReferenceSave=function(e){return this.request("files/copy_reference/save",e,"user","api","rpc")},r.filesCopyV2=function(e){return this.request("files/copy_v2",e,"user","api","rpc")},r.filesCreateFolder=function(e){return this.request("files/create_folder",e,"user","api","rpc")},r.filesCreateFolderV2=function(e){return this.request("files/create_folder_v2",e,"user","api","rpc")},r.filesDelete=function(e){return this.request("files/delete",e,"user","api","rpc")},r.filesDeleteBatch=function(e){return this.request("files/delete_batch",e,"user","api","rpc")},r.filesDeleteBatchCheck=function(e){return this.request("files/delete_batch/check",e,"user","api","rpc")},r.filesDeleteV2=function(e){return this.request("files/delete_v2",e,"user","api","rpc")},r.filesDownload=function(e){return this.request("files/download",e,"user","content","download")},r.filesGetMetadata=function(e){return this.request("files/get_metadata",e,"user","api","rpc")},r.filesGetPreview=function(e){return this.request("files/get_preview",e,"user","content","download")},r.filesGetTemporaryLink=function(e){return this.request("files/get_temporary_link",e,"user","api","rpc")},r.filesGetThumbnail=function(e){return this.request("files/get_thumbnail",e,"user","content","download")},r.filesListFolder=function(e){return this.request("files/list_folder",e,"user","api","rpc")},r.filesListFolderContinue=function(e){return this.request("files/list_folder/continue",e,"user","api","rpc")},r.filesListFolderGetLatestCursor=function(e){return this.request("files/list_folder/get_latest_cursor",e,"user","api","rpc")},r.filesListFolderLongpoll=function(e){return this.request("files/list_folder/longpoll",e,"noauth","notify","rpc")},r.filesListRevisions=function(e){return this.request("files/list_revisions",e,"user","api","rpc")},r.filesMove=function(e){return this.request("files/move",e,"user","api","rpc")},r.filesMoveBatch=function(e){return this.request("files/move_batch",e,"user","api","rpc")},r.filesMoveBatchCheck=function(e){return this.request("files/move_batch/check",e,"user","api","rpc")},r.filesMoveV2=function(e){return this.request("files/move_v2",e,"user","api","rpc")},r.filesPermanentlyDelete=function(e){return this.request("files/permanently_delete",e,"user","api","rpc")},r.filesPropertiesAdd=function(e){return this.request("files/properties/add",e,"user","api","rpc")},r.filesPropertiesOverwrite=function(e){return this.request("files/properties/overwrite",e,"user","api","rpc")},r.filesPropertiesRemove=function(e){return this.request("files/properties/remove",e,"user","api","rpc")},r.filesPropertiesTemplateGet=function(e){return this.request("files/properties/template/get",e,"user","api","rpc")},r.filesPropertiesTemplateList=function(e){return this.request("files/properties/template/list",e,"user","api","rpc")},r.filesPropertiesUpdate=function(e){return this.request("files/properties/update",e,"user","api","rpc")},r.filesRestore=function(e){return this.request("files/restore",e,"user","api","rpc")},r.filesSaveUrl=function(e){return this.request("files/save_url",e,"user","api","rpc")},r.filesSaveUrlCheckJobStatus=function(e){return this.request("files/save_url/check_job_status",e,"user","api","rpc")},r.filesSearch=function(e){return this.request("files/search",e,"user","api","rpc")},r.filesUpload=function(e){return this.request("files/upload",e,"user","content","upload")},r.filesUploadSessionAppend=function(e){return this.request("files/upload_session/append",e,"user","content","upload")},r.filesUploadSessionAppendV2=function(e){return this.request("files/upload_session/append_v2",e,"user","content","upload")},r.filesUploadSessionFinish=function(e){return this.request("files/upload_session/finish",e,"user","content","upload")},r.filesUploadSessionFinishBatch=function(e){return this.request("files/upload_session/finish_batch",e,"user","api","rpc")},r.filesUploadSessionFinishBatchCheck=function(e){return this.request("files/upload_session/finish_batch/check",e,"user","api","rpc")},r.filesUploadSessionStart=function(e){return this.request("files/upload_session/start",e,"user","content","upload")},r.paperDocsArchive=function(e){return this.request("paper/docs/archive",e,"user","api","rpc")},r.paperDocsDownload=function(e){return this.request("paper/docs/download",e,"user","api","download")},r.paperDocsFolderUsersList=function(e){return this.request("paper/docs/folder_users/list",e,"user","api","rpc")},r.paperDocsFolderUsersListContinue=function(e){return this.request("paper/docs/folder_users/list/continue",e,"user","api","rpc")},r.paperDocsGetFolderInfo=function(e){return this.request("paper/docs/get_folder_info",e,"user","api","rpc")},r.paperDocsList=function(e){return this.request("paper/docs/list",e,"user","api","rpc")},r.paperDocsListContinue=function(e){return this.request("paper/docs/list/continue",e,"user","api","rpc")},r.paperDocsPermanentlyDelete=function(e){return this.request("paper/docs/permanently_delete",e,"user","api","rpc")},r.paperDocsSharingPolicyGet=function(e){return this.request("paper/docs/sharing_policy/get",e,"user","api","rpc")},r.paperDocsSharingPolicySet=function(e){return this.request("paper/docs/sharing_policy/set",e,"user","api","rpc")},r.paperDocsUsersAdd=function(e){return this.request("paper/docs/users/add",e,"user","api","rpc")},r.paperDocsUsersList=function(e){return this.request("paper/docs/users/list",e,"user","api","rpc")},r.paperDocsUsersListContinue=function(e){return this.request("paper/docs/users/list/continue",e,"user","api","rpc")},r.paperDocsUsersRemove=function(e){return this.request("paper/docs/users/remove",e,"user","api","rpc")},r.sharingAddFileMember=function(e){return this.request("sharing/add_file_member",e,"user","api","rpc")},r.sharingAddFolderMember=function(e){return this.request("sharing/add_folder_member",e,"user","api","rpc")},r.sharingChangeFileMemberAccess=function(e){return this.request("sharing/change_file_member_access",e,"user","api","rpc")},r.sharingCheckJobStatus=function(e){return this.request("sharing/check_job_status",e,"user","api","rpc")},r.sharingCheckRemoveMemberJobStatus=function(e){return this.request("sharing/check_remove_member_job_status",e,"user","api","rpc")},r.sharingCheckShareJobStatus=function(e){return this.request("sharing/check_share_job_status",e,"user","api","rpc")},r.sharingCreateSharedLink=function(e){return this.request("sharing/create_shared_link",e,"user","api","rpc")},r.sharingCreateSharedLinkWithSettings=function(e){return this.request("sharing/create_shared_link_with_settings",e,"user","api","rpc")},r.sharingGetFileMetadata=function(e){return this.request("sharing/get_file_metadata",e,"user","api","rpc")},r.sharingGetFileMetadataBatch=function(e){return this.request("sharing/get_file_metadata/batch",e,"user","api","rpc")},r.sharingGetFolderMetadata=function(e){return this.request("sharing/get_folder_metadata",e,"user","api","rpc")},r.sharingGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"user","content","download")},r.sharingGetSharedLinkMetadata=function(e){return this.request("sharing/get_shared_link_metadata",e,"user","api","rpc")},r.sharingGetSharedLinks=function(e){return this.request("sharing/get_shared_links",e,"user","api","rpc")},r.sharingListFileMembers=function(e){return this.request("sharing/list_file_members",e,"user","api","rpc")},r.sharingListFileMembersBatch=function(e){return this.request("sharing/list_file_members/batch",e,"user","api","rpc")},r.sharingListFileMembersContinue=function(e){return this.request("sharing/list_file_members/continue",e,"user","api","rpc")},r.sharingListFolderMembers=function(e){return this.request("sharing/list_folder_members",e,"user","api","rpc")},r.sharingListFolderMembersContinue=function(e){return this.request("sharing/list_folder_members/continue",e,"user","api","rpc")},r.sharingListFolders=function(e){return this.request("sharing/list_folders",e,"user","api","rpc")},r.sharingListFoldersContinue=function(e){return this.request("sharing/list_folders/continue",e,"user","api","rpc")},r.sharingListMountableFolders=function(e){return this.request("sharing/list_mountable_folders",e,"user","api","rpc")},r.sharingListMountableFoldersContinue=function(e){return this.request("sharing/list_mountable_folders/continue",e,"user","api","rpc")},r.sharingListReceivedFiles=function(e){return this.request("sharing/list_received_files",e,"user","api","rpc")},r.sharingListReceivedFilesContinue=function(e){return this.request("sharing/list_received_files/continue",e,"user","api","rpc")},r.sharingListSharedLinks=function(e){return this.request("sharing/list_shared_links",e,"user","api","rpc")},r.sharingModifySharedLinkSettings=function(e){return this.request("sharing/modify_shared_link_settings",e,"user","api","rpc")},r.sharingMountFolder=function(e){return this.request("sharing/mount_folder",e,"user","api","rpc")},r.sharingRelinquishFileMembership=function(e){return this.request("sharing/relinquish_file_membership",e,"user","api","rpc")},r.sharingRelinquishFolderMembership=function(e){return this.request("sharing/relinquish_folder_membership",e,"user","api","rpc")},r.sharingRemoveFileMember=function(e){return this.request("sharing/remove_file_member",e,"user","api","rpc")},r.sharingRemoveFileMember2=function(e){return this.request("sharing/remove_file_member_2",e,"user","api","rpc")},r.sharingRemoveFolderMember=function(e){return this.request("sharing/remove_folder_member",e,"user","api","rpc")},r.sharingRevokeSharedLink=function(e){return this.request("sharing/revoke_shared_link",e,"user","api","rpc")},r.sharingShareFolder=function(e){return this.request("sharing/share_folder",e,"user","api","rpc")},r.sharingTransferFolder=function(e){return this.request("sharing/transfer_folder",e,"user","api","rpc")},r.sharingUnmountFolder=function(e){return this.request("sharing/unmount_folder",e,"user","api","rpc")},r.sharingUnshareFile=function(e){return this.request("sharing/unshare_file",e,"user","api","rpc")},r.sharingUnshareFolder=function(e){return this.request("sharing/unshare_folder",e,"user","api","rpc")},r.sharingUpdateFileMember=function(e){return this.request("sharing/update_file_member",e,"user","api","rpc")},r.sharingUpdateFolderMember=function(e){return this.request("sharing/update_folder_member",e,"user","api","rpc")},r.sharingUpdateFolderPolicy=function(e){return this.request("sharing/update_folder_policy",e,"user","api","rpc")},r.teamLogGetEvents=function(e){return this.request("team_log/get_events",e,"team","api","rpc")},r.teamLogGetEventsContinue=function(e){return this.request("team_log/get_events/continue",e,"team","api","rpc")},r.usersGetAccount=function(e){return this.request("users/get_account",e,"user","api","rpc")},r.usersGetAccountBatch=function(e){return this.request("users/get_account_batch",e,"user","api","rpc")},r.usersGetCurrentAccount=function(e){return this.request("users/get_current_account",e,"user","api","rpc")},r.usersGetSpaceUsage=function(e){return this.request("users/get_space_usage",e,"user","api","rpc")},e.exports=r},function(e,t,r){var s=r(3).Promise,n=r(2),i=r(1),o=function(e){return{status:e.status,error:e}},u=function(e,t,r,u,a,c){var p=function(s,p){t||(t=null);var h={method:"POST",headers:{"Content-Type":"application/json"},body:"string"!=typeof t?JSON.stringify(t):t};switch(r){case"team":case"user":h.headers.Authorization="Bearer "+a;break;case"noauth":break;default:throw new Error("Unhandled auth type: "+r)}c&&(h.headers["Dropbox-API-Select-User"]=c),i(n(u)+e,h).then(function(e){if(!e.ok){var t=new Error("Request failed");throw t.status=e.status,t}return e}).then(function(e){return e.json()}).then(function(e){s(e)}).catch(function(e){p(o(e))})};return new s(p)};e.exports=u},function(e,t,r){var s=r(3).Promise,n=r(2),i=r(1),o=r(4),u=function(e){return{status:e.status,error:e.toString()}},a=function(e,t,r,a,c,p){if("user"!==r)throw new Error("Unexpected auth type: "+r);var h=function(r,s){var h=t.contents;delete t.contents;var f={method:"POST",headers:{"Content-Type":"application/octet-stream",Authorization:"Bearer "+c,"Dropbox-API-Arg":o(t)},body:h};p&&(f.headers["Dropbox-API-Select-User"]=p),i(n(a)+e,f).then(function(e){return e.json()}).then(function(e){r(e.body)}).catch(function(e){s(u(e))})};return new s(h)};e.exports=a}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("es6-promise"),require("node-fetch")):"function"==typeof define&&define.amd?define(["es6-promise","node-fetch"],r):"object"==typeof exports?exports.Dropbox=r(require("es6-promise"),require("node-fetch")):e.Dropbox=r(e["es6-promise"],e["node-fetch"])}(this,function(e,r){return function(e){function r(s){if(t[s])return t[s].exports;var i=t[s]={exports:{},id:s,loaded:!1};return e[s].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){var s=t(7);e.exports=s},function(e,r,t){(function(r){function s(){if(o){if("function"==typeof o.rnFetch)return o.rnFetch;if("function"==typeof o.fetch)return o.fetch}return n}function i(){var e=Array.prototype.slice.call(arguments);return u.fetch.apply(null,e)}var n=t(13),o=void 0!==typeof r?r:window,u={fetch:s()};i.harness=u,e.exports=i}).call(r,function(){return this}())},function(e,r){function t(e){return"https://"+e+".dropboxapi.com/2/"}e.exports=t},function(r,t){r.exports=e},function(e,r){function t(e){return JSON.stringify(e).replace(s,function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)})}var s=/[\u007f-\uffff]/g;e.exports=t},function(e,r,t){var s,i=t(9);t(8),s=function(e){e=e||{},this.accessToken=e.accessToken,this.clientId=e.clientId,this.selectUser=e.selectUser,this.proxy=e.proxy},s.prototype.setAccessToken=function(e){this.accessToken=e},s.prototype.getAccessToken=function(){return this.accessToken},s.prototype.setClientId=function(e){this.clientId=e},s.prototype.getClientId=function(){return this.clientId},s.prototype.setProxy=function(e){this.proxy=e},s.prototype.getProxy=function(){return this.proxy},s.prototype.getAuthenticationUrl=function(e,r){var t,s="https://www.dropbox.com/oauth2/authorize",i=this.getClientId();if(!i)throw new Error("A client id is required. You can set the client id using .setClientId().");if(!e)throw new Error("A redirect uri is required.");return t=s+"?response_type=token&client_id="+i,e&&(t=t+"&redirect_uri="+e),r&&(t=t+"&state="+r),t},s.prototype.authenticateWithCordova=function(e,r){var t="https://www.dropbox.com/1/oauth2/redirect_receiver",s=this.getAuthenticationUrl(t),i=window.open(s,"_blank"),n=!1,o=function(e){window.setTimeout(function(){i.close()},10),r()},u=function(t){var s="&error=",n=t.url.indexOf(s);if(n>-1)window.setTimeout(function(){i.close()},10),r();else{var o="#access_token=",u=t.url.indexOf(o),a=t.url.indexOf("&token_type=");if(u>-1){u+=o.length,window.setTimeout(function(){i.close()},10);var c=t.url.substring(u,a);e(c)}}},a=function(e){n||(i.removeEventListener("loaderror",o),i.removeEventListener("loadstop",u),i.removeEventListener("exit",a),n=!0)};i.addEventListener("loaderror",o),i.addEventListener("loadstop",u),i.addEventListener("exit",a)},s.prototype.request=function(e,r,t,s,n){var o=null;switch(n){case i.RPC:o=this.getRpcRequest();break;case i.DOWNLOAD:o=this.getDownloadRequest();break;case i.UPLOAD:o=this.getUploadRequest();break;default:throw new Error("Invalid request style: "+n)}return o(e,r,t,s,this.getAccessToken(),this.selectUser,this.proxy)},s.prototype.setRpcRequest=function(e){s.prototype.rpcRequest=e},s.prototype.getRpcRequest=function(){return void 0===s.prototype.rpcRequest&&(s.prototype.rpcRequest=t(11)),s.prototype.rpcRequest},s.prototype.setDownloadRequest=function(e){s.prototype.downloadRequest=e},s.prototype.getDownloadRequest=function(){return void 0===s.prototype.downloadRequest&&(s.prototype.downloadRequest=t(6)),s.prototype.downloadRequest},s.prototype.setUploadRequest=function(e){s.prototype.uploadRequest=e},s.prototype.getUploadRequest=function(){return void 0===s.prototype.uploadRequest&&(s.prototype.uploadRequest=t(12)),s.prototype.uploadRequest},e.exports=s},function(e,r,t){var s,i,n=t(3).Promise,o=t(2),u=t(4),a=t(1);s=function(e){return{status:e.status,error:e.toString()}},i=function(e,r,t,i,c,p){if("user"!==t)throw new Error("Unexpected auth type: "+t);var f=function(t,f){var l={method:"POST",headers:{Authorization:"Bearer "+c,"Dropbox-API-Arg":u(r)}};p&&(l.headers["Dropbox-API-Select-User"]=p),a(o(i)+e,l).then(function(e){var r;if(!e.ok)throw r=new Error("Request failed"),r.status=e.status,r;return e}).then(function(e){return n.all([e.buffer&&e.buffer()||e.blob(),n.resolve(e.headers)])}).then(function(e){var r=e[0],s=e[1],i=JSON.parse(s.get("dropbox-api-result"));i.fileBinary=r,t(i)}).catch(function(e){f(s(e))})};return new n(f)},e.exports=i},function(e,r,t){var s,i=t(5),n=t(10);s=function(e){i.call(this,e)},s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype=Object.assign(s.prototype,n),s.prototype.filesGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"api","download")},e.exports=s},function(e,r){"function"!=typeof Object.assign&&!function(){Object.assign=function(e){"use strict";var r,t,s,i;if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(r=Object(e),t=1;t<arguments.length;t++)if(s=arguments[t],void 0!==s&&null!==s)for(i in s)s.hasOwnProperty(i)&&(r[i]=s[i]);return r}}()},function(e,r){var t={RPC:"rpc",DOWNLOAD:"download",UPLOAD:"upload"};e.exports=t},function(e,r){var t={};t.authTokenFromOauth1=function(e){return this.request("auth/token/from_oauth1",e,"app","api","rpc")},t.authTokenRevoke=function(e){return this.request("auth/token/revoke",e,"user","api","rpc")},t.filesAlphaGetMetadata=function(e){return this.request("files/alpha/get_metadata",e,"user","api","rpc")},t.filesAlphaUpload=function(e){return this.request("files/alpha/upload",e,"user","content","upload")},t.filesCopy=function(e){return this.request("files/copy",e,"user","api","rpc")},t.filesCopyBatch=function(e){return this.request("files/copy_batch",e,"user","api","rpc")},t.filesCopyBatchCheck=function(e){return this.request("files/copy_batch/check",e,"user","api","rpc")},t.filesCopyReferenceGet=function(e){return this.request("files/copy_reference/get",e,"user","api","rpc")},t.filesCopyReferenceSave=function(e){return this.request("files/copy_reference/save",e,"user","api","rpc")},t.filesCopyV2=function(e){return this.request("files/copy_v2",e,"user","api","rpc")},t.filesCreateFolder=function(e){return this.request("files/create_folder",e,"user","api","rpc")},t.filesCreateFolderV2=function(e){return this.request("files/create_folder_v2",e,"user","api","rpc")},t.filesDelete=function(e){return this.request("files/delete",e,"user","api","rpc")},t.filesDeleteBatch=function(e){return this.request("files/delete_batch",e,"user","api","rpc")},t.filesDeleteBatchCheck=function(e){return this.request("files/delete_batch/check",e,"user","api","rpc")},t.filesDeleteV2=function(e){return this.request("files/delete_v2",e,"user","api","rpc")},t.filesDownload=function(e){return this.request("files/download",e,"user","content","download")},t.filesGetMetadata=function(e){return this.request("files/get_metadata",e,"user","api","rpc")},t.filesGetPreview=function(e){return this.request("files/get_preview",e,"user","content","download")},t.filesGetTemporaryLink=function(e){return this.request("files/get_temporary_link",e,"user","api","rpc")},t.filesGetThumbnail=function(e){return this.request("files/get_thumbnail",e,"user","content","download")},t.filesListFolder=function(e){return this.request("files/list_folder",e,"user","api","rpc")},t.filesListFolderContinue=function(e){return this.request("files/list_folder/continue",e,"user","api","rpc")},t.filesListFolderGetLatestCursor=function(e){return this.request("files/list_folder/get_latest_cursor",e,"user","api","rpc")},t.filesListFolderLongpoll=function(e){return this.request("files/list_folder/longpoll",e,"noauth","notify","rpc")},t.filesListRevisions=function(e){return this.request("files/list_revisions",e,"user","api","rpc")},t.filesMove=function(e){return this.request("files/move",e,"user","api","rpc")},t.filesMoveBatch=function(e){return this.request("files/move_batch",e,"user","api","rpc")},t.filesMoveBatchCheck=function(e){return this.request("files/move_batch/check",e,"user","api","rpc")},t.filesMoveV2=function(e){return this.request("files/move_v2",e,"user","api","rpc")},t.filesPermanentlyDelete=function(e){return this.request("files/permanently_delete",e,"user","api","rpc")},t.filesPropertiesAdd=function(e){return this.request("files/properties/add",e,"user","api","rpc")},t.filesPropertiesOverwrite=function(e){return this.request("files/properties/overwrite",e,"user","api","rpc")},t.filesPropertiesRemove=function(e){return this.request("files/properties/remove",e,"user","api","rpc")},t.filesPropertiesTemplateGet=function(e){return this.request("files/properties/template/get",e,"user","api","rpc")},t.filesPropertiesTemplateList=function(e){return this.request("files/properties/template/list",e,"user","api","rpc")},t.filesPropertiesUpdate=function(e){return this.request("files/properties/update",e,"user","api","rpc")},t.filesRestore=function(e){return this.request("files/restore",e,"user","api","rpc")},t.filesSaveUrl=function(e){return this.request("files/save_url",e,"user","api","rpc")},t.filesSaveUrlCheckJobStatus=function(e){return this.request("files/save_url/check_job_status",e,"user","api","rpc")},t.filesSearch=function(e){return this.request("files/search",e,"user","api","rpc")},t.filesUpload=function(e){return this.request("files/upload",e,"user","content","upload")},t.filesUploadSessionAppend=function(e){return this.request("files/upload_session/append",e,"user","content","upload")},t.filesUploadSessionAppendV2=function(e){return this.request("files/upload_session/append_v2",e,"user","content","upload")},t.filesUploadSessionFinish=function(e){return this.request("files/upload_session/finish",e,"user","content","upload")},t.filesUploadSessionFinishBatch=function(e){return this.request("files/upload_session/finish_batch",e,"user","api","rpc")},t.filesUploadSessionFinishBatchCheck=function(e){return this.request("files/upload_session/finish_batch/check",e,"user","api","rpc")},t.filesUploadSessionStart=function(e){return this.request("files/upload_session/start",e,"user","content","upload")},t.paperDocsArchive=function(e){return this.request("paper/docs/archive",e,"user","api","rpc")},t.paperDocsDownload=function(e){return this.request("paper/docs/download",e,"user","api","download")},t.paperDocsFolderUsersList=function(e){return this.request("paper/docs/folder_users/list",e,"user","api","rpc")},t.paperDocsFolderUsersListContinue=function(e){return this.request("paper/docs/folder_users/list/continue",e,"user","api","rpc")},t.paperDocsGetFolderInfo=function(e){return this.request("paper/docs/get_folder_info",e,"user","api","rpc")},t.paperDocsList=function(e){return this.request("paper/docs/list",e,"user","api","rpc")},t.paperDocsListContinue=function(e){return this.request("paper/docs/list/continue",e,"user","api","rpc")},t.paperDocsPermanentlyDelete=function(e){return this.request("paper/docs/permanently_delete",e,"user","api","rpc")},t.paperDocsSharingPolicyGet=function(e){return this.request("paper/docs/sharing_policy/get",e,"user","api","rpc")},t.paperDocsSharingPolicySet=function(e){return this.request("paper/docs/sharing_policy/set",e,"user","api","rpc")},t.paperDocsUsersAdd=function(e){return this.request("paper/docs/users/add",e,"user","api","rpc")},t.paperDocsUsersList=function(e){return this.request("paper/docs/users/list",e,"user","api","rpc")},t.paperDocsUsersListContinue=function(e){return this.request("paper/docs/users/list/continue",e,"user","api","rpc")},t.paperDocsUsersRemove=function(e){return this.request("paper/docs/users/remove",e,"user","api","rpc")},t.sharingAddFileMember=function(e){return this.request("sharing/add_file_member",e,"user","api","rpc")},t.sharingAddFolderMember=function(e){return this.request("sharing/add_folder_member",e,"user","api","rpc")},t.sharingChangeFileMemberAccess=function(e){return this.request("sharing/change_file_member_access",e,"user","api","rpc")},t.sharingCheckJobStatus=function(e){return this.request("sharing/check_job_status",e,"user","api","rpc")},t.sharingCheckRemoveMemberJobStatus=function(e){return this.request("sharing/check_remove_member_job_status",e,"user","api","rpc")},t.sharingCheckShareJobStatus=function(e){return this.request("sharing/check_share_job_status",e,"user","api","rpc")},t.sharingCreateSharedLink=function(e){return this.request("sharing/create_shared_link",e,"user","api","rpc")},t.sharingCreateSharedLinkWithSettings=function(e){return this.request("sharing/create_shared_link_with_settings",e,"user","api","rpc")},t.sharingGetFileMetadata=function(e){return this.request("sharing/get_file_metadata",e,"user","api","rpc")},t.sharingGetFileMetadataBatch=function(e){return this.request("sharing/get_file_metadata/batch",e,"user","api","rpc")},t.sharingGetFolderMetadata=function(e){return this.request("sharing/get_folder_metadata",e,"user","api","rpc")},t.sharingGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"user","content","download")},t.sharingGetSharedLinkMetadata=function(e){return this.request("sharing/get_shared_link_metadata",e,"user","api","rpc")},t.sharingGetSharedLinks=function(e){return this.request("sharing/get_shared_links",e,"user","api","rpc")},t.sharingListFileMembers=function(e){return this.request("sharing/list_file_members",e,"user","api","rpc")},t.sharingListFileMembersBatch=function(e){return this.request("sharing/list_file_members/batch",e,"user","api","rpc")},t.sharingListFileMembersContinue=function(e){return this.request("sharing/list_file_members/continue",e,"user","api","rpc")},t.sharingListFolderMembers=function(e){return this.request("sharing/list_folder_members",e,"user","api","rpc")},t.sharingListFolderMembersContinue=function(e){return this.request("sharing/list_folder_members/continue",e,"user","api","rpc")},t.sharingListFolders=function(e){return this.request("sharing/list_folders",e,"user","api","rpc")},t.sharingListFoldersContinue=function(e){return this.request("sharing/list_folders/continue",e,"user","api","rpc")},t.sharingListMountableFolders=function(e){return this.request("sharing/list_mountable_folders",e,"user","api","rpc")},t.sharingListMountableFoldersContinue=function(e){return this.request("sharing/list_mountable_folders/continue",e,"user","api","rpc")},t.sharingListReceivedFiles=function(e){return this.request("sharing/list_received_files",e,"user","api","rpc")},t.sharingListReceivedFilesContinue=function(e){return this.request("sharing/list_received_files/continue",e,"user","api","rpc")},t.sharingListSharedLinks=function(e){return this.request("sharing/list_shared_links",e,"user","api","rpc")},t.sharingModifySharedLinkSettings=function(e){return this.request("sharing/modify_shared_link_settings",e,"user","api","rpc")},t.sharingMountFolder=function(e){return this.request("sharing/mount_folder",e,"user","api","rpc")},t.sharingRelinquishFileMembership=function(e){return this.request("sharing/relinquish_file_membership",e,"user","api","rpc")},t.sharingRelinquishFolderMembership=function(e){return this.request("sharing/relinquish_folder_membership",e,"user","api","rpc")},t.sharingRemoveFileMember=function(e){return this.request("sharing/remove_file_member",e,"user","api","rpc")},t.sharingRemoveFileMember2=function(e){return this.request("sharing/remove_file_member_2",e,"user","api","rpc")},t.sharingRemoveFolderMember=function(e){return this.request("sharing/remove_folder_member",e,"user","api","rpc")},t.sharingRevokeSharedLink=function(e){return this.request("sharing/revoke_shared_link",e,"user","api","rpc")},t.sharingShareFolder=function(e){return this.request("sharing/share_folder",e,"user","api","rpc")},t.sharingTransferFolder=function(e){return this.request("sharing/transfer_folder",e,"user","api","rpc")},t.sharingUnmountFolder=function(e){return this.request("sharing/unmount_folder",e,"user","api","rpc")},t.sharingUnshareFile=function(e){return this.request("sharing/unshare_file",e,"user","api","rpc")},t.sharingUnshareFolder=function(e){return this.request("sharing/unshare_folder",e,"user","api","rpc")},t.sharingUpdateFileMember=function(e){return this.request("sharing/update_file_member",e,"user","api","rpc")},t.sharingUpdateFolderMember=function(e){return this.request("sharing/update_folder_member",e,"user","api","rpc")},t.sharingUpdateFolderPolicy=function(e){return this.request("sharing/update_folder_policy",e,"user","api","rpc")},t.teamLogGetEvents=function(e){return this.request("team_log/get_events",e,"team","api","rpc")},t.teamLogGetEventsContinue=function(e){return this.request("team_log/get_events/continue",e,"team","api","rpc")},t.usersGetAccount=function(e){return this.request("users/get_account",e,"user","api","rpc")},t.usersGetAccountBatch=function(e){return this.request("users/get_account_batch",e,"user","api","rpc")},t.usersGetCurrentAccount=function(e){return this.request("users/get_current_account",e,"user","api","rpc")},t.usersGetSpaceUsage=function(e){return this.request("users/get_space_usage",e,"user","api","rpc")},e.exports=t},function(e,r,t){var s=t(3).Promise,i=t(2),n=t(1),o=function(e){return{status:e.status,error:e}},u=function(e,r,t,u,a,c){var p=function(s,p){r||(r=null);var f={method:"POST",headers:{"Content-Type":"application/json"},body:"string"!=typeof r?JSON.stringify(r):r};switch(t){case"team":case"user":f.headers.Authorization="Bearer "+a;break;case"noauth":break;default:throw new Error("Unhandled auth type: "+t)}c&&(f.headers["Dropbox-API-Select-User"]=c),n(i(u)+e,f).then(function(e){if(!e.ok){var r=new Error("Request failed");throw r.status=e.status,r}return e}).then(function(e){return e.json()}).then(function(e){s(e)}).catch(function(e){p(o(e))})};return new s(p)};e.exports=u},function(e,r,t){var s=t(3).Promise,i=t(2),n=t(1),o=t(4),u=function(e){return{status:e.status,error:e.toString()}},a=function(e,r,t,a,c,p){if("user"!==t)throw new Error("Unexpected auth type: "+t);var f=function(t,s){var f=r.contents;delete r.contents;var l={method:"POST",headers:{"Content-Type":"application/octet-stream",Authorization:"Bearer "+c,"Dropbox-API-Arg":o(r)},body:f};p&&(l.headers["Dropbox-API-Select-User"]=p),n(i(a)+e,l).then(function(e){return e.json()}).then(function(e){t(e.body)}).catch(function(e){s(u(e))})};return new s(f)};e.exports=a},function(e,t){e.exports=r}])});

@@ -1,2 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("es6-promise")):"function"==typeof define&&define.amd?define(["es6-promise"],t):"object"==typeof exports?exports.DropboxTeam=t(require("es6-promise")):e.DropboxTeam=t(e["es6-promise"])}(this,function(e){return function(e){function t(s){if(r[s])return r[s].exports;var i=r[s]={exports:{},id:s,loaded:!1};return e[s].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var s=r(15);e.exports=s},function(e,t,r){function s(){return n}function i(){var e=Array.prototype.slice.call(arguments);return o.fetch.apply(null,e)}var n=r(8),o={fetch:s()};i.harness=o,e.exports=i},function(e,t){function r(e){return"https://"+e+".dropboxapi.com/2/"}e.exports=r},function(t,r){t.exports=e},function(e,t){function r(e){return JSON.stringify(e).replace(s,function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)})}var s=/[\u007f-\uffff]/g;e.exports=r},function(e,t,r){var s,i=r(10);r(9),s=function(e){e=e||{},this.accessToken=e.accessToken,this.clientId=e.clientId,this.selectUser=e.selectUser,this.proxy=e.proxy},s.prototype.setAccessToken=function(e){this.accessToken=e},s.prototype.getAccessToken=function(){return this.accessToken},s.prototype.setClientId=function(e){this.clientId=e},s.prototype.getClientId=function(){return this.clientId},s.prototype.setProxy=function(e){this.proxy=e},s.prototype.getProxy=function(){return this.proxy},s.prototype.getAuthenticationUrl=function(e,t){var r,s="https://www.dropbox.com/oauth2/authorize",i=this.getClientId();if(!i)throw new Error("A client id is required. You can set the client id using .setClientId().");if(!e)throw new Error("A redirect uri is required.");return r=s+"?response_type=token&client_id="+i,e&&(r=r+"&redirect_uri="+e),t&&(r=r+"&state="+t),r},s.prototype.authenticateWithCordova=function(e,t){var r="https://www.dropbox.com/1/oauth2/redirect_receiver",s=this.getAuthenticationUrl(r),i=window.open(s,"_blank"),n=!1,o=function(e){window.setTimeout(function(){i.close()},10),t()},a=function(r){var s="&error=",n=r.url.indexOf(s);if(n>-1)window.setTimeout(function(){i.close()},10),t();else{var o="#access_token=",a=r.url.indexOf(o),u=r.url.indexOf("&token_type=");if(a>-1){a+=o.length,window.setTimeout(function(){i.close()},10);var p=r.url.substring(a,u);e(p)}}},u=function(e){n||(i.removeEventListener("loaderror",o),i.removeEventListener("loadstop",a),i.removeEventListener("exit",u),n=!0)};i.addEventListener("loaderror",o),i.addEventListener("loadstop",a),i.addEventListener("exit",u)},s.prototype.request=function(e,t,r,s,n){var o=null;switch(n){case i.RPC:o=this.getRpcRequest();break;case i.DOWNLOAD:o=this.getDownloadRequest();break;case i.UPLOAD:o=this.getUploadRequest();break;default:throw new Error("Invalid request style: "+n)}return o(e,t,r,s,this.getAccessToken(),this.selectUser,this.proxy)},s.prototype.setRpcRequest=function(e){s.prototype.rpcRequest=e},s.prototype.getRpcRequest=function(){return void 0===s.prototype.rpcRequest&&(s.prototype.rpcRequest=r(12)),s.prototype.rpcRequest},s.prototype.setDownloadRequest=function(e){s.prototype.downloadRequest=e},s.prototype.getDownloadRequest=function(){return void 0===s.prototype.downloadRequest&&(s.prototype.downloadRequest=r(6)),s.prototype.downloadRequest},s.prototype.setUploadRequest=function(e){s.prototype.uploadRequest=e},s.prototype.getUploadRequest=function(){return void 0===s.prototype.uploadRequest&&(s.prototype.uploadRequest=r(13)),s.prototype.uploadRequest},e.exports=s},function(e,t,r){var s,i,n=r(3).Promise,o=r(2),a=r(4),u=r(1);s=function(e){return{status:e.status,error:e.toString()}},i=function(e,t,r,i,p,c){if("user"!==r)throw new Error("Unexpected auth type: "+r);var h=function(r,h){var f={method:"POST",headers:{Authorization:"Bearer "+p,"Dropbox-API-Arg":a(t)}};c&&(f.headers["Dropbox-API-Select-User"]=c),u(o(i)+e,f).then(function(e){var t;if(!e.ok)throw t=new Error("Request failed"),t.status=e.status,t;return e}).then(function(e){return n.all([e.buffer&&e.buffer()||e.blob(),n.resolve(e.headers)])}).then(function(e){var t=e[0],s=e[1],i=JSON.parse(s.get("dropbox-api-result"));i.fileBinary=t,r(i)}).catch(function(e){h(s(e))})};return new n(h)},e.exports=i},function(e,t,r){var s,i=r(5),n=r(11);s=function(e){i.call(this,e)},s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype=Object.assign(s.prototype,n),s.prototype.filesGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"api","download")},e.exports=s},function(e,t){"use strict";var r={};!function(e){function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function n(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function a(e){var t=new FileReader,r=o(t);return t.readAsArrayBuffer(e),r}function u(e){var t=new FileReader,r=o(t);return t.readAsText(e),r}function p(e){for(var t=new Uint8Array(e),r=new Array(t.length),s=0;s<t.length;s++)r[s]=String.fromCharCode(t[s]);return r.join("")}function c(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(y.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(y.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(y.arrayBuffer&&y.blob&&q(e))this._bodyArrayBuffer=c(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!y.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!g(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},y.blob&&(this.blob=function(){var e=n(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?n(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(a)}),this.text=function(){var e=n(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},y.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(e instanceof l){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new i(t.headers)),this.method=f(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),s=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(i))}}),t}function m(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split(/\r?\n/).forEach(function(e){var r=e.split(":"),s=r.shift().trim();if(s){var i=r.join(":").trim();t.append(s,i)}}),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(y.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],q=function(e){return e&&DataView.prototype.isPrototypeOf(e)},g=ArrayBuffer.isView||function(e){return e&&b.indexOf(Object.prototype.toString.call(e))>-1};i.prototype.append=function(e,s){e=t(e),s=r(s);var i=this.map[e];this.map[e]=i?i+","+s:s},i.prototype.delete=function(e){delete this.map[t(e)]},i.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},i.prototype.set=function(e,s){this.map[t(e)]=r(s)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),s(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),s(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),s(e)},y.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},h.call(l.prototype),h.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];_.redirect=function(e,t){if(w.indexOf(t)===-1)throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},e.Headers=i,e.Request=l,e.Response=_,e.fetch=function(e,t){return new Promise(function(r,s){var i=new l(e,t),n=new XMLHttpRequest;n.onload=function(){var e={status:n.status,statusText:n.statusText,headers:m(n.getAllResponseHeaders()||"")};e.url="responseURL"in n?n.responseURL:e.headers.get("X-Request-URL");var t="response"in n?n.response:n.responseText;r(new _(t,e))},n.onerror=function(){s(new TypeError("Network request failed"))},n.ontimeout=function(){s(new TypeError("Network request failed"))},n.open(i.method,i.url,!0),"include"===i.credentials?n.withCredentials=!0:"omit"===i.credentials&&(n.withCredentials=!1),"responseType"in n&&y.blob&&(n.responseType="blob"),i.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}(r),e.exports=r.fetch},function(e,t){"function"!=typeof Object.assign&&!function(){Object.assign=function(e){"use strict";var t,r,s,i;if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(t=Object(e),r=1;r<arguments.length;r++)if(s=arguments[r],void 0!==s&&null!==s)for(i in s)s.hasOwnProperty(i)&&(t[i]=s[i]);return t}}()},function(e,t){var r={RPC:"rpc",DOWNLOAD:"download",UPLOAD:"upload"};e.exports=r},function(e,t){var r={};r.authTokenFromOauth1=function(e){return this.request("auth/token/from_oauth1",e,"app","api","rpc")},r.authTokenRevoke=function(e){return this.request("auth/token/revoke",e,"user","api","rpc")},r.filesAlphaGetMetadata=function(e){return this.request("files/alpha/get_metadata",e,"user","api","rpc")},r.filesAlphaUpload=function(e){return this.request("files/alpha/upload",e,"user","content","upload")},r.filesCopy=function(e){return this.request("files/copy",e,"user","api","rpc")},r.filesCopyBatch=function(e){return this.request("files/copy_batch",e,"user","api","rpc")},r.filesCopyBatchCheck=function(e){return this.request("files/copy_batch/check",e,"user","api","rpc")},r.filesCopyReferenceGet=function(e){return this.request("files/copy_reference/get",e,"user","api","rpc")},r.filesCopyReferenceSave=function(e){return this.request("files/copy_reference/save",e,"user","api","rpc")},r.filesCopyV2=function(e){return this.request("files/copy_v2",e,"user","api","rpc")},r.filesCreateFolder=function(e){return this.request("files/create_folder",e,"user","api","rpc")},r.filesCreateFolderV2=function(e){return this.request("files/create_folder_v2",e,"user","api","rpc")},r.filesDelete=function(e){return this.request("files/delete",e,"user","api","rpc")},r.filesDeleteBatch=function(e){return this.request("files/delete_batch",e,"user","api","rpc")},r.filesDeleteBatchCheck=function(e){return this.request("files/delete_batch/check",e,"user","api","rpc")},r.filesDeleteV2=function(e){return this.request("files/delete_v2",e,"user","api","rpc")},r.filesDownload=function(e){return this.request("files/download",e,"user","content","download")},r.filesGetMetadata=function(e){return this.request("files/get_metadata",e,"user","api","rpc")},r.filesGetPreview=function(e){return this.request("files/get_preview",e,"user","content","download")},r.filesGetTemporaryLink=function(e){return this.request("files/get_temporary_link",e,"user","api","rpc")},r.filesGetThumbnail=function(e){return this.request("files/get_thumbnail",e,"user","content","download")},r.filesListFolder=function(e){return this.request("files/list_folder",e,"user","api","rpc")},r.filesListFolderContinue=function(e){return this.request("files/list_folder/continue",e,"user","api","rpc")},r.filesListFolderGetLatestCursor=function(e){return this.request("files/list_folder/get_latest_cursor",e,"user","api","rpc")},r.filesListFolderLongpoll=function(e){return this.request("files/list_folder/longpoll",e,"noauth","notify","rpc")},r.filesListRevisions=function(e){return this.request("files/list_revisions",e,"user","api","rpc")},r.filesMove=function(e){return this.request("files/move",e,"user","api","rpc")},r.filesMoveBatch=function(e){return this.request("files/move_batch",e,"user","api","rpc")},r.filesMoveBatchCheck=function(e){return this.request("files/move_batch/check",e,"user","api","rpc")},r.filesMoveV2=function(e){return this.request("files/move_v2",e,"user","api","rpc")},r.filesPermanentlyDelete=function(e){return this.request("files/permanently_delete",e,"user","api","rpc")},r.filesPropertiesAdd=function(e){return this.request("files/properties/add",e,"user","api","rpc")},r.filesPropertiesOverwrite=function(e){return this.request("files/properties/overwrite",e,"user","api","rpc")},r.filesPropertiesRemove=function(e){return this.request("files/properties/remove",e,"user","api","rpc")},r.filesPropertiesTemplateGet=function(e){return this.request("files/properties/template/get",e,"user","api","rpc")},r.filesPropertiesTemplateList=function(e){return this.request("files/properties/template/list",e,"user","api","rpc")},r.filesPropertiesUpdate=function(e){return this.request("files/properties/update",e,"user","api","rpc")},r.filesRestore=function(e){return this.request("files/restore",e,"user","api","rpc")},r.filesSaveUrl=function(e){return this.request("files/save_url",e,"user","api","rpc")},r.filesSaveUrlCheckJobStatus=function(e){return this.request("files/save_url/check_job_status",e,"user","api","rpc")},r.filesSearch=function(e){return this.request("files/search",e,"user","api","rpc")},r.filesUpload=function(e){return this.request("files/upload",e,"user","content","upload")},r.filesUploadSessionAppend=function(e){return this.request("files/upload_session/append",e,"user","content","upload")},r.filesUploadSessionAppendV2=function(e){return this.request("files/upload_session/append_v2",e,"user","content","upload")},r.filesUploadSessionFinish=function(e){return this.request("files/upload_session/finish",e,"user","content","upload")},r.filesUploadSessionFinishBatch=function(e){return this.request("files/upload_session/finish_batch",e,"user","api","rpc")},r.filesUploadSessionFinishBatchCheck=function(e){return this.request("files/upload_session/finish_batch/check",e,"user","api","rpc")},r.filesUploadSessionStart=function(e){return this.request("files/upload_session/start",e,"user","content","upload")},r.paperDocsArchive=function(e){return this.request("paper/docs/archive",e,"user","api","rpc")},r.paperDocsDownload=function(e){return this.request("paper/docs/download",e,"user","api","download")},r.paperDocsFolderUsersList=function(e){return this.request("paper/docs/folder_users/list",e,"user","api","rpc")},r.paperDocsFolderUsersListContinue=function(e){return this.request("paper/docs/folder_users/list/continue",e,"user","api","rpc")},r.paperDocsGetFolderInfo=function(e){return this.request("paper/docs/get_folder_info",e,"user","api","rpc")},r.paperDocsList=function(e){return this.request("paper/docs/list",e,"user","api","rpc")},r.paperDocsListContinue=function(e){return this.request("paper/docs/list/continue",e,"user","api","rpc")},r.paperDocsPermanentlyDelete=function(e){return this.request("paper/docs/permanently_delete",e,"user","api","rpc")},r.paperDocsSharingPolicyGet=function(e){return this.request("paper/docs/sharing_policy/get",e,"user","api","rpc")},r.paperDocsSharingPolicySet=function(e){return this.request("paper/docs/sharing_policy/set",e,"user","api","rpc")},r.paperDocsUsersAdd=function(e){return this.request("paper/docs/users/add",e,"user","api","rpc")},r.paperDocsUsersList=function(e){return this.request("paper/docs/users/list",e,"user","api","rpc")},r.paperDocsUsersListContinue=function(e){return this.request("paper/docs/users/list/continue",e,"user","api","rpc")},r.paperDocsUsersRemove=function(e){return this.request("paper/docs/users/remove",e,"user","api","rpc")},r.sharingAddFileMember=function(e){return this.request("sharing/add_file_member",e,"user","api","rpc")},r.sharingAddFolderMember=function(e){return this.request("sharing/add_folder_member",e,"user","api","rpc")},r.sharingChangeFileMemberAccess=function(e){return this.request("sharing/change_file_member_access",e,"user","api","rpc")},r.sharingCheckJobStatus=function(e){return this.request("sharing/check_job_status",e,"user","api","rpc")},r.sharingCheckRemoveMemberJobStatus=function(e){return this.request("sharing/check_remove_member_job_status",e,"user","api","rpc")},r.sharingCheckShareJobStatus=function(e){return this.request("sharing/check_share_job_status",e,"user","api","rpc")},r.sharingCreateSharedLink=function(e){return this.request("sharing/create_shared_link",e,"user","api","rpc")},r.sharingCreateSharedLinkWithSettings=function(e){return this.request("sharing/create_shared_link_with_settings",e,"user","api","rpc")},r.sharingGetFileMetadata=function(e){return this.request("sharing/get_file_metadata",e,"user","api","rpc")},r.sharingGetFileMetadataBatch=function(e){return this.request("sharing/get_file_metadata/batch",e,"user","api","rpc")},r.sharingGetFolderMetadata=function(e){return this.request("sharing/get_folder_metadata",e,"user","api","rpc")},r.sharingGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"user","content","download")},r.sharingGetSharedLinkMetadata=function(e){return this.request("sharing/get_shared_link_metadata",e,"user","api","rpc")},r.sharingGetSharedLinks=function(e){return this.request("sharing/get_shared_links",e,"user","api","rpc")},r.sharingListFileMembers=function(e){return this.request("sharing/list_file_members",e,"user","api","rpc")},r.sharingListFileMembersBatch=function(e){return this.request("sharing/list_file_members/batch",e,"user","api","rpc")},r.sharingListFileMembersContinue=function(e){return this.request("sharing/list_file_members/continue",e,"user","api","rpc")},r.sharingListFolderMembers=function(e){return this.request("sharing/list_folder_members",e,"user","api","rpc")},r.sharingListFolderMembersContinue=function(e){return this.request("sharing/list_folder_members/continue",e,"user","api","rpc")},r.sharingListFolders=function(e){return this.request("sharing/list_folders",e,"user","api","rpc")},r.sharingListFoldersContinue=function(e){return this.request("sharing/list_folders/continue",e,"user","api","rpc")},r.sharingListMountableFolders=function(e){return this.request("sharing/list_mountable_folders",e,"user","api","rpc")},r.sharingListMountableFoldersContinue=function(e){return this.request("sharing/list_mountable_folders/continue",e,"user","api","rpc")},r.sharingListReceivedFiles=function(e){return this.request("sharing/list_received_files",e,"user","api","rpc")},r.sharingListReceivedFilesContinue=function(e){return this.request("sharing/list_received_files/continue",e,"user","api","rpc")},r.sharingListSharedLinks=function(e){return this.request("sharing/list_shared_links",e,"user","api","rpc")},r.sharingModifySharedLinkSettings=function(e){return this.request("sharing/modify_shared_link_settings",e,"user","api","rpc")},r.sharingMountFolder=function(e){return this.request("sharing/mount_folder",e,"user","api","rpc")},r.sharingRelinquishFileMembership=function(e){return this.request("sharing/relinquish_file_membership",e,"user","api","rpc")},r.sharingRelinquishFolderMembership=function(e){return this.request("sharing/relinquish_folder_membership",e,"user","api","rpc")},r.sharingRemoveFileMember=function(e){return this.request("sharing/remove_file_member",e,"user","api","rpc")},r.sharingRemoveFileMember2=function(e){return this.request("sharing/remove_file_member_2",e,"user","api","rpc")},r.sharingRemoveFolderMember=function(e){return this.request("sharing/remove_folder_member",e,"user","api","rpc")},r.sharingRevokeSharedLink=function(e){return this.request("sharing/revoke_shared_link",e,"user","api","rpc")},r.sharingShareFolder=function(e){return this.request("sharing/share_folder",e,"user","api","rpc")},r.sharingTransferFolder=function(e){return this.request("sharing/transfer_folder",e,"user","api","rpc")},r.sharingUnmountFolder=function(e){return this.request("sharing/unmount_folder",e,"user","api","rpc")},r.sharingUnshareFile=function(e){return this.request("sharing/unshare_file",e,"user","api","rpc")},r.sharingUnshareFolder=function(e){return this.request("sharing/unshare_folder",e,"user","api","rpc")},r.sharingUpdateFileMember=function(e){return this.request("sharing/update_file_member",e,"user","api","rpc")},r.sharingUpdateFolderMember=function(e){return this.request("sharing/update_folder_member",e,"user","api","rpc")},r.sharingUpdateFolderPolicy=function(e){return this.request("sharing/update_folder_policy",e,"user","api","rpc")},r.teamLogGetEvents=function(e){return this.request("team_log/get_events",e,"team","api","rpc")},r.teamLogGetEventsContinue=function(e){return this.request("team_log/get_events/continue",e,"team","api","rpc")},r.usersGetAccount=function(e){return this.request("users/get_account",e,"user","api","rpc")},r.usersGetAccountBatch=function(e){return this.request("users/get_account_batch",e,"user","api","rpc")},r.usersGetCurrentAccount=function(e){return this.request("users/get_current_account",e,"user","api","rpc")},r.usersGetSpaceUsage=function(e){return this.request("users/get_space_usage",e,"user","api","rpc")},e.exports=r},function(e,t,r){var s=r(3).Promise,i=r(2),n=r(1),o=function(e){return{status:e.status,error:e}},a=function(e,t,r,a,u,p){var c=function(s,c){t||(t=null);var h={method:"POST",headers:{"Content-Type":"application/json"},body:"string"!=typeof t?JSON.stringify(t):t};switch(r){case"team":case"user":h.headers.Authorization="Bearer "+u;break;case"noauth":break;default:throw new Error("Unhandled auth type: "+r)}p&&(h.headers["Dropbox-API-Select-User"]=p),n(i(a)+e,h).then(function(e){if(!e.ok){var t=new Error("Request failed");throw t.status=e.status,t}return e}).then(function(e){return e.json()}).then(function(e){s(e)}).catch(function(e){c(o(e))})};return new s(c)};e.exports=a},function(e,t,r){var s=r(3).Promise,i=r(2),n=r(1),o=r(4),a=function(e){return{status:e.status,error:e.toString()}},u=function(e,t,r,u,p,c){if("user"!==r)throw new Error("Unexpected auth type: "+r);var h=function(r,s){var h=t.contents;delete t.contents;var f={method:"POST",headers:{"Content-Type":"application/octet-stream",Authorization:"Bearer "+p,"Dropbox-API-Arg":o(t)},body:h};c&&(f.headers["Dropbox-API-Select-User"]=c),n(i(u)+e,f).then(function(e){return e.json()}).then(function(e){r(e.body)}).catch(function(e){s(a(e))})};return new s(h)};e.exports=u},function(e,t){var r={};r.teamDevicesListMemberDevices=function(e){return this.request("team/devices/list_member_devices",e,"team","api","rpc")},r.teamDevicesListMembersDevices=function(e){return this.request("team/devices/list_members_devices",e,"team","api","rpc")},r.teamDevicesListTeamDevices=function(e){return this.request("team/devices/list_team_devices",e,"team","api","rpc")},r.teamDevicesRevokeDeviceSession=function(e){return this.request("team/devices/revoke_device_session",e,"team","api","rpc")},r.teamDevicesRevokeDeviceSessionBatch=function(e){return this.request("team/devices/revoke_device_session_batch",e,"team","api","rpc")},r.teamFeaturesGetValues=function(e){return this.request("team/features/get_values",e,"team","api","rpc")},r.teamGetInfo=function(e){return this.request("team/get_info",e,"team","api","rpc")},r.teamGroupsCreate=function(e){return this.request("team/groups/create",e,"team","api","rpc")},r.teamGroupsDelete=function(e){return this.request("team/groups/delete",e,"team","api","rpc")},r.teamGroupsGetInfo=function(e){return this.request("team/groups/get_info",e,"team","api","rpc")},r.teamGroupsJobStatusGet=function(e){return this.request("team/groups/job_status/get",e,"team","api","rpc")},r.teamGroupsList=function(e){return this.request("team/groups/list",e,"team","api","rpc")},r.teamGroupsListContinue=function(e){return this.request("team/groups/list/continue",e,"team","api","rpc")},r.teamGroupsMembersAdd=function(e){return this.request("team/groups/members/add",e,"team","api","rpc")},r.teamGroupsMembersList=function(e){return this.request("team/groups/members/list",e,"team","api","rpc")},r.teamGroupsMembersListContinue=function(e){return this.request("team/groups/members/list/continue",e,"team","api","rpc")},r.teamGroupsMembersRemove=function(e){return this.request("team/groups/members/remove",e,"team","api","rpc")},r.teamGroupsMembersSetAccessType=function(e){return this.request("team/groups/members/set_access_type",e,"team","api","rpc")},r.teamGroupsUpdate=function(e){return this.request("team/groups/update",e,"team","api","rpc")},r.teamLinkedAppsListMemberLinkedApps=function(e){return this.request("team/linked_apps/list_member_linked_apps",e,"team","api","rpc")},r.teamLinkedAppsListMembersLinkedApps=function(e){return this.request("team/linked_apps/list_members_linked_apps",e,"team","api","rpc")},r.teamLinkedAppsListTeamLinkedApps=function(e){return this.request("team/linked_apps/list_team_linked_apps",e,"team","api","rpc")},r.teamLinkedAppsRevokeLinkedApp=function(e){return this.request("team/linked_apps/revoke_linked_app",e,"team","api","rpc")},r.teamLinkedAppsRevokeLinkedAppBatch=function(e){return this.request("team/linked_apps/revoke_linked_app_batch",e,"team","api","rpc")},r.teamMembersAdd=function(e){return this.request("team/members/add",e,"team","api","rpc")},r.teamMembersAddJobStatusGet=function(e){return this.request("team/members/add/job_status/get",e,"team","api","rpc")},r.teamMembersGetInfo=function(e){return this.request("team/members/get_info",e,"team","api","rpc")},r.teamMembersList=function(e){return this.request("team/members/list",e,"team","api","rpc")},r.teamMembersListContinue=function(e){return this.request("team/members/list/continue",e,"team","api","rpc")},r.teamMembersRecover=function(e){return this.request("team/members/recover",e,"team","api","rpc")},r.teamMembersRemove=function(e){return this.request("team/members/remove",e,"team","api","rpc")},r.teamMembersRemoveJobStatusGet=function(e){return this.request("team/members/remove/job_status/get",e,"team","api","rpc")},r.teamMembersSendWelcomeEmail=function(e){return this.request("team/members/send_welcome_email",e,"team","api","rpc")},r.teamMembersSetAdminPermissions=function(e){return this.request("team/members/set_admin_permissions",e,"team","api","rpc")},r.teamMembersSetProfile=function(e){return this.request("team/members/set_profile",e,"team","api","rpc")},r.teamMembersSuspend=function(e){return this.request("team/members/suspend",e,"team","api","rpc")},r.teamMembersUnsuspend=function(e){return this.request("team/members/unsuspend",e,"team","api","rpc")},r.teamNamespacesList=function(e){return this.request("team/namespaces/list",e,"team","api","rpc")},r.teamNamespacesListContinue=function(e){return this.request("team/namespaces/list/continue",e,"team","api","rpc")},r.teamPropertiesTemplateAdd=function(e){return this.request("team/properties/template/add",e,"team","api","rpc")},r.teamPropertiesTemplateGet=function(e){return this.request("team/properties/template/get",e,"team","api","rpc")},r.teamPropertiesTemplateList=function(e){return this.request("team/properties/template/list",e,"team","api","rpc")},r.teamPropertiesTemplateUpdate=function(e){return this.request("team/properties/template/update",e,"team","api","rpc")},r.teamReportsGetActivity=function(e){return this.request("team/reports/get_activity",e,"team","api","rpc")},r.teamReportsGetDevices=function(e){return this.request("team/reports/get_devices",e,"team","api","rpc")},r.teamReportsGetMembership=function(e){return this.request("team/reports/get_membership",e,"team","api","rpc")},r.teamReportsGetStorage=function(e){return this.request("team/reports/get_storage",e,"team","api","rpc")},r.teamTeamFolderActivate=function(e){return this.request("team/team_folder/activate",e,"team","api","rpc")},r.teamTeamFolderArchive=function(e){return this.request("team/team_folder/archive",e,"team","api","rpc")},r.teamTeamFolderArchiveCheck=function(e){return this.request("team/team_folder/archive/check",e,"team","api","rpc")},r.teamTeamFolderCreate=function(e){return this.request("team/team_folder/create",e,"team","api","rpc")},r.teamTeamFolderGetInfo=function(e){return this.request("team/team_folder/get_info",e,"team","api","rpc")},r.teamTeamFolderList=function(e){return this.request("team/team_folder/list",e,"team","api","rpc")},r.teamTeamFolderListContinue=function(e){return this.request("team/team_folder/list/continue",e,"team","api","rpc")},r.teamTeamFolderPermanentlyDelete=function(e){return this.request("team/team_folder/permanently_delete",e,"team","api","rpc")},r.teamTeamFolderRename=function(e){return this.request("team/team_folder/rename",e,"team","api","rpc")},r.teamTokenGetAuthenticatedAdmin=function(e){return this.request("team/token/get_authenticated_admin",e,"team","api","rpc")},e.exports=r},function(e,t,r){var s,i=r(7),n=r(5),o=r(14);s=function(e){n.call(this,e)},s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype.actAsUser=function(e){
return new i({accessToken:this.accessToken,clientId:this.clientId,selectUser:e,proxy:this.proxy})},s.prototype=Object.assign(s.prototype,o),e.exports=s}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("es6-promise"),require("node-fetch")):"function"==typeof define&&define.amd?define(["es6-promise","node-fetch"],t):"object"==typeof exports?exports.DropboxTeam=t(require("es6-promise"),require("node-fetch")):e.DropboxTeam=t(e["es6-promise"],e["node-fetch"])}(this,function(e,t){return function(e){function t(s){if(r[s])return r[s].exports;var i=r[s]={exports:{},id:s,loaded:!1};return e[s].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var s=r(15);e.exports=s},function(e,t,r){(function(t){function s(){if(u){if("function"==typeof u.rnFetch)return u.rnFetch;if("function"==typeof u.fetch)return u.fetch}return n}function i(){var e=Array.prototype.slice.call(arguments);return o.fetch.apply(null,e)}var n=r(13),u=void 0!==typeof t?t:window,o={fetch:s()};i.harness=o,e.exports=i}).call(t,function(){return this}())},function(e,t){function r(e){return"https://"+e+".dropboxapi.com/2/"}e.exports=r},function(t,r){t.exports=e},function(e,t){function r(e){return JSON.stringify(e).replace(s,function(e){return"\\u"+("000"+e.charCodeAt(0).toString(16)).slice(-4)})}var s=/[\u007f-\uffff]/g;e.exports=r},function(e,t,r){var s,i=r(9);r(8),s=function(e){e=e||{},this.accessToken=e.accessToken,this.clientId=e.clientId,this.selectUser=e.selectUser,this.proxy=e.proxy},s.prototype.setAccessToken=function(e){this.accessToken=e},s.prototype.getAccessToken=function(){return this.accessToken},s.prototype.setClientId=function(e){this.clientId=e},s.prototype.getClientId=function(){return this.clientId},s.prototype.setProxy=function(e){this.proxy=e},s.prototype.getProxy=function(){return this.proxy},s.prototype.getAuthenticationUrl=function(e,t){var r,s="https://www.dropbox.com/oauth2/authorize",i=this.getClientId();if(!i)throw new Error("A client id is required. You can set the client id using .setClientId().");if(!e)throw new Error("A redirect uri is required.");return r=s+"?response_type=token&client_id="+i,e&&(r=r+"&redirect_uri="+e),t&&(r=r+"&state="+t),r},s.prototype.authenticateWithCordova=function(e,t){var r="https://www.dropbox.com/1/oauth2/redirect_receiver",s=this.getAuthenticationUrl(r),i=window.open(s,"_blank"),n=!1,u=function(e){window.setTimeout(function(){i.close()},10),t()},o=function(r){var s="&error=",n=r.url.indexOf(s);if(n>-1)window.setTimeout(function(){i.close()},10),t();else{var u="#access_token=",o=r.url.indexOf(u),a=r.url.indexOf("&token_type=");if(o>-1){o+=u.length,window.setTimeout(function(){i.close()},10);var p=r.url.substring(o,a);e(p)}}},a=function(e){n||(i.removeEventListener("loaderror",u),i.removeEventListener("loadstop",o),i.removeEventListener("exit",a),n=!0)};i.addEventListener("loaderror",u),i.addEventListener("loadstop",o),i.addEventListener("exit",a)},s.prototype.request=function(e,t,r,s,n){var u=null;switch(n){case i.RPC:u=this.getRpcRequest();break;case i.DOWNLOAD:u=this.getDownloadRequest();break;case i.UPLOAD:u=this.getUploadRequest();break;default:throw new Error("Invalid request style: "+n)}return u(e,t,r,s,this.getAccessToken(),this.selectUser,this.proxy)},s.prototype.setRpcRequest=function(e){s.prototype.rpcRequest=e},s.prototype.getRpcRequest=function(){return void 0===s.prototype.rpcRequest&&(s.prototype.rpcRequest=r(11)),s.prototype.rpcRequest},s.prototype.setDownloadRequest=function(e){s.prototype.downloadRequest=e},s.prototype.getDownloadRequest=function(){return void 0===s.prototype.downloadRequest&&(s.prototype.downloadRequest=r(6)),s.prototype.downloadRequest},s.prototype.setUploadRequest=function(e){s.prototype.uploadRequest=e},s.prototype.getUploadRequest=function(){return void 0===s.prototype.uploadRequest&&(s.prototype.uploadRequest=r(12)),s.prototype.uploadRequest},e.exports=s},function(e,t,r){var s,i,n=r(3).Promise,u=r(2),o=r(4),a=r(1);s=function(e){return{status:e.status,error:e.toString()}},i=function(e,t,r,i,p,c){if("user"!==r)throw new Error("Unexpected auth type: "+r);var f=function(r,f){var h={method:"POST",headers:{Authorization:"Bearer "+p,"Dropbox-API-Arg":o(t)}};c&&(h.headers["Dropbox-API-Select-User"]=c),a(u(i)+e,h).then(function(e){var t;if(!e.ok)throw t=new Error("Request failed"),t.status=e.status,t;return e}).then(function(e){return n.all([e.buffer&&e.buffer()||e.blob(),n.resolve(e.headers)])}).then(function(e){var t=e[0],s=e[1],i=JSON.parse(s.get("dropbox-api-result"));i.fileBinary=t,r(i)}).catch(function(e){f(s(e))})};return new n(f)},e.exports=i},function(e,t,r){var s,i=r(5),n=r(10);s=function(e){i.call(this,e)},s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype=Object.assign(s.prototype,n),s.prototype.filesGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"api","download")},e.exports=s},function(e,t){"function"!=typeof Object.assign&&!function(){Object.assign=function(e){"use strict";var t,r,s,i;if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(t=Object(e),r=1;r<arguments.length;r++)if(s=arguments[r],void 0!==s&&null!==s)for(i in s)s.hasOwnProperty(i)&&(t[i]=s[i]);return t}}()},function(e,t){var r={RPC:"rpc",DOWNLOAD:"download",UPLOAD:"upload"};e.exports=r},function(e,t){var r={};r.authTokenFromOauth1=function(e){return this.request("auth/token/from_oauth1",e,"app","api","rpc")},r.authTokenRevoke=function(e){return this.request("auth/token/revoke",e,"user","api","rpc")},r.filesAlphaGetMetadata=function(e){return this.request("files/alpha/get_metadata",e,"user","api","rpc")},r.filesAlphaUpload=function(e){return this.request("files/alpha/upload",e,"user","content","upload")},r.filesCopy=function(e){return this.request("files/copy",e,"user","api","rpc")},r.filesCopyBatch=function(e){return this.request("files/copy_batch",e,"user","api","rpc")},r.filesCopyBatchCheck=function(e){return this.request("files/copy_batch/check",e,"user","api","rpc")},r.filesCopyReferenceGet=function(e){return this.request("files/copy_reference/get",e,"user","api","rpc")},r.filesCopyReferenceSave=function(e){return this.request("files/copy_reference/save",e,"user","api","rpc")},r.filesCopyV2=function(e){return this.request("files/copy_v2",e,"user","api","rpc")},r.filesCreateFolder=function(e){return this.request("files/create_folder",e,"user","api","rpc")},r.filesCreateFolderV2=function(e){return this.request("files/create_folder_v2",e,"user","api","rpc")},r.filesDelete=function(e){return this.request("files/delete",e,"user","api","rpc")},r.filesDeleteBatch=function(e){return this.request("files/delete_batch",e,"user","api","rpc")},r.filesDeleteBatchCheck=function(e){return this.request("files/delete_batch/check",e,"user","api","rpc")},r.filesDeleteV2=function(e){return this.request("files/delete_v2",e,"user","api","rpc")},r.filesDownload=function(e){return this.request("files/download",e,"user","content","download")},r.filesGetMetadata=function(e){return this.request("files/get_metadata",e,"user","api","rpc")},r.filesGetPreview=function(e){return this.request("files/get_preview",e,"user","content","download")},r.filesGetTemporaryLink=function(e){return this.request("files/get_temporary_link",e,"user","api","rpc")},r.filesGetThumbnail=function(e){return this.request("files/get_thumbnail",e,"user","content","download")},r.filesListFolder=function(e){return this.request("files/list_folder",e,"user","api","rpc")},r.filesListFolderContinue=function(e){return this.request("files/list_folder/continue",e,"user","api","rpc")},r.filesListFolderGetLatestCursor=function(e){return this.request("files/list_folder/get_latest_cursor",e,"user","api","rpc")},r.filesListFolderLongpoll=function(e){return this.request("files/list_folder/longpoll",e,"noauth","notify","rpc")},r.filesListRevisions=function(e){return this.request("files/list_revisions",e,"user","api","rpc")},r.filesMove=function(e){return this.request("files/move",e,"user","api","rpc")},r.filesMoveBatch=function(e){return this.request("files/move_batch",e,"user","api","rpc")},r.filesMoveBatchCheck=function(e){return this.request("files/move_batch/check",e,"user","api","rpc")},r.filesMoveV2=function(e){return this.request("files/move_v2",e,"user","api","rpc")},r.filesPermanentlyDelete=function(e){return this.request("files/permanently_delete",e,"user","api","rpc")},r.filesPropertiesAdd=function(e){return this.request("files/properties/add",e,"user","api","rpc")},r.filesPropertiesOverwrite=function(e){return this.request("files/properties/overwrite",e,"user","api","rpc")},r.filesPropertiesRemove=function(e){return this.request("files/properties/remove",e,"user","api","rpc")},r.filesPropertiesTemplateGet=function(e){return this.request("files/properties/template/get",e,"user","api","rpc")},r.filesPropertiesTemplateList=function(e){return this.request("files/properties/template/list",e,"user","api","rpc")},r.filesPropertiesUpdate=function(e){return this.request("files/properties/update",e,"user","api","rpc")},r.filesRestore=function(e){return this.request("files/restore",e,"user","api","rpc")},r.filesSaveUrl=function(e){return this.request("files/save_url",e,"user","api","rpc")},r.filesSaveUrlCheckJobStatus=function(e){return this.request("files/save_url/check_job_status",e,"user","api","rpc")},r.filesSearch=function(e){return this.request("files/search",e,"user","api","rpc")},r.filesUpload=function(e){return this.request("files/upload",e,"user","content","upload")},r.filesUploadSessionAppend=function(e){return this.request("files/upload_session/append",e,"user","content","upload")},r.filesUploadSessionAppendV2=function(e){return this.request("files/upload_session/append_v2",e,"user","content","upload")},r.filesUploadSessionFinish=function(e){return this.request("files/upload_session/finish",e,"user","content","upload")},r.filesUploadSessionFinishBatch=function(e){return this.request("files/upload_session/finish_batch",e,"user","api","rpc")},r.filesUploadSessionFinishBatchCheck=function(e){return this.request("files/upload_session/finish_batch/check",e,"user","api","rpc")},r.filesUploadSessionStart=function(e){return this.request("files/upload_session/start",e,"user","content","upload")},r.paperDocsArchive=function(e){return this.request("paper/docs/archive",e,"user","api","rpc")},r.paperDocsDownload=function(e){return this.request("paper/docs/download",e,"user","api","download")},r.paperDocsFolderUsersList=function(e){return this.request("paper/docs/folder_users/list",e,"user","api","rpc")},r.paperDocsFolderUsersListContinue=function(e){return this.request("paper/docs/folder_users/list/continue",e,"user","api","rpc")},r.paperDocsGetFolderInfo=function(e){return this.request("paper/docs/get_folder_info",e,"user","api","rpc")},r.paperDocsList=function(e){return this.request("paper/docs/list",e,"user","api","rpc")},r.paperDocsListContinue=function(e){return this.request("paper/docs/list/continue",e,"user","api","rpc")},r.paperDocsPermanentlyDelete=function(e){return this.request("paper/docs/permanently_delete",e,"user","api","rpc")},r.paperDocsSharingPolicyGet=function(e){return this.request("paper/docs/sharing_policy/get",e,"user","api","rpc")},r.paperDocsSharingPolicySet=function(e){return this.request("paper/docs/sharing_policy/set",e,"user","api","rpc")},r.paperDocsUsersAdd=function(e){return this.request("paper/docs/users/add",e,"user","api","rpc")},r.paperDocsUsersList=function(e){return this.request("paper/docs/users/list",e,"user","api","rpc")},r.paperDocsUsersListContinue=function(e){return this.request("paper/docs/users/list/continue",e,"user","api","rpc")},r.paperDocsUsersRemove=function(e){return this.request("paper/docs/users/remove",e,"user","api","rpc")},r.sharingAddFileMember=function(e){return this.request("sharing/add_file_member",e,"user","api","rpc")},r.sharingAddFolderMember=function(e){return this.request("sharing/add_folder_member",e,"user","api","rpc")},r.sharingChangeFileMemberAccess=function(e){return this.request("sharing/change_file_member_access",e,"user","api","rpc")},r.sharingCheckJobStatus=function(e){return this.request("sharing/check_job_status",e,"user","api","rpc")},r.sharingCheckRemoveMemberJobStatus=function(e){return this.request("sharing/check_remove_member_job_status",e,"user","api","rpc")},r.sharingCheckShareJobStatus=function(e){return this.request("sharing/check_share_job_status",e,"user","api","rpc")},r.sharingCreateSharedLink=function(e){return this.request("sharing/create_shared_link",e,"user","api","rpc")},r.sharingCreateSharedLinkWithSettings=function(e){return this.request("sharing/create_shared_link_with_settings",e,"user","api","rpc")},r.sharingGetFileMetadata=function(e){return this.request("sharing/get_file_metadata",e,"user","api","rpc")},r.sharingGetFileMetadataBatch=function(e){return this.request("sharing/get_file_metadata/batch",e,"user","api","rpc")},r.sharingGetFolderMetadata=function(e){return this.request("sharing/get_folder_metadata",e,"user","api","rpc")},r.sharingGetSharedLinkFile=function(e){return this.request("sharing/get_shared_link_file",e,"user","content","download")},r.sharingGetSharedLinkMetadata=function(e){return this.request("sharing/get_shared_link_metadata",e,"user","api","rpc")},r.sharingGetSharedLinks=function(e){return this.request("sharing/get_shared_links",e,"user","api","rpc")},r.sharingListFileMembers=function(e){return this.request("sharing/list_file_members",e,"user","api","rpc")},r.sharingListFileMembersBatch=function(e){return this.request("sharing/list_file_members/batch",e,"user","api","rpc")},r.sharingListFileMembersContinue=function(e){return this.request("sharing/list_file_members/continue",e,"user","api","rpc")},r.sharingListFolderMembers=function(e){return this.request("sharing/list_folder_members",e,"user","api","rpc")},r.sharingListFolderMembersContinue=function(e){return this.request("sharing/list_folder_members/continue",e,"user","api","rpc")},r.sharingListFolders=function(e){return this.request("sharing/list_folders",e,"user","api","rpc")},r.sharingListFoldersContinue=function(e){return this.request("sharing/list_folders/continue",e,"user","api","rpc")},r.sharingListMountableFolders=function(e){return this.request("sharing/list_mountable_folders",e,"user","api","rpc")},r.sharingListMountableFoldersContinue=function(e){return this.request("sharing/list_mountable_folders/continue",e,"user","api","rpc")},r.sharingListReceivedFiles=function(e){return this.request("sharing/list_received_files",e,"user","api","rpc")},r.sharingListReceivedFilesContinue=function(e){return this.request("sharing/list_received_files/continue",e,"user","api","rpc")},r.sharingListSharedLinks=function(e){return this.request("sharing/list_shared_links",e,"user","api","rpc")},r.sharingModifySharedLinkSettings=function(e){return this.request("sharing/modify_shared_link_settings",e,"user","api","rpc")},r.sharingMountFolder=function(e){return this.request("sharing/mount_folder",e,"user","api","rpc")},r.sharingRelinquishFileMembership=function(e){return this.request("sharing/relinquish_file_membership",e,"user","api","rpc")},r.sharingRelinquishFolderMembership=function(e){return this.request("sharing/relinquish_folder_membership",e,"user","api","rpc")},r.sharingRemoveFileMember=function(e){return this.request("sharing/remove_file_member",e,"user","api","rpc")},r.sharingRemoveFileMember2=function(e){return this.request("sharing/remove_file_member_2",e,"user","api","rpc")},r.sharingRemoveFolderMember=function(e){return this.request("sharing/remove_folder_member",e,"user","api","rpc")},r.sharingRevokeSharedLink=function(e){return this.request("sharing/revoke_shared_link",e,"user","api","rpc")},r.sharingShareFolder=function(e){return this.request("sharing/share_folder",e,"user","api","rpc")},r.sharingTransferFolder=function(e){return this.request("sharing/transfer_folder",e,"user","api","rpc")},r.sharingUnmountFolder=function(e){return this.request("sharing/unmount_folder",e,"user","api","rpc")},r.sharingUnshareFile=function(e){return this.request("sharing/unshare_file",e,"user","api","rpc")},r.sharingUnshareFolder=function(e){return this.request("sharing/unshare_folder",e,"user","api","rpc")},r.sharingUpdateFileMember=function(e){return this.request("sharing/update_file_member",e,"user","api","rpc")},r.sharingUpdateFolderMember=function(e){return this.request("sharing/update_folder_member",e,"user","api","rpc")},r.sharingUpdateFolderPolicy=function(e){return this.request("sharing/update_folder_policy",e,"user","api","rpc")},r.teamLogGetEvents=function(e){return this.request("team_log/get_events",e,"team","api","rpc")},r.teamLogGetEventsContinue=function(e){return this.request("team_log/get_events/continue",e,"team","api","rpc")},r.usersGetAccount=function(e){return this.request("users/get_account",e,"user","api","rpc")},r.usersGetAccountBatch=function(e){return this.request("users/get_account_batch",e,"user","api","rpc")},r.usersGetCurrentAccount=function(e){return this.request("users/get_current_account",e,"user","api","rpc")},r.usersGetSpaceUsage=function(e){return this.request("users/get_space_usage",e,"user","api","rpc")},e.exports=r},function(e,t,r){var s=r(3).Promise,i=r(2),n=r(1),u=function(e){return{status:e.status,error:e}},o=function(e,t,r,o,a,p){var c=function(s,c){t||(t=null);var f={method:"POST",headers:{"Content-Type":"application/json"},body:"string"!=typeof t?JSON.stringify(t):t};switch(r){case"team":case"user":f.headers.Authorization="Bearer "+a;break;case"noauth":break;default:throw new Error("Unhandled auth type: "+r)}p&&(f.headers["Dropbox-API-Select-User"]=p),n(i(o)+e,f).then(function(e){if(!e.ok){var t=new Error("Request failed");throw t.status=e.status,t}return e}).then(function(e){return e.json()}).then(function(e){s(e)}).catch(function(e){c(u(e))})};return new s(c)};e.exports=o},function(e,t,r){var s=r(3).Promise,i=r(2),n=r(1),u=r(4),o=function(e){return{status:e.status,error:e.toString()}},a=function(e,t,r,a,p,c){if("user"!==r)throw new Error("Unexpected auth type: "+r);var f=function(r,s){var f=t.contents;delete t.contents;var h={method:"POST",headers:{"Content-Type":"application/octet-stream",Authorization:"Bearer "+p,"Dropbox-API-Arg":u(t)},body:f};c&&(h.headers["Dropbox-API-Select-User"]=c),n(i(a)+e,h).then(function(e){return e.json()}).then(function(e){r(e.body)}).catch(function(e){s(o(e))})};return new s(f)};e.exports=a},function(e,r){e.exports=t},function(e,t){var r={};r.teamDevicesListMemberDevices=function(e){return this.request("team/devices/list_member_devices",e,"team","api","rpc")},r.teamDevicesListMembersDevices=function(e){return this.request("team/devices/list_members_devices",e,"team","api","rpc")},r.teamDevicesListTeamDevices=function(e){return this.request("team/devices/list_team_devices",e,"team","api","rpc")},r.teamDevicesRevokeDeviceSession=function(e){return this.request("team/devices/revoke_device_session",e,"team","api","rpc")},r.teamDevicesRevokeDeviceSessionBatch=function(e){return this.request("team/devices/revoke_device_session_batch",e,"team","api","rpc")},r.teamFeaturesGetValues=function(e){return this.request("team/features/get_values",e,"team","api","rpc")},r.teamGetInfo=function(e){return this.request("team/get_info",e,"team","api","rpc")},r.teamGroupsCreate=function(e){return this.request("team/groups/create",e,"team","api","rpc")},r.teamGroupsDelete=function(e){return this.request("team/groups/delete",e,"team","api","rpc")},r.teamGroupsGetInfo=function(e){return this.request("team/groups/get_info",e,"team","api","rpc")},r.teamGroupsJobStatusGet=function(e){return this.request("team/groups/job_status/get",e,"team","api","rpc")},r.teamGroupsList=function(e){return this.request("team/groups/list",e,"team","api","rpc")},r.teamGroupsListContinue=function(e){return this.request("team/groups/list/continue",e,"team","api","rpc")},r.teamGroupsMembersAdd=function(e){return this.request("team/groups/members/add",e,"team","api","rpc")},r.teamGroupsMembersList=function(e){return this.request("team/groups/members/list",e,"team","api","rpc")},r.teamGroupsMembersListContinue=function(e){return this.request("team/groups/members/list/continue",e,"team","api","rpc")},r.teamGroupsMembersRemove=function(e){return this.request("team/groups/members/remove",e,"team","api","rpc")},r.teamGroupsMembersSetAccessType=function(e){return this.request("team/groups/members/set_access_type",e,"team","api","rpc")},r.teamGroupsUpdate=function(e){return this.request("team/groups/update",e,"team","api","rpc")},r.teamLinkedAppsListMemberLinkedApps=function(e){return this.request("team/linked_apps/list_member_linked_apps",e,"team","api","rpc")},r.teamLinkedAppsListMembersLinkedApps=function(e){return this.request("team/linked_apps/list_members_linked_apps",e,"team","api","rpc")},r.teamLinkedAppsListTeamLinkedApps=function(e){return this.request("team/linked_apps/list_team_linked_apps",e,"team","api","rpc")},r.teamLinkedAppsRevokeLinkedApp=function(e){return this.request("team/linked_apps/revoke_linked_app",e,"team","api","rpc")},r.teamLinkedAppsRevokeLinkedAppBatch=function(e){return this.request("team/linked_apps/revoke_linked_app_batch",e,"team","api","rpc")},r.teamMembersAdd=function(e){return this.request("team/members/add",e,"team","api","rpc")},r.teamMembersAddJobStatusGet=function(e){return this.request("team/members/add/job_status/get",e,"team","api","rpc")},r.teamMembersGetInfo=function(e){return this.request("team/members/get_info",e,"team","api","rpc")},r.teamMembersList=function(e){return this.request("team/members/list",e,"team","api","rpc")},r.teamMembersListContinue=function(e){return this.request("team/members/list/continue",e,"team","api","rpc")},r.teamMembersRecover=function(e){return this.request("team/members/recover",e,"team","api","rpc")},r.teamMembersRemove=function(e){return this.request("team/members/remove",e,"team","api","rpc")},r.teamMembersRemoveJobStatusGet=function(e){return this.request("team/members/remove/job_status/get",e,"team","api","rpc")},r.teamMembersSendWelcomeEmail=function(e){return this.request("team/members/send_welcome_email",e,"team","api","rpc")},r.teamMembersSetAdminPermissions=function(e){return this.request("team/members/set_admin_permissions",e,"team","api","rpc")},r.teamMembersSetProfile=function(e){return this.request("team/members/set_profile",e,"team","api","rpc")},r.teamMembersSuspend=function(e){return this.request("team/members/suspend",e,"team","api","rpc")},r.teamMembersUnsuspend=function(e){return this.request("team/members/unsuspend",e,"team","api","rpc")},r.teamNamespacesList=function(e){return this.request("team/namespaces/list",e,"team","api","rpc")},r.teamNamespacesListContinue=function(e){return this.request("team/namespaces/list/continue",e,"team","api","rpc")},r.teamPropertiesTemplateAdd=function(e){return this.request("team/properties/template/add",e,"team","api","rpc")},r.teamPropertiesTemplateGet=function(e){return this.request("team/properties/template/get",e,"team","api","rpc")},r.teamPropertiesTemplateList=function(e){return this.request("team/properties/template/list",e,"team","api","rpc")},r.teamPropertiesTemplateUpdate=function(e){return this.request("team/properties/template/update",e,"team","api","rpc")},r.teamReportsGetActivity=function(e){return this.request("team/reports/get_activity",e,"team","api","rpc")},r.teamReportsGetDevices=function(e){return this.request("team/reports/get_devices",e,"team","api","rpc")},r.teamReportsGetMembership=function(e){return this.request("team/reports/get_membership",e,"team","api","rpc")},r.teamReportsGetStorage=function(e){return this.request("team/reports/get_storage",e,"team","api","rpc")},r.teamTeamFolderActivate=function(e){return this.request("team/team_folder/activate",e,"team","api","rpc")},r.teamTeamFolderArchive=function(e){return this.request("team/team_folder/archive",e,"team","api","rpc")},r.teamTeamFolderArchiveCheck=function(e){return this.request("team/team_folder/archive/check",e,"team","api","rpc")},r.teamTeamFolderCreate=function(e){return this.request("team/team_folder/create",e,"team","api","rpc")},r.teamTeamFolderGetInfo=function(e){return this.request("team/team_folder/get_info",e,"team","api","rpc")},r.teamTeamFolderList=function(e){return this.request("team/team_folder/list",e,"team","api","rpc")},r.teamTeamFolderListContinue=function(e){return this.request("team/team_folder/list/continue",e,"team","api","rpc")},r.teamTeamFolderPermanentlyDelete=function(e){return this.request("team/team_folder/permanently_delete",e,"team","api","rpc")},r.teamTeamFolderRename=function(e){return this.request("team/team_folder/rename",e,"team","api","rpc")},r.teamTokenGetAuthenticatedAdmin=function(e){return this.request("team/token/get_authenticated_admin",e,"team","api","rpc")},e.exports=r},function(e,t,r){var s,i=r(7),n=r(5),u=r(14);s=function(e){n.call(this,e)},s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype.actAsUser=function(e){return new i({accessToken:this.accessToken,clientId:this.clientId,selectUser:e,proxy:this.proxy})},s.prototype=Object.assign(s.prototype,u),e.exports=s}])});
{
"name": "react-native-dropbox-sdk",
"version": "0.3.0",
"version": "0.4.0",
"dropboxVersion": "2.5.7",

@@ -57,4 +57,5 @@ "description": "The Dropbox JavaScript SDK is a lightweight, promise based interface to the Dropbox v2 API that works in both nodejs and browser environments.",

"dependencies": {
"es6-promise": "^4.1.1"
"es6-promise": "^4.1.1",
"node-fetch": "^1.7.3"
}
}

@@ -16,2 +16,3 @@ # Dropbox JavaScript SDK for **React Native**

* Returned error objects contain only `error` and `status` properties, not `response`.
* Support for global `fetch` override by using `global.rnFetch`.

@@ -18,0 +19,0 @@ ## License

@@ -1,9 +0,14 @@

var fetchPolyfill = require('./fetch-polyfill');
var fetchPolyfill = require('node-fetch');
var theGlobalObject = typeof global !== undefined ? global : window;
function getFetchMethod() {
if (theGlobalObject) {
if (typeof theGlobalObject.rnFetch === 'function') {
return theGlobalObject.rnFetch;
} else if (typeof theGlobalObject.fetch === 'function') {
return theGlobalObject.fetch;
}
}
return fetchPolyfill;
// var glb = typeof global !== 'undefined' ? global : window;
// return typeof glb !== 'undefined' && typeof glb.fetch === 'function' ?
// glb.fetch :
// fetchPolyfill;
}

@@ -10,0 +15,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc