boldsign 3.0.0 → 3.0.1
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.
- package/.openapi-generator/FILES +1 -0
- package/README.md +3 -0
- package/api/apis.ts +1 -1
- package/api/documentApi.ts +111 -0
- package/api/userApi.ts +122 -1
- package/boldsign-3.0.1.tgz +0 -0
- package/dist/api/apis.d.ts +1 -1
- package/dist/api/apis.js +1 -1
- package/dist/api/documentApi.d.ts +1 -0
- package/dist/api/documentApi.js +75 -0
- package/dist/api/documentApi.js.map +1 -1
- package/dist/api/userApi.d.ts +2 -1
- package/dist/api/userApi.js +81 -0
- package/dist/api/userApi.js.map +1 -1
- package/dist/examples/draftSend.d.ts +1 -0
- package/dist/examples/draftSend.js +27 -0
- package/dist/examples/draftSend.js.map +1 -0
- package/dist/examples/userChangeTeam.d.ts +1 -0
- package/dist/examples/userChangeTeam.js +30 -0
- package/dist/examples/userChangeTeam.js.map +1 -0
- package/dist/model/changeTeamRequest.d.ts +15 -0
- package/dist/model/changeTeamRequest.js +23 -0
- package/dist/model/changeTeamRequest.js.map +1 -0
- package/dist/model/createSenderIdentityRequest.d.ts +26 -0
- package/dist/model/createSenderIdentityRequest.js +31 -0
- package/dist/model/createSenderIdentityRequest.js.map +1 -1
- package/dist/model/documentInfo.d.ts +4 -2
- package/dist/model/documentInfo.js +2 -0
- package/dist/model/documentInfo.js.map +1 -1
- package/dist/model/documentSigner.d.ts +4 -2
- package/dist/model/documentSigner.js +2 -0
- package/dist/model/documentSigner.js.map +1 -1
- package/dist/model/documentSignerDetails.d.ts +4 -2
- package/dist/model/documentSignerDetails.js +2 -0
- package/dist/model/documentSignerDetails.js.map +1 -1
- package/dist/model/editSenderIdentityRequest.d.ts +26 -0
- package/dist/model/editSenderIdentityRequest.js +31 -0
- package/dist/model/editSenderIdentityRequest.js.map +1 -1
- package/dist/model/embeddedCreateTemplateRequest.d.ts +2 -1
- package/dist/model/embeddedCreateTemplateRequest.js +1 -0
- package/dist/model/embeddedCreateTemplateRequest.js.map +1 -1
- package/dist/model/embeddedDocumentRequest.d.ts +2 -1
- package/dist/model/embeddedDocumentRequest.js +1 -0
- package/dist/model/embeddedDocumentRequest.js.map +1 -1
- package/dist/model/embeddedMergeTemplateFormRequest.d.ts +2 -1
- package/dist/model/embeddedMergeTemplateFormRequest.js +1 -0
- package/dist/model/embeddedMergeTemplateFormRequest.js.map +1 -1
- package/dist/model/embeddedSendTemplateFormRequest.d.ts +2 -1
- package/dist/model/embeddedSendTemplateFormRequest.js +1 -0
- package/dist/model/embeddedSendTemplateFormRequest.js.map +1 -1
- package/dist/model/embeddedTemplateEditRequest.d.ts +2 -1
- package/dist/model/embeddedTemplateEditRequest.js +1 -0
- package/dist/model/embeddedTemplateEditRequest.js.map +1 -1
- package/dist/model/index.d.ts +2 -1
- package/dist/model/index.js +8 -3
- package/dist/model/index.js.map +1 -1
- package/dist/model/role.d.ts +4 -2
- package/dist/model/role.js +2 -0
- package/dist/model/role.js.map +1 -1
- package/dist/model/roles.d.ts +4 -2
- package/dist/model/roles.js +2 -0
- package/dist/model/roles.js.map +1 -1
- package/dist/model/senderIdentityViewModel.d.ts +1 -0
- package/dist/model/senderIdentityViewModel.js +5 -0
- package/dist/model/senderIdentityViewModel.js.map +1 -1
- package/dist/model/templateRole.d.ts +4 -2
- package/dist/model/templateRole.js +2 -0
- package/dist/model/templateRole.js.map +1 -1
- package/docs/ChangeTeamRequest.md +12 -0
- package/docs/CreateSenderIdentityRequest.md +1 -0
- package/docs/DocumentApi.md +33 -0
- package/docs/DocumentInfo.md +1 -1
- package/docs/DocumentSigner.md +1 -1
- package/docs/DocumentSignerDetails.md +1 -1
- package/docs/EditSenderIdentityRequest.md +1 -0
- package/docs/Role.md +1 -1
- package/docs/Roles.md +1 -1
- package/docs/SenderIdentityViewModel.md +1 -0
- package/docs/TemplateRole.md +1 -1
- package/docs/UserApi.md +34 -0
- package/examples/draftSend.ts +12 -0
- package/examples/userChangeTeam.ts +15 -0
- package/model/changeTeamRequest.ts +37 -0
- package/model/createSenderIdentityRequest.ts +31 -0
- package/model/documentInfo.ts +5 -3
- package/model/documentSigner.ts +5 -3
- package/model/documentSignerDetails.ts +5 -3
- package/model/editSenderIdentityRequest.ts +31 -0
- package/model/embeddedCreateTemplateRequest.ts +2 -1
- package/model/embeddedDocumentRequest.ts +2 -1
- package/model/embeddedMergeTemplateFormRequest.ts +2 -1
- package/model/embeddedSendTemplateFormRequest.ts +2 -1
- package/model/embeddedTemplateEditRequest.ts +2 -1
- package/model/index.ts +5 -0
- package/model/role.ts +5 -3
- package/model/roles.ts +5 -3
- package/model/senderIdentityViewModel.ts +6 -0
- package/model/templateRole.ts +5 -3
- package/package.json +1 -1
- package/boldsign-3.0.0.tgz +0 -0
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -93,6 +93,7 @@ All URIs are relative to *https://api.boldsign.com*
|
|
|
93
93
|
| *DocumentApi* | [**downloadAttachment**](./docs/DocumentApi.md#downloadattachment) | **GET** /v1/document/downloadAttachment | Download the Attachment. |
|
|
94
94
|
| *DocumentApi* | [**downloadAuditLog**](./docs/DocumentApi.md#downloadauditlog) | **GET** /v1/document/downloadAuditLog | Download the audit trail document. |
|
|
95
95
|
| *DocumentApi* | [**downloadDocument**](./docs/DocumentApi.md#downloaddocument) | **GET** /v1/document/download | Download the document. |
|
|
96
|
+
| *DocumentApi* | [**draftSend**](./docs/DocumentApi.md#draftsend) | **POST** /v1/document/draftSend | Sends a draft-status document out for signature. |
|
|
96
97
|
| *DocumentApi* | [**extendExpiry**](./docs/DocumentApi.md#extendexpiry) | **PATCH** /v1/document/extendExpiry | Extends the expiration date of the document. |
|
|
97
98
|
| *DocumentApi* | [**getProperties**](./docs/DocumentApi.md#getproperties) | **GET** /v1/document/properties | Get summary of the document. |
|
|
98
99
|
| *DocumentApi* | [**getEmbeddedSignLink**](./docs/DocumentApi.md#getembeddedsignlink) | **GET** /v1/document/getEmbeddedSignLink | Get sign link for Embedded Sign. |
|
|
@@ -133,6 +134,7 @@ All URIs are relative to *https://api.boldsign.com*
|
|
|
133
134
|
| *TemplateApi* | [**mergeCreateEmbeddedRequestUrlTemplate**](./docs/TemplateApi.md#mergecreateembeddedrequesturltemplate) | **POST** /v1/template/mergeCreateEmbeddedRequestUrl | Generates a merge request URL using a template that combines document merging and sending processes into your application. |
|
|
134
135
|
| *TemplateApi* | [**sendUsingTemplate**](./docs/TemplateApi.md#sendusingtemplate) | **POST** /v1/template/send | Send a document for signature using a Template. |
|
|
135
136
|
| *UserApi* | [**cancelInvitation**](./docs/UserApi.md#cancelinvitation) | **POST** /v1/users/cancelInvitation | Cancel the users invitation. |
|
|
137
|
+
| *UserApi* | [**changeTeam**](./docs/UserApi.md#changeteam) | **PUT** /v1/users/changeTeam | Change users to other team. |
|
|
136
138
|
| *UserApi* | [**createUser**](./docs/UserApi.md#createuser) | **POST** /v1/users/create | Create the user. |
|
|
137
139
|
| *UserApi* | [**getUser**](./docs/UserApi.md#getuser) | **GET** /v1/users/get | Get summary of the user. |
|
|
138
140
|
| *UserApi* | [**listUsers**](./docs/UserApi.md#listusers) | **GET** /v1/users/list | List user documents. |
|
|
@@ -159,6 +161,7 @@ All URIs are relative to *https://api.boldsign.com*
|
|
|
159
161
|
- [BrandingMessage](./docs/BrandingMessage.md)
|
|
160
162
|
- [BrandingRecords](./docs/BrandingRecords.md)
|
|
161
163
|
- [ChangeRecipient](./docs/ChangeRecipient.md)
|
|
164
|
+
- [ChangeTeamRequest](./docs/ChangeTeamRequest.md)
|
|
162
165
|
- [CollaborationSettings](./docs/CollaborationSettings.md)
|
|
163
166
|
- [ConditionalRule](./docs/ConditionalRule.md)
|
|
164
167
|
- [ContactCreated](./docs/ContactCreated.md)
|
package/api/apis.ts
CHANGED
|
@@ -24,7 +24,7 @@ export const queryParamsSerializer = (params) => {
|
|
|
24
24
|
return Qs.stringify(params, { arrayFormat: 'repeat' })
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const USER_AGENT = "boldsign-node-sdk/3.0.
|
|
27
|
+
export const USER_AGENT = "boldsign-node-sdk/3.0.1";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Generates an object containing form data.
|
package/api/documentApi.ts
CHANGED
|
@@ -1498,6 +1498,117 @@ export class DocumentApi {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
|
|
1500
1500
|
|
|
1501
|
+
reject(error);
|
|
1502
|
+
});
|
|
1503
|
+
});
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
*
|
|
1508
|
+
* @summary Sends a draft-status document out for signature.
|
|
1509
|
+
* @param documentId The ID of the document to be sent.
|
|
1510
|
+
* @param options
|
|
1511
|
+
*/
|
|
1512
|
+
public async draftSend (documentId: string, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
1513
|
+
const localVarPath = this.basePath + '/v1/document/draftSend';
|
|
1514
|
+
let localVarQueryParameters: any = {};
|
|
1515
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1516
|
+
const produces = ['application/json'];
|
|
1517
|
+
// give precedence to 'application/json'
|
|
1518
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1519
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
1520
|
+
} else {
|
|
1521
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1522
|
+
}
|
|
1523
|
+
let localVarFormParams: any = {};
|
|
1524
|
+
let localVarBodyParams: any = undefined;
|
|
1525
|
+
|
|
1526
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1527
|
+
if (documentId === null || documentId === undefined) {
|
|
1528
|
+
throw new Error('Required parameter documentId was null or undefined when calling draftSend.');
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
if (documentId !== undefined) {
|
|
1532
|
+
localVarQueryParameters['documentId'] = ObjectSerializer.serialize(documentId, "string");
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1536
|
+
|
|
1537
|
+
let localVarUseFormData = false;
|
|
1538
|
+
|
|
1539
|
+
let data = {};
|
|
1540
|
+
if (localVarUseFormData) {
|
|
1541
|
+
const formData = toFormData(localVarFormParams);
|
|
1542
|
+
data = formData;
|
|
1543
|
+
localVarHeaderParams = {
|
|
1544
|
+
...localVarHeaderParams,
|
|
1545
|
+
...formData.getHeaders(),
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
1550
|
+
method: 'POST',
|
|
1551
|
+
params: localVarQueryParameters,
|
|
1552
|
+
headers: localVarHeaderParams,
|
|
1553
|
+
url: localVarPath,
|
|
1554
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
1555
|
+
maxContentLength: Infinity,
|
|
1556
|
+
maxBodyLength: Infinity,
|
|
1557
|
+
responseType: "json",
|
|
1558
|
+
};
|
|
1559
|
+
|
|
1560
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1561
|
+
localVarRequestOptions.data = data;
|
|
1562
|
+
}
|
|
1563
|
+
let authenticationPromise = Promise.resolve();
|
|
1564
|
+
|
|
1565
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1566
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1567
|
+
}
|
|
1568
|
+
if (this.authentications["Bearer"].apiKey) {
|
|
1569
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
|
|
1570
|
+
}
|
|
1571
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1572
|
+
|
|
1573
|
+
let interceptorPromise = authenticationPromise;
|
|
1574
|
+
for (const interceptor of this.interceptors) {
|
|
1575
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
return interceptorPromise.then(() => {
|
|
1579
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
1580
|
+
axios.request(localVarRequestOptions)
|
|
1581
|
+
.then((response) => {
|
|
1582
|
+
handleSuccessfulResponse(
|
|
1583
|
+
resolve,
|
|
1584
|
+
reject,
|
|
1585
|
+
response,
|
|
1586
|
+
|
|
1587
|
+
);
|
|
1588
|
+
}, (error: AxiosError) => {
|
|
1589
|
+
if (error.response == null) {
|
|
1590
|
+
reject(error);
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
if (handleErrorCodeResponse(
|
|
1595
|
+
reject,
|
|
1596
|
+
error.response,
|
|
1597
|
+
401,
|
|
1598
|
+
"ErrorResult",
|
|
1599
|
+
)) {
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
if (handleErrorCodeResponse(
|
|
1603
|
+
reject,
|
|
1604
|
+
error.response,
|
|
1605
|
+
403,
|
|
1606
|
+
"ErrorResult",
|
|
1607
|
+
)) {
|
|
1608
|
+
return;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
|
|
1501
1612
|
reject(error);
|
|
1502
1613
|
});
|
|
1503
1614
|
});
|
package/api/userApi.ts
CHANGED
|
@@ -15,7 +15,7 @@ import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
|
15
15
|
import {
|
|
16
16
|
ObjectSerializer, Authentication, VoidAuth, Interceptor,
|
|
17
17
|
HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, RequestFile,
|
|
18
|
-
CreateUser,ErrorResult,UpdateUser,UpdateUserMetaData,UserProperties,UserRecords,
|
|
18
|
+
ChangeTeamRequest,CreateUser,ErrorResult,UpdateUser,UpdateUserMetaData,UserProperties,UserRecords,
|
|
19
19
|
} from '../model';
|
|
20
20
|
|
|
21
21
|
import {
|
|
@@ -197,6 +197,127 @@ export class UserApi {
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
|
|
200
|
+
reject(error);
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @summary Change users to other team.
|
|
208
|
+
* @param userId user Id.
|
|
209
|
+
* @param changeTeamRequest Change team request.
|
|
210
|
+
* @param options
|
|
211
|
+
*/
|
|
212
|
+
public async changeTeam (userId: string, changeTeamRequest?: ChangeTeamRequest, options: optionsI = {headers: {}}) : Promise<returnTypeI> {
|
|
213
|
+
changeTeamRequest = deserializeIfNeeded(changeTeamRequest, "ChangeTeamRequest");
|
|
214
|
+
const localVarPath = this.basePath + '/v1/users/changeTeam';
|
|
215
|
+
let localVarQueryParameters: any = {};
|
|
216
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
217
|
+
const produces = ['application/json'];
|
|
218
|
+
// give precedence to 'application/json'
|
|
219
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
220
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
221
|
+
} else {
|
|
222
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
223
|
+
}
|
|
224
|
+
let localVarFormParams: any = {};
|
|
225
|
+
let localVarBodyParams: any = undefined;
|
|
226
|
+
|
|
227
|
+
// verify required parameter 'userId' is not null or undefined
|
|
228
|
+
if (userId === null || userId === undefined) {
|
|
229
|
+
throw new Error('Required parameter userId was null or undefined when calling changeTeam.');
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (userId !== undefined) {
|
|
233
|
+
localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string");
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
237
|
+
|
|
238
|
+
let localVarUseFormData = false;
|
|
239
|
+
|
|
240
|
+
const result = generateFormData(changeTeamRequest, ChangeTeamRequest);
|
|
241
|
+
localVarUseFormData = result.localVarUseFormData;
|
|
242
|
+
|
|
243
|
+
let data = {};
|
|
244
|
+
if (localVarUseFormData) {
|
|
245
|
+
const formData = toFormData(result.data);
|
|
246
|
+
data = formData;
|
|
247
|
+
localVarHeaderParams = {
|
|
248
|
+
...localVarHeaderParams,
|
|
249
|
+
...formData.getHeaders(),
|
|
250
|
+
};
|
|
251
|
+
} else {
|
|
252
|
+
data = ObjectSerializer.serialize(
|
|
253
|
+
changeTeamRequest,
|
|
254
|
+
"ChangeTeamRequest"
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
let localVarRequestOptions: AxiosRequestConfig = {
|
|
259
|
+
method: 'PUT',
|
|
260
|
+
params: localVarQueryParameters,
|
|
261
|
+
headers: localVarHeaderParams,
|
|
262
|
+
url: localVarPath,
|
|
263
|
+
paramsSerializer: this._useQuerystring ? queryParamsSerializer : undefined,
|
|
264
|
+
maxContentLength: Infinity,
|
|
265
|
+
maxBodyLength: Infinity,
|
|
266
|
+
responseType: "json",
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
270
|
+
localVarRequestOptions.data = data;
|
|
271
|
+
}
|
|
272
|
+
let authenticationPromise = Promise.resolve();
|
|
273
|
+
|
|
274
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
275
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
276
|
+
}
|
|
277
|
+
if (this.authentications["Bearer"].apiKey) {
|
|
278
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
|
|
279
|
+
}
|
|
280
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
281
|
+
|
|
282
|
+
let interceptorPromise = authenticationPromise;
|
|
283
|
+
for (const interceptor of this.interceptors) {
|
|
284
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return interceptorPromise.then(() => {
|
|
288
|
+
return new Promise<returnTypeI>((resolve, reject) => {
|
|
289
|
+
axios.request(localVarRequestOptions)
|
|
290
|
+
.then((response) => {
|
|
291
|
+
handleSuccessfulResponse(
|
|
292
|
+
resolve,
|
|
293
|
+
reject,
|
|
294
|
+
response,
|
|
295
|
+
|
|
296
|
+
);
|
|
297
|
+
}, (error: AxiosError) => {
|
|
298
|
+
if (error.response == null) {
|
|
299
|
+
reject(error);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (handleErrorCodeResponse(
|
|
304
|
+
reject,
|
|
305
|
+
error.response,
|
|
306
|
+
401,
|
|
307
|
+
"ErrorResult",
|
|
308
|
+
)) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (handleErrorCodeResponse(
|
|
312
|
+
reject,
|
|
313
|
+
error.response,
|
|
314
|
+
403,
|
|
315
|
+
"ErrorResult",
|
|
316
|
+
)) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
|
|
200
321
|
reject(error);
|
|
201
322
|
});
|
|
202
323
|
});
|
|
Binary file
|
package/dist/api/apis.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface returnTypeI {
|
|
|
21
21
|
body?: any;
|
|
22
22
|
}
|
|
23
23
|
export declare const queryParamsSerializer: (params: any) => any;
|
|
24
|
-
export declare const USER_AGENT = "boldsign-node-sdk/3.0.
|
|
24
|
+
export declare const USER_AGENT = "boldsign-node-sdk/3.0.1";
|
|
25
25
|
export declare const generateFormData: (obj: any, typemap: any) => {
|
|
26
26
|
localVarUseFormData: boolean;
|
|
27
27
|
data: object;
|
package/dist/api/apis.js
CHANGED
|
@@ -18,7 +18,7 @@ const queryParamsSerializer = (params) => {
|
|
|
18
18
|
return Qs.stringify(params, { arrayFormat: 'repeat' });
|
|
19
19
|
};
|
|
20
20
|
exports.queryParamsSerializer = queryParamsSerializer;
|
|
21
|
-
exports.USER_AGENT = "boldsign-node-sdk/3.0.
|
|
21
|
+
exports.USER_AGENT = "boldsign-node-sdk/3.0.1";
|
|
22
22
|
const generateFormData = (obj, typemap) => {
|
|
23
23
|
var _a;
|
|
24
24
|
const data = {};
|
|
@@ -31,6 +31,7 @@ export declare class DocumentApi {
|
|
|
31
31
|
downloadAttachment(documentId: string, attachmentId: string, onBehalfOf?: string, options?: optionsI): Promise<Buffer>;
|
|
32
32
|
downloadAuditLog(documentId: string, onBehalfOf?: string, options?: optionsI): Promise<Buffer>;
|
|
33
33
|
downloadDocument(documentId: string, onBehalfOf?: string, options?: optionsI): Promise<Buffer>;
|
|
34
|
+
draftSend(documentId: string, options?: optionsI): Promise<returnTypeI>;
|
|
34
35
|
extendExpiry(documentId: string, extendExpiry?: ExtendExpiry, options?: optionsI): Promise<returnTypeI>;
|
|
35
36
|
getProperties(documentId: string, options?: optionsI): Promise<DocumentProperties>;
|
|
36
37
|
getEmbeddedSignLink(documentId: string, signerEmail?: string, countryCode?: string, phoneNumber?: string, signLinkValidTill?: Date, redirectUrl?: string, options?: optionsI): Promise<EmbeddedSigningLink>;
|
package/dist/api/documentApi.js
CHANGED
|
@@ -986,6 +986,81 @@ class DocumentApi {
|
|
|
986
986
|
});
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
|
+
draftSend(documentId_1) {
|
|
990
|
+
return __awaiter(this, arguments, void 0, function* (documentId, options = { headers: {} }) {
|
|
991
|
+
const localVarPath = this.basePath + '/v1/document/draftSend';
|
|
992
|
+
let localVarQueryParameters = {};
|
|
993
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
994
|
+
const produces = ['application/json'];
|
|
995
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
996
|
+
localVarHeaderParams['content-type'] = 'application/json';
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
localVarHeaderParams['content-type'] = produces.join(',');
|
|
1000
|
+
}
|
|
1001
|
+
let localVarFormParams = {};
|
|
1002
|
+
let localVarBodyParams = undefined;
|
|
1003
|
+
if (documentId === null || documentId === undefined) {
|
|
1004
|
+
throw new Error('Required parameter documentId was null or undefined when calling draftSend.');
|
|
1005
|
+
}
|
|
1006
|
+
if (documentId !== undefined) {
|
|
1007
|
+
localVarQueryParameters['documentId'] = model_1.ObjectSerializer.serialize(documentId, "string");
|
|
1008
|
+
}
|
|
1009
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1010
|
+
let localVarUseFormData = false;
|
|
1011
|
+
let data = {};
|
|
1012
|
+
if (localVarUseFormData) {
|
|
1013
|
+
const formData = (0, _1.toFormData)(localVarFormParams);
|
|
1014
|
+
data = formData;
|
|
1015
|
+
localVarHeaderParams = Object.assign(Object.assign({}, localVarHeaderParams), formData.getHeaders());
|
|
1016
|
+
}
|
|
1017
|
+
let localVarRequestOptions = {
|
|
1018
|
+
method: 'POST',
|
|
1019
|
+
params: localVarQueryParameters,
|
|
1020
|
+
headers: localVarHeaderParams,
|
|
1021
|
+
url: localVarPath,
|
|
1022
|
+
paramsSerializer: this._useQuerystring ? _1.queryParamsSerializer : undefined,
|
|
1023
|
+
maxContentLength: Infinity,
|
|
1024
|
+
maxBodyLength: Infinity,
|
|
1025
|
+
responseType: "json",
|
|
1026
|
+
};
|
|
1027
|
+
if (localVarRequestOptions.method !== 'GET') {
|
|
1028
|
+
localVarRequestOptions.data = data;
|
|
1029
|
+
}
|
|
1030
|
+
let authenticationPromise = Promise.resolve();
|
|
1031
|
+
if (this.authentications["X-API-KEY"].apiKey) {
|
|
1032
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["X-API-KEY"].applyToRequest(localVarRequestOptions));
|
|
1033
|
+
}
|
|
1034
|
+
if (this.authentications["Bearer"].apiKey) {
|
|
1035
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications["Bearer"].applyToRequest(localVarRequestOptions));
|
|
1036
|
+
}
|
|
1037
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1038
|
+
let interceptorPromise = authenticationPromise;
|
|
1039
|
+
for (const interceptor of this.interceptors) {
|
|
1040
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1041
|
+
}
|
|
1042
|
+
return interceptorPromise.then(() => {
|
|
1043
|
+
return new Promise((resolve, reject) => {
|
|
1044
|
+
axios_1.default.request(localVarRequestOptions)
|
|
1045
|
+
.then((response) => {
|
|
1046
|
+
handleSuccessfulResponse(resolve, reject, response);
|
|
1047
|
+
}, (error) => {
|
|
1048
|
+
if (error.response == null) {
|
|
1049
|
+
reject(error);
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
if (handleErrorCodeResponse(reject, error.response, 401, "ErrorResult")) {
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
if (handleErrorCodeResponse(reject, error.response, 403, "ErrorResult")) {
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
reject(error);
|
|
1059
|
+
});
|
|
1060
|
+
});
|
|
1061
|
+
});
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
989
1064
|
extendExpiry(documentId_1, extendExpiry_1) {
|
|
990
1065
|
return __awaiter(this, arguments, void 0, function* (documentId, extendExpiry, options = { headers: {} }) {
|
|
991
1066
|
extendExpiry = deserializeIfNeeded(extendExpiry, "ExtendExpiry");
|