Skip to content

Commit cf306cf

Browse files
Merge pull request #361 from plivo/typescript-complaince-api-fix
Compliance submit API
2 parents 8f81be2 + 6d1ddc0 commit cf306cf

File tree

6 files changed

+30
-15
lines changed

6 files changed

+30
-15
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Change Log
2+
## [v4.75.1](https://github.com/plivo/plivo-node/tree/v4.75.1) (2025-07-21)
3+
**Feature - Comprehensive Compliance APIs TypeScript Support**
4+
- Added missing `submit` method for compliance applications
5+
- Fixed property name inconsistencies (`endUserID``endUserId`, `ComplianceRequirementId``complianceRequirementId`, `documentTypeID``documentTypeId`)
6+
- Corrected property types (`endUserType: object``endUserType: string`)
7+
- Fixed class name consistency (`ListComplianceDocumentResponse``ListComplianceDocumentsResponse`)
8+
- Improved return type accuracy for delete methods (`Promise<unknown>``Promise<boolean>`)
9+
- Added missing properties and removed incorrect ones in compliance document responses
10+
- Enhanced TypeScript definitions to match JavaScript implementations for better type safety and IntelliSense support
211
## [v4.75.0](https://github.com/plivo/plivo-node/tree/v4.75.0) (2025-07-07)
312
**Bug Fix - Update Number API**
413
- Fixed the issue where the subaccount parameter was not being updated in the Plivo Number API in node SDK

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plivo",
3-
"version": "4.75.0",
3+
"version": "4.75.1",
44
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
55
"homepage": "https://github.com/plivo/plivo-node",
66
"files": [

types/resources/complianceApplications.d.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export class ComplianceApplicationResponse {
22
constructor(params: object);
33
apiId: string;
44
complianceApplicationId: string;
5-
endUserID: string;
5+
endUserId: string;
66
endUserType: string;
77
alias: string;
88
status: string;
@@ -17,7 +17,7 @@ export class CreateComplianceApplicationResponse {
1717
constructor(params: object);
1818
apiId: string;
1919
complianceApplicationId: string;
20-
endUserID: string;
20+
endUserId: string;
2121
endUserType: string;
2222
alias: string;
2323
status: string;
@@ -70,7 +70,7 @@ export class ComplianceApplication extends PlivoResource {
7070
* @promise {boolean} return true if success
7171
* @fail {Error} return Error
7272
*/
73-
delete(): Promise<unknown>;
73+
delete(): Promise<boolean>;
7474
[clientKey]: symbol;
7575
}
7676

@@ -136,7 +136,15 @@ export class ComplianceApplicationInterface extends PlivoResourceInterface {
136136
* @promise {boolean} return true if success
137137
* @fail {Error} return Error
138138
*/
139-
delete(id: string): any;
139+
delete(id: string): Promise<boolean>;
140+
141+
/**
142+
* submit an application by given id
143+
* @method
144+
* @param {string} id - id of application
145+
* @fail {Error} return Error
146+
*/
147+
submit(id: string): Promise<ComplianceApplicationResponse>;
140148
[clientKey]: symbol;
141149
}
142150

types/resources/complianceDocumentTypes.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export class ComplianceDocumentTypeResponse {
22
constructor(params: object);
33
apiId: string;
4-
documentTypeID: string;
4+
documentTypeId: string;
55
documentName: string;
66
description: string;
77
information: object;

types/resources/complianceDocuments.d.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ export class ComplianceDocumentResponse {
22
constructor(params: object);
33
apiId: string;
44
documentTypeId: string;
5-
complianceDocumentId: string;
65
documentId: string;
6+
endUserId: string;
77
alias: string;
88
metaInformation: string;
9-
file: string;
109
fileName: string;
1110
createdAt: string;
1211
}
@@ -15,7 +14,6 @@ export class CreateComplianceDocumentResponse {
1514
constructor(params: object);
1615
apiId: string;
1716
documentTypeId: string;
18-
complianceDocumentId: string;
1917
documentId: string;
2018
endUserId: string;
2119
alias: string;
@@ -25,7 +23,7 @@ export class CreateComplianceDocumentResponse {
2523
createdAt: string;
2624
}
2725

28-
export class ListComplianceDocumentResponse {
26+
export class ListComplianceDocumentsResponse {
2927
constructor(params: object);
3028
apiId: string;
3129
meta: Object;
@@ -64,7 +62,7 @@ export class ComplianceDocument extends PlivoResource {
6462
* @promise {boolean} return true if success
6563
* @fail {Error} return Error
6664
*/
67-
delete(): Promise<unknown>;
65+
delete(): Promise<boolean>;
6866
[clientKey]: symbol;
6967
}
7068

@@ -92,7 +90,7 @@ export class ComplianceDocumentInterface extends PlivoResourceInterface {
9290
* @method
9391
* @param {object} params - params containing options to list compliance documents by.
9492
*/
95-
list(params: object): Promise<ListComplianceDocumentResponse>;
93+
list(params: object): Promise<ListComplianceDocumentsResponse>;
9694

9795
/**
9896
* Create a complaince document
@@ -124,7 +122,7 @@ export class ComplianceDocumentInterface extends PlivoResourceInterface {
124122
* @promise {boolean} return true if success
125123
* @fail {Error} return Error
126124
*/
127-
delete(id: string): any;
125+
delete(id: string): Promise<boolean>;
128126
[clientKey]: symbol;
129127
}
130128

types/resources/complianceRequirements.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export class ComplianceRequirementResponse {
22
constructor(params: object);
33
apiId: string;
4-
ComplianceRequirementId: string;
4+
complianceRequirementId: string;
55
countryIso2: string;
66
numberType: string;
7-
endUserType: object;
7+
endUserType: string;
88
acceptableDocumentTypes: string;
99
}
1010

0 commit comments

Comments
 (0)