@xvia/mtcidadao-api
Advanced tools
Comparing version 2.81.2 to 2.81.3
@@ -6,2 +6,3 @@ import { Service } from "../Service"; | ||
downloadDocument(documentType: string, documentNumber: string): Promise<any>; | ||
getDocumentsPortal(documentType: string, documentNumber: string): Promise<any>; | ||
downloadDocumentUrl(documentType: string, documentNumber: string): Promise<any>; | ||
@@ -8,0 +9,0 @@ requests(): Promise<any>; |
@@ -8,5 +8,5 @@ "use strict"; | ||
return this.request(`/v1/document/request`, { | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'content-type': 'application/json', | ||
"content-type": "application/json", | ||
}, | ||
@@ -20,3 +20,3 @@ body: JSON.stringify({ | ||
data, | ||
ownerDescription | ||
ownerDescription, | ||
}), | ||
@@ -27,5 +27,5 @@ }); | ||
return this.request(`/v1/document/deliver`, { | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'content-type': 'application/json', | ||
"content-type": "application/json", | ||
}, | ||
@@ -41,3 +41,3 @@ body: JSON.stringify({ | ||
documentOwner, | ||
ownerDescription | ||
ownerDescription, | ||
}), | ||
@@ -48,12 +48,15 @@ }); | ||
return this.request(`/v1/document/download`, { | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'content-type': 'application/json', | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
documentType, | ||
documentNumber | ||
documentNumber, | ||
}), | ||
}); | ||
} | ||
getDocumentsPortal(documentType, documentNumber) { | ||
return this.request(`/v1/document/getDocPortal/${documentType}/${documentNumber}`); | ||
} | ||
downloadDocumentUrl(documentType, documentNumber) { | ||
@@ -64,5 +67,5 @@ return this.request(`/v1/document/download/${documentType}/${documentNumber}`); | ||
return this.request(`/v1/document/requests`, { | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'content-type': 'application/json', | ||
"content-type": "application/json", | ||
}, | ||
@@ -74,5 +77,5 @@ body: JSON.stringify({}), | ||
return this.request(`/v1/document/all-document-requests`, { | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'content-type': 'application/json', | ||
"content-type": "application/json", | ||
}, | ||
@@ -83,3 +86,3 @@ body: JSON.stringify({ | ||
segId, | ||
platform | ||
platform, | ||
}), | ||
@@ -90,8 +93,8 @@ }); | ||
return this.request(`/v1/document/remove`, { | ||
method: 'POST', | ||
method: "POST", | ||
headers: { | ||
'content-type': 'application/json', | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
documentNumber | ||
documentNumber, | ||
}), | ||
@@ -98,0 +101,0 @@ }); |
{ | ||
"name": "@xvia/mtcidadao-api", | ||
"version": "2.81.2", | ||
"version": "2.81.3", | ||
"description": "MTCidadão api sdk", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
// AUTO GENERATED. DO NOT EDIT IT | ||
import {Service} from "../Service"; | ||
import { Service } from "../Service"; | ||
export class DocumentApi extends Service { | ||
requestDocument( | ||
documentType: string, | ||
documentNumber: string, | ||
documentOwner?: string, | ||
document?: string, | ||
segId?: string, | ||
data?: string, | ||
ownerDescription?: string, | ||
): Promise<any> { | ||
return this.request(`/v1/document/request`, { | ||
method: "POST", | ||
headers: { | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
documentType, | ||
documentNumber, | ||
documentOwner, | ||
document, | ||
segId, | ||
data, | ||
ownerDescription, | ||
}), | ||
}); | ||
} | ||
requestDocument(documentType: string, documentNumber: string, documentOwner?: string, document?: string, segId?: string, data?: string, ownerDescription?: string): Promise<any> { | ||
return this.request(`/v1/document/request`, { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
documentType, | ||
documentNumber, | ||
documentOwner, | ||
document, | ||
segId, | ||
data, | ||
ownerDescription | ||
}), | ||
}); | ||
} | ||
deliver( | ||
userId: string, | ||
documentType: string, | ||
documentNumber: string, | ||
document?: string, | ||
expiresAt?: string, | ||
signature?: string, | ||
rejectionReason?: string, | ||
documentOwner?: string, | ||
ownerDescription?: string, | ||
): Promise<any> { | ||
return this.request(`/v1/document/deliver`, { | ||
method: "POST", | ||
headers: { | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
userId, | ||
documentType, | ||
documentNumber, | ||
document, | ||
expiresAt, | ||
signature, | ||
rejectionReason, | ||
documentOwner, | ||
ownerDescription, | ||
}), | ||
}); | ||
} | ||
deliver(userId: string, documentType: string, documentNumber: string, document?: string, expiresAt?: string, signature?: string, rejectionReason?: string, documentOwner?: string, ownerDescription?: string): Promise<any> { | ||
return this.request(`/v1/document/deliver`, { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
userId, | ||
documentType, | ||
documentNumber, | ||
document, | ||
expiresAt, | ||
signature, | ||
rejectionReason, | ||
documentOwner, | ||
ownerDescription | ||
}), | ||
}); | ||
} | ||
downloadDocument(documentType: string, documentNumber: string): Promise<any> { | ||
return this.request(`/v1/document/download`, { | ||
method: "POST", | ||
headers: { | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
documentType, | ||
documentNumber, | ||
}), | ||
}); | ||
} | ||
downloadDocument(documentType: string, documentNumber: string): Promise<any> { | ||
return this.request(`/v1/document/download`, { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
documentType, | ||
documentNumber | ||
}), | ||
}); | ||
} | ||
getDocumentsPortal( | ||
documentType: string, | ||
documentNumber: string, | ||
): Promise<any> { | ||
return this.request( | ||
`/v1/document/getDocPortal/${documentType}/${documentNumber}`, | ||
); | ||
} | ||
downloadDocumentUrl(documentType: string, documentNumber: string): Promise<any> { | ||
return this.request(`/v1/document/download/${documentType}/${documentNumber}`); | ||
} | ||
downloadDocumentUrl( | ||
documentType: string, | ||
documentNumber: string, | ||
): Promise<any> { | ||
return this.request( | ||
`/v1/document/download/${documentType}/${documentNumber}`, | ||
); | ||
} | ||
requests(): Promise<any> { | ||
return this.request(`/v1/document/requests`, { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
}), | ||
}); | ||
} | ||
requests(): Promise<any> { | ||
return this.request(`/v1/document/requests`, { | ||
method: "POST", | ||
headers: { | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({}), | ||
}); | ||
} | ||
AllRGrequests(cpf: string, documentType: string, segId?: string, platform?: string): Promise<any> { | ||
return this.request(`/v1/document/all-document-requests`, { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
cpf, | ||
documentType, | ||
segId, | ||
platform | ||
}), | ||
}); | ||
} | ||
AllRGrequests( | ||
cpf: string, | ||
documentType: string, | ||
segId?: string, | ||
platform?: string, | ||
): Promise<any> { | ||
return this.request(`/v1/document/all-document-requests`, { | ||
method: "POST", | ||
headers: { | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
cpf, | ||
documentType, | ||
segId, | ||
platform, | ||
}), | ||
}); | ||
} | ||
removeDoc(documentNumber: string): Promise<any> { | ||
return this.request(`/v1/document/remove`, { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json', | ||
}, | ||
body: JSON.stringify({ | ||
documentNumber | ||
}), | ||
}); | ||
} | ||
removeDoc(documentNumber: string): Promise<any> { | ||
return this.request(`/v1/document/remove`, { | ||
method: "POST", | ||
headers: { | ||
"content-type": "application/json", | ||
}, | ||
body: JSON.stringify({ | ||
documentNumber, | ||
}), | ||
}); | ||
} | ||
} |
312259
9235