@redacto.io/consent-sdk-react-native 5.0.0-beta.4 → 5.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11256,7 +11256,8 @@ var manageConsent = async ({
11256
11256
  nominatorContact,
11257
11257
  dataElementUuids,
11258
11258
  noticeUuid,
11259
- dataElements
11259
+ dataElements,
11260
+ language
11260
11261
  });
11261
11262
  }
11262
11263
  console.error(`Error ${action} consent:`, error);
@@ -16688,6 +16689,11 @@ function Form({ onCreateRequest }) {
16688
16689
  const isFormValid = (0, import_react29.useMemo)(() => detailsValid && confirmChecked, [detailsValid, confirmChecked]);
16689
16690
  const handleUpload = (0, import_react29.useCallback)(async () => {
16690
16691
  if (!organizationId || !workspaceId) return;
16692
+ const caseUuid = formDataResponse == null ? void 0 : formDataResponse.uuid;
16693
+ if (!caseUuid) {
16694
+ import_react_native44.Alert.alert(t("uploadFile"), t("unableToUpload") || "Unable to upload file. Please try again.");
16695
+ return;
16696
+ }
16691
16697
  try {
16692
16698
  const file = await pickFile();
16693
16699
  if (!file) return;
@@ -16704,11 +16710,11 @@ function Form({ onCreateRequest }) {
16704
16710
  "payload",
16705
16711
  JSON.stringify({
16706
16712
  organization_uuid: organizationId || "",
16707
- space: `privacy/${docUuid}`,
16713
+ space: `privacy/${caseUuid}`,
16708
16714
  uuid: docUuid,
16709
16715
  is_public: true,
16710
16716
  allow_ai_processing: true,
16711
- metadata: { group_by: "privacy", product: "privacy_center" }
16717
+ metadata: { group_by: "privacy", case_uuid: caseUuid, product: "privacy_center" }
16712
16718
  })
16713
16719
  );
16714
16720
  const result = await uploadFileWithS2S({
@@ -16728,7 +16734,7 @@ function Form({ onCreateRequest }) {
16728
16734
  } finally {
16729
16735
  setIsUploading(false);
16730
16736
  }
16731
- }, [organizationId, workspaceId, authContext, consentClient, baseUrl, t]);
16737
+ }, [organizationId, workspaceId, authContext, consentClient, baseUrl, t, formDataResponse]);
16732
16738
  const removeUploadedDoc = (0, import_react29.useCallback)((uuid) => {
16733
16739
  setUploadedDocs((prev) => prev.filter((d) => d.uuid !== uuid));
16734
16740
  }, []);
@@ -11143,7 +11143,8 @@ var manageConsent = async ({
11143
11143
  nominatorContact,
11144
11144
  dataElementUuids,
11145
11145
  noticeUuid,
11146
- dataElements
11146
+ dataElements,
11147
+ language
11147
11148
  });
11148
11149
  }
11149
11150
  console.error(`Error ${action} consent:`, error);
@@ -16685,6 +16686,11 @@ function Form({ onCreateRequest }) {
16685
16686
  const isFormValid = useMemo14(() => detailsValid && confirmChecked, [detailsValid, confirmChecked]);
16686
16687
  const handleUpload = useCallback10(async () => {
16687
16688
  if (!organizationId || !workspaceId) return;
16689
+ const caseUuid = formDataResponse == null ? void 0 : formDataResponse.uuid;
16690
+ if (!caseUuid) {
16691
+ Alert5.alert(t("uploadFile"), t("unableToUpload") || "Unable to upload file. Please try again.");
16692
+ return;
16693
+ }
16688
16694
  try {
16689
16695
  const file = await pickFile();
16690
16696
  if (!file) return;
@@ -16701,11 +16707,11 @@ function Form({ onCreateRequest }) {
16701
16707
  "payload",
16702
16708
  JSON.stringify({
16703
16709
  organization_uuid: organizationId || "",
16704
- space: `privacy/${docUuid}`,
16710
+ space: `privacy/${caseUuid}`,
16705
16711
  uuid: docUuid,
16706
16712
  is_public: true,
16707
16713
  allow_ai_processing: true,
16708
- metadata: { group_by: "privacy", product: "privacy_center" }
16714
+ metadata: { group_by: "privacy", case_uuid: caseUuid, product: "privacy_center" }
16709
16715
  })
16710
16716
  );
16711
16717
  const result = await uploadFileWithS2S({
@@ -16725,7 +16731,7 @@ function Form({ onCreateRequest }) {
16725
16731
  } finally {
16726
16732
  setIsUploading(false);
16727
16733
  }
16728
- }, [organizationId, workspaceId, authContext, consentClient, baseUrl, t]);
16734
+ }, [organizationId, workspaceId, authContext, consentClient, baseUrl, t, formDataResponse]);
16729
16735
  const removeUploadedDoc = useCallback10((uuid) => {
16730
16736
  setUploadedDocs((prev) => prev.filter((d) => d.uuid !== uuid));
16731
16737
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redacto.io/consent-sdk-react-native",
3
- "version": "5.0.0-beta.4",
3
+ "version": "5.0.0-beta.5",
4
4
  "description": "React Native SDK for integrating Redacto consent notices and privacy center in mobile apps.",
5
5
  "keywords": [
6
6
  "consent",