synapse-react-client 3.1.40 → 3.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -10
- package/dist/index.mjs +21 -10
- package/dist/umd/synapse-react-client.development.js +22 -11
- package/dist/umd/synapse-react-client.development.js.map +2 -2
- package/dist/umd/synapse-react-client.production.min.js +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -843,7 +843,7 @@ declare class KeyFactory {
|
|
|
843
843
|
getApprovedSubmissionInfoQueryKey(request?: SubmissionInfoPageRequest): QueryKey;
|
|
844
844
|
getValidationSchemaQueryKey(schema$id: string): QueryKey;
|
|
845
845
|
getPresignedUrlContentQueryKey(fileHandle: FileHandle, request: BatchFileRequest, maxSizeBytes?: number): QueryKey;
|
|
846
|
-
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation: FileHandleAssociation): QueryKey;
|
|
846
|
+
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation: FileHandleAssociation, forceAnonymous: boolean): QueryKey;
|
|
847
847
|
getProfileImageQueryKey(userId: string): QueryKey;
|
|
848
848
|
getDefaultUploadDestinationQueryKey(containerEntityId: string): QueryKey;
|
|
849
849
|
getForumModeratorsQueryKey(forumId: string): QueryKey;
|
package/dist/index.js
CHANGED
|
@@ -31390,8 +31390,12 @@ var KeyFactory = class {
|
|
|
31390
31390
|
getPresignedUrlContentQueryKey(fileHandle, request, maxSizeBytes) {
|
|
31391
31391
|
return this.getKey("presignedUrlContent", fileHandle, request, maxSizeBytes);
|
|
31392
31392
|
}
|
|
31393
|
-
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation) {
|
|
31394
|
-
return this.getKey(
|
|
31393
|
+
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation, forceAnonymous) {
|
|
31394
|
+
return this.getKey(
|
|
31395
|
+
"presignedUrlContentFromFHA",
|
|
31396
|
+
fileHandleAssociation,
|
|
31397
|
+
forceAnonymous
|
|
31398
|
+
);
|
|
31395
31399
|
}
|
|
31396
31400
|
getProfileImageQueryKey(userId) {
|
|
31397
31401
|
return this.getKey("profileImageData", userId);
|
|
@@ -33079,7 +33083,7 @@ function useGetPresignedUrlContent(fileHandle, request, maxFileSizeBytes, option
|
|
|
33079
33083
|
}
|
|
33080
33084
|
);
|
|
33081
33085
|
}
|
|
33082
|
-
function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options) {
|
|
33086
|
+
function useGetPresignedUrlContentFromFHA(fileHandleAssociation, forceAnonymous = false, options) {
|
|
33083
33087
|
const { accessToken, keyFactory } = useSynapseContext();
|
|
33084
33088
|
const queryFn = async () => {
|
|
33085
33089
|
const batchFileResult = await synapse_client_default.getFiles(
|
|
@@ -33089,7 +33093,7 @@ function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options) {
|
|
|
33089
33093
|
includePreSignedURLs: true,
|
|
33090
33094
|
includePreviewPreSignedURLs: false
|
|
33091
33095
|
},
|
|
33092
|
-
accessToken
|
|
33096
|
+
forceAnonymous ? void 0 : accessToken
|
|
33093
33097
|
);
|
|
33094
33098
|
const data = await synapse_client_default.getFileHandleContent(
|
|
33095
33099
|
batchFileResult.requestedFiles[0].fileHandle,
|
|
@@ -33098,7 +33102,10 @@ function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options) {
|
|
|
33098
33102
|
return data;
|
|
33099
33103
|
};
|
|
33100
33104
|
return (0, import_react_query7.useQuery)(
|
|
33101
|
-
keyFactory.getPresignedUrlFromFHAContentQueryKey(
|
|
33105
|
+
keyFactory.getPresignedUrlFromFHAContentQueryKey(
|
|
33106
|
+
fileHandleAssociation,
|
|
33107
|
+
forceAnonymous
|
|
33108
|
+
),
|
|
33102
33109
|
queryFn,
|
|
33103
33110
|
{
|
|
33104
33111
|
staleTime: Infinity,
|
|
@@ -65662,11 +65669,15 @@ var import_lodash_es37 = require("lodash-es");
|
|
|
65662
65669
|
var TermsAndConditionsItem = (props) => {
|
|
65663
65670
|
const { id, item, enabled, checked, onChange, termsAndConditionsTableID } = props;
|
|
65664
65671
|
const { iconFileHandleId, label, description } = item;
|
|
65665
|
-
const { data: iconFileContent } = useGetPresignedUrlContentFromFHA(
|
|
65666
|
-
|
|
65667
|
-
|
|
65668
|
-
|
|
65669
|
-
|
|
65672
|
+
const { data: iconFileContent } = useGetPresignedUrlContentFromFHA(
|
|
65673
|
+
{
|
|
65674
|
+
associateObjectId: termsAndConditionsTableID,
|
|
65675
|
+
associateObjectType: FileHandleAssociateType.TableEntity,
|
|
65676
|
+
fileHandleId: iconFileHandleId
|
|
65677
|
+
},
|
|
65678
|
+
true
|
|
65679
|
+
// force this query to be run as the anonymous user (without an access token)
|
|
65680
|
+
);
|
|
65670
65681
|
const [showDesc, setShowDes] = (0, import_react449.useState)(false);
|
|
65671
65682
|
const [isChecked, setIsChecked] = (0, import_react449.useState)(false);
|
|
65672
65683
|
let mounted = true;
|
package/dist/index.mjs
CHANGED
|
@@ -31264,8 +31264,12 @@ var KeyFactory = class {
|
|
|
31264
31264
|
getPresignedUrlContentQueryKey(fileHandle, request, maxSizeBytes) {
|
|
31265
31265
|
return this.getKey("presignedUrlContent", fileHandle, request, maxSizeBytes);
|
|
31266
31266
|
}
|
|
31267
|
-
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation) {
|
|
31268
|
-
return this.getKey(
|
|
31267
|
+
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation, forceAnonymous) {
|
|
31268
|
+
return this.getKey(
|
|
31269
|
+
"presignedUrlContentFromFHA",
|
|
31270
|
+
fileHandleAssociation,
|
|
31271
|
+
forceAnonymous
|
|
31272
|
+
);
|
|
31269
31273
|
}
|
|
31270
31274
|
getProfileImageQueryKey(userId) {
|
|
31271
31275
|
return this.getKey("profileImageData", userId);
|
|
@@ -33048,7 +33052,7 @@ function useGetPresignedUrlContent(fileHandle, request, maxFileSizeBytes, option
|
|
|
33048
33052
|
}
|
|
33049
33053
|
);
|
|
33050
33054
|
}
|
|
33051
|
-
function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options) {
|
|
33055
|
+
function useGetPresignedUrlContentFromFHA(fileHandleAssociation, forceAnonymous = false, options) {
|
|
33052
33056
|
const { accessToken, keyFactory } = useSynapseContext();
|
|
33053
33057
|
const queryFn = async () => {
|
|
33054
33058
|
const batchFileResult = await synapse_client_default.getFiles(
|
|
@@ -33058,7 +33062,7 @@ function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options) {
|
|
|
33058
33062
|
includePreSignedURLs: true,
|
|
33059
33063
|
includePreviewPreSignedURLs: false
|
|
33060
33064
|
},
|
|
33061
|
-
accessToken
|
|
33065
|
+
forceAnonymous ? void 0 : accessToken
|
|
33062
33066
|
);
|
|
33063
33067
|
const data = await synapse_client_default.getFileHandleContent(
|
|
33064
33068
|
batchFileResult.requestedFiles[0].fileHandle,
|
|
@@ -33067,7 +33071,10 @@ function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options) {
|
|
|
33067
33071
|
return data;
|
|
33068
33072
|
};
|
|
33069
33073
|
return useQuery4(
|
|
33070
|
-
keyFactory.getPresignedUrlFromFHAContentQueryKey(
|
|
33074
|
+
keyFactory.getPresignedUrlFromFHAContentQueryKey(
|
|
33075
|
+
fileHandleAssociation,
|
|
33076
|
+
forceAnonymous
|
|
33077
|
+
),
|
|
33071
33078
|
queryFn,
|
|
33072
33079
|
{
|
|
33073
33080
|
staleTime: Infinity,
|
|
@@ -65792,11 +65799,15 @@ import { times as times5 } from "lodash-es";
|
|
|
65792
65799
|
var TermsAndConditionsItem = (props) => {
|
|
65793
65800
|
const { id, item, enabled, checked, onChange, termsAndConditionsTableID } = props;
|
|
65794
65801
|
const { iconFileHandleId, label, description } = item;
|
|
65795
|
-
const { data: iconFileContent } = useGetPresignedUrlContentFromFHA(
|
|
65796
|
-
|
|
65797
|
-
|
|
65798
|
-
|
|
65799
|
-
|
|
65802
|
+
const { data: iconFileContent } = useGetPresignedUrlContentFromFHA(
|
|
65803
|
+
{
|
|
65804
|
+
associateObjectId: termsAndConditionsTableID,
|
|
65805
|
+
associateObjectType: FileHandleAssociateType.TableEntity,
|
|
65806
|
+
fileHandleId: iconFileHandleId
|
|
65807
|
+
},
|
|
65808
|
+
true
|
|
65809
|
+
// force this query to be run as the anonymous user (without an access token)
|
|
65810
|
+
);
|
|
65800
65811
|
const [showDesc, setShowDes] = useState149(false);
|
|
65801
65812
|
const [isChecked, setIsChecked] = useState149(false);
|
|
65802
65813
|
let mounted = true;
|
|
@@ -59546,7 +59546,7 @@ Please use another name.` : (0, _utils.formatMuiErrorMessage)(18));
|
|
|
59546
59546
|
"package.json"(exports2, module2) {
|
|
59547
59547
|
module2.exports = {
|
|
59548
59548
|
name: "synapse-react-client",
|
|
59549
|
-
version: "3.1.
|
|
59549
|
+
version: "3.1.41",
|
|
59550
59550
|
private: false,
|
|
59551
59551
|
main: "./dist/index.js",
|
|
59552
59552
|
module: "./dist/index.mjs",
|
|
@@ -104821,8 +104821,12 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
104821
104821
|
getPresignedUrlContentQueryKey(fileHandle, request, maxSizeBytes) {
|
|
104822
104822
|
return this.getKey("presignedUrlContent", fileHandle, request, maxSizeBytes);
|
|
104823
104823
|
}
|
|
104824
|
-
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation) {
|
|
104825
|
-
return this.getKey(
|
|
104824
|
+
getPresignedUrlFromFHAContentQueryKey(fileHandleAssociation, forceAnonymous) {
|
|
104825
|
+
return this.getKey(
|
|
104826
|
+
"presignedUrlContentFromFHA",
|
|
104827
|
+
fileHandleAssociation,
|
|
104828
|
+
forceAnonymous
|
|
104829
|
+
);
|
|
104826
104830
|
}
|
|
104827
104831
|
getProfileImageQueryKey(userId) {
|
|
104828
104832
|
return this.getKey("profileImageData", userId);
|
|
@@ -110242,7 +110246,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
110242
110246
|
}, options2)
|
|
110243
110247
|
);
|
|
110244
110248
|
}
|
|
110245
|
-
function useGetPresignedUrlContentFromFHA(fileHandleAssociation, options2) {
|
|
110249
|
+
function useGetPresignedUrlContentFromFHA(fileHandleAssociation, forceAnonymous = false, options2) {
|
|
110246
110250
|
const { accessToken, keyFactory } = useSynapseContext();
|
|
110247
110251
|
const queryFn = () => __async(this, null, function* () {
|
|
110248
110252
|
const batchFileResult = yield synapse_client_default.getFiles(
|
|
@@ -110252,7 +110256,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
110252
110256
|
includePreSignedURLs: true,
|
|
110253
110257
|
includePreviewPreSignedURLs: false
|
|
110254
110258
|
},
|
|
110255
|
-
accessToken
|
|
110259
|
+
forceAnonymous ? void 0 : accessToken
|
|
110256
110260
|
);
|
|
110257
110261
|
const data = yield synapse_client_default.getFileHandleContent(
|
|
110258
110262
|
batchFileResult.requestedFiles[0].fileHandle,
|
|
@@ -110261,7 +110265,10 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
110261
110265
|
return data;
|
|
110262
110266
|
});
|
|
110263
110267
|
return useQuery(
|
|
110264
|
-
keyFactory.getPresignedUrlFromFHAContentQueryKey(
|
|
110268
|
+
keyFactory.getPresignedUrlFromFHAContentQueryKey(
|
|
110269
|
+
fileHandleAssociation,
|
|
110270
|
+
forceAnonymous
|
|
110271
|
+
),
|
|
110265
110272
|
queryFn,
|
|
110266
110273
|
__spreadValues({
|
|
110267
110274
|
staleTime: Infinity
|
|
@@ -173726,11 +173733,15 @@ dl_list_file_entities = syn.get_download_list()`;
|
|
|
173726
173733
|
var TermsAndConditionsItem = (props) => {
|
|
173727
173734
|
const { id: id2, item, enabled, checked, onChange: onChange2, termsAndConditionsTableID } = props;
|
|
173728
173735
|
const { iconFileHandleId, label, description } = item;
|
|
173729
|
-
const { data: iconFileContent } = useGetPresignedUrlContentFromFHA(
|
|
173730
|
-
|
|
173731
|
-
|
|
173732
|
-
|
|
173733
|
-
|
|
173736
|
+
const { data: iconFileContent } = useGetPresignedUrlContentFromFHA(
|
|
173737
|
+
{
|
|
173738
|
+
associateObjectId: termsAndConditionsTableID,
|
|
173739
|
+
associateObjectType: FileHandleAssociateType.TableEntity,
|
|
173740
|
+
fileHandleId: iconFileHandleId
|
|
173741
|
+
},
|
|
173742
|
+
true
|
|
173743
|
+
// force this query to be run as the anonymous user (without an access token)
|
|
173744
|
+
);
|
|
173734
173745
|
const [showDesc, setShowDes] = (0, import_react449.useState)(false);
|
|
173735
173746
|
const [isChecked, setIsChecked] = (0, import_react449.useState)(false);
|
|
173736
173747
|
let mounted = true;
|