Skip to content

Commit ae91396

Browse files
committed
feat(api): add getLegalDocumentStatusByUserId in legal-document api
1 parent d4406ed commit ae91396

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
import { usecases } from '../../domain/usecases/index.js';
22

33
/**
4-
* Accept legal document by user id.
4+
* Accepts a legal document for a user by their ID.
55
*
6-
* @param{string} params.service
7-
* @param{string} params.type
8-
* @param{string} params.userId
9-
*
10-
* @returns {Promise<void>}
6+
* @param {Object} params - The parameters.
7+
* @param {string} params.type - The type of the legal document. (e.g. 'TOS')
8+
* @param {string} params.service - The service associated with the legal document. (e.g. 'pix-orga')
9+
* @param {string} params.userId - The ID of the user.
10+
* @returns {Promise<void>} - A promise that resolves when the legal document is accepted.
1111
*/
1212
const acceptLegalDocumentByUserId = async ({ type, service, userId }) => {
1313
return usecases.acceptLegalDocumentByUserId({ type, service, userId });
1414
};
1515

16-
export { acceptLegalDocumentByUserId };
16+
/**
17+
* Gets the status of a legal document for a user by their ID.
18+
*
19+
* @param {Object} params - The parameters.
20+
* @param {string} params.type - The type of the legal document. (e.g. 'TOS')
21+
* @param {string} params.service - The service associated with the legal document. (e.g. 'pix-orga')
22+
* @param {string} params.userId - The ID of the user.
23+
* @returns {Promise<LegalDocumentStatus>} - A promise that resolves with the status of the legal document.
24+
*/
25+
const getLegalDocumentStatusByUserId = async ({ type, service, userId }) => {
26+
return usecases.getLegalDocumentStatusByUserId({ type, service, userId });
27+
};
28+
29+
export { acceptLegalDocumentByUserId, getLegalDocumentStatusByUserId };

0 commit comments

Comments
 (0)