@paro.io/expert-shared-components 1.12.17 → 1.12.18

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.
@@ -4,9 +4,10 @@ interface UploadFileParams {
4
4
  disputeId?: number;
5
5
  projectId: number;
6
6
  documentUploadUrl: string;
7
+ bucketName: string;
7
8
  updateClientInvoiceDisputeMutation: any;
8
9
  previousFiles: string | string[];
9
10
  isExpert: boolean;
10
11
  }
11
- export declare const fileUploader: ({ file, projectId, documentUploadUrl, updateClientInvoiceDisputeMutation, disputeId, previousFiles, isExpert, }: UploadFileParams) => Promise<any>;
12
+ export declare const fileUploader: ({ file, projectId, documentUploadUrl, updateClientInvoiceDisputeMutation, bucketName, disputeId, previousFiles, isExpert, }: UploadFileParams) => Promise<any>;
12
13
  export {};
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.fileUploader = void 0;
16
16
  const UploadClient_1 = __importDefault(require("../shared/UploadClient"));
17
17
  const utils_1 = require("../shared/utils");
18
- const fileUploader = (_a) => __awaiter(void 0, [_a], void 0, function* ({ file, projectId, documentUploadUrl, updateClientInvoiceDisputeMutation, disputeId, previousFiles, isExpert, }) {
18
+ const fileUploader = (_a) => __awaiter(void 0, [_a], void 0, function* ({ file, projectId, documentUploadUrl, updateClientInvoiceDisputeMutation, bucketName, disputeId, previousFiles, isExpert, }) {
19
19
  const documentLinks = previousFiles ? (typeof previousFiles === 'string' ? previousFiles.split(',') : [...previousFiles]) : [];
20
20
  try {
21
21
  (0, utils_1.showToast)('success', 'Starting Document Upload');
@@ -24,7 +24,7 @@ const fileUploader = (_a) => __awaiter(void 0, [_a], void 0, function* ({ file,
24
24
  fileName: file.name,
25
25
  projectId,
26
26
  documentUploadUrl,
27
- bucketName: 'expert-client-dispute-files',
27
+ bucketName: bucketName,
28
28
  });
29
29
  yield uploadClient.triggerMultipartUpload().then((res) => __awaiter(void 0, void 0, void 0, function* () {
30
30
  const resParsed = JSON.parse(res);
@@ -200,6 +200,7 @@ const ClientDisputeProjectCard = ({ clientInvoice, updateClientInvoiceDisputeMut
200
200
  disputeId: clientInvoice.disputeId,
201
201
  projectId: Number((_b = (_a = clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.projectId),
202
202
  documentUploadUrl: documentUploadUrl,
203
+ bucketName: bucketName,
203
204
  updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation,
204
205
  previousFiles: (_e = (_d = (_c = clientInvoice === null || clientInvoice === void 0 ? void 0 : clientInvoice.disputeProjects) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.clientDocumentLinks) !== null && _e !== void 0 ? _e : [],
205
206
  isExpert: false,
@@ -80,6 +80,7 @@ const DisputeSection = ({ dispute, documentUploadUrl, downloadDocumentUrl, bucke
80
80
  documentName: selectedFile.name,
81
81
  projectId: Number((_b = (_a = dispute === null || dispute === void 0 ? void 0 : dispute.disputeProjects) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.projectId),
82
82
  documentUploadUrl: documentUploadUrl,
83
+ bucketName: bucketName,
83
84
  updateClientInvoiceDisputeMutation: updateClientInvoiceDisputeMutation,
84
85
  disputeId: dispute === null || dispute === void 0 ? void 0 : dispute.disputeId,
85
86
  previousFiles: isExpert ? expertDocumentLinks : clientDocumentLinks,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.12.17",
3
+ "version": "1.12.18",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {