Skip to content

Commit

Permalink
feat: Sign request group (#870)
Browse files Browse the repository at this point in the history
* Update package-lock

* feat: Sign request signer group ID

* Update test

* Add integration test
  • Loading branch information
congminh1254 authored Jan 9, 2024
1 parent 22384ab commit 11bf5d2
Show file tree
Hide file tree
Showing 22 changed files with 282 additions and 49 deletions.
6 changes: 3 additions & 3 deletions src/managers/shield-information-barrier-reports.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ class ShieldInformationBarrierReportsManager {
/**
* List shield information barrier reports
*
* Lists shield information barrier reports with specific IDs.
* Lists shield information barrier reports.
* @param {object} options Options for the request
* @param {string} options.shield_information_barrier_id The ID of the shield information barrier.
* @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`.
* @param {number} [options.limit] The maximum number of items to return per page.
* @param {Function} [callback] Passed the result if successful, error otherwise
* @returns {Promise<object>} A promise resolving to the result or rejecting with an error
* @returns {Promise<schemas.ShieldInformationBarrierReports>} A promise resolving to the result or rejecting with an error
*/
getAll(
options: {
Expand All @@ -76,7 +76,7 @@ class ShieldInformationBarrierReportsManager {
readonly limit?: number;
},
callback?: Function
): Promise<object> {
): Promise<schemas.ShieldInformationBarrierReports> {
const { ...queryParams } = options,
apiPath = urlPath('shield_information_barrier_reports'),
params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ShieldInformationBarrierSegmentMembersManager {
* @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`.
* @param {number} [options.limit] The maximum number of items to return per page.
* @param {Function} [callback] Passed the result if successful, error otherwise
* @returns {Promise<object>} A promise resolving to the result or rejecting with an error
* @returns {Promise<schemas.ShieldInformationBarrierSegmentMembers>} A promise resolving to the result or rejecting with an error
*/
getAll(
options: {
Expand All @@ -79,7 +79,7 @@ class ShieldInformationBarrierSegmentMembersManager {
readonly limit?: number;
},
callback?: Function
): Promise<object> {
): Promise<schemas.ShieldInformationBarrierSegmentMembers> {
const { ...queryParams } = options,
apiPath = urlPath('shield_information_barrier_segment_members'),
params = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ShieldInformationBarrierSegmentRestrictionsManager {
* @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`.
* @param {number} [options.limit] The maximum number of items to return per page.
* @param {Function} [callback] Passed the result if successful, error otherwise
* @returns {Promise<object>} A promise resolving to the result or rejecting with an error
* @returns {Promise<schemas.ShieldInformationBarrierSegmentRestrictions>} A promise resolving to the result or rejecting with an error
*/
getAll(
options: {
Expand All @@ -79,7 +79,7 @@ class ShieldInformationBarrierSegmentRestrictionsManager {
readonly limit?: number;
},
callback?: Function
): Promise<object> {
): Promise<schemas.ShieldInformationBarrierSegmentRestrictions> {
const { ...queryParams } = options,
apiPath = urlPath('shield_information_barrier_segment_restrictions'),
params = {
Expand Down
4 changes: 2 additions & 2 deletions src/managers/shield-information-barrier-segments.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ShieldInformationBarrierSegmentsManager {
* @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`.
* @param {number} [options.limit] The maximum number of items to return per page.
* @param {Function} [callback] Passed the result if successful, error otherwise
* @returns {Promise<object>} A promise resolving to the result or rejecting with an error
* @returns {Promise<schemas.ShieldInformationBarrierSegments>} A promise resolving to the result or rejecting with an error
*/
getAll(
options: {
Expand All @@ -78,7 +78,7 @@ class ShieldInformationBarrierSegmentsManager {
readonly limit?: number;
},
callback?: Function
): Promise<object> {
): Promise<schemas.ShieldInformationBarrierSegments> {
const { ...queryParams } = options,
apiPath = urlPath('shield_information_barrier_segments'),
params = {
Expand Down
24 changes: 15 additions & 9 deletions src/managers/shield-information-barriers.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ShieldInformationBarrierManager {
/**
* Get shield information barrier with specified ID
*
* Get shield information barrier based on provided ID..
* Get shield information barrier based on provided ID.
* @param {object} options Options for the request
* @param {string} options.shield_information_barrier_id The ID of the shield information barrier.
* @param {Function} [callback] Passed the result if successful, error otherwise
Expand Down Expand Up @@ -52,18 +52,16 @@ class ShieldInformationBarrierManager {
* Retrieves a list of shield information barrier objects
* for the enterprise of JWT.
* @param {object} [options] Options for the request
* @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`.
* @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.
* @param {number} [options.limit] The maximum number of items to return per page.
* @param {Function} [callback] Passed the result if successful, error otherwise
* @returns {Promise<object>} A promise resolving to the result or rejecting with an error
* @returns {Promise<schemas.ShieldInformationBarriers>} A promise resolving to the result or rejecting with an error
*/
getAll(
options?: {
/**
* Defines the position marker at which to begin returning results. This is
* used when paginating using marker-based pagination.
*
* This requires `usemarker` to be set to `true`.
*/
readonly marker?: string;
/**
Expand All @@ -72,7 +70,7 @@ class ShieldInformationBarrierManager {
readonly limit?: number;
},
callback?: Function
): Promise<object> {
): Promise<schemas.ShieldInformationBarriers> {
const { ...queryParams } = options,
apiPath = urlPath('shield_information_barriers'),
params = {
Expand All @@ -90,13 +88,18 @@ class ShieldInformationBarrierManager {
* Creates a shield information barrier to
* separate individuals/groups within the same
* firm and prevents confidential information passing between them.
* @param {schemas.ShieldInformationBarrier} body
* @param {object} body
* @param {object} [options] Options for the request
* @param {Function} [callback] Passed the result if successful, error otherwise
* @returns {Promise<schemas.ShieldInformationBarrier>} A promise resolving to the result or rejecting with an error
*/
create(
body: schemas.ShieldInformationBarrier,
body: {
enterprise: {
type: string;
id: string;
};
},
options?: {},
callback?: Function
): Promise<schemas.ShieldInformationBarrier> {
Expand All @@ -122,7 +125,10 @@ class ShieldInformationBarrierManager {
* @returns {Promise<schemas.ShieldInformationBarrier>} A promise resolving to the result or rejecting with an error
*/
changeStatusById(
body: object,
body: {
id: string;
status: string;
},
options?: {},
callback?: Function
): Promise<schemas.ShieldInformationBarrier> {
Expand Down
10 changes: 5 additions & 5 deletions src/schemas/folder-mini.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import * as schemas from '.';
* nested under another resource.
*/
export interface FolderMini extends schemas.FolderBase {
/**
* The name of the folder.
* Example: Contracts
*/
name?: string;
/**
* A numeric identifier that represents the most recent user event
* that has been applied to this item.
Expand All @@ -28,4 +23,9 @@ export interface FolderMini extends schemas.FolderBase {
* Example: 3
*/
sequence_id?: string;
/**
* The name of the folder.
* Example: Contracts
*/
name?: string;
}
5 changes: 5 additions & 0 deletions src/schemas/index.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ export * from './shield-information-barrier-reference.generated';
export * from './shield-information-barrier-report-base.generated';
export * from './shield-information-barrier-report-details.generated';
export * from './shield-information-barrier-report.generated';
export * from './shield-information-barrier-reports.generated';
export * from './shield-information-barrier-segment-member-base.generated';
export * from './shield-information-barrier-segment-member-mini.generated';
export * from './shield-information-barrier-segment-member.generated';
export * from './shield-information-barrier-segment-members.generated';
export * from './shield-information-barrier-segment-restriction-base.generated';
export * from './shield-information-barrier-segment-restriction-mini.generated';
export * from './shield-information-barrier-segment-restriction.generated';
export * from './shield-information-barrier-segment-restrictions.generated';
export * from './shield-information-barrier-segment.generated';
export * from './shield-information-barrier-segments.generated';
export * from './shield-information-barrier.generated';
export * from './shield-information-barriers.generated';
export * from './sign-request-base.generated';
export * from './sign-request-create-request.generated';
export * from './sign-request-create-signer.generated';
Expand Down
26 changes: 26 additions & 0 deletions src/schemas/shield-information-barrier-reports.generated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as schemas from '.';
/**
* List of Shield Information Barrier Reports
*
* The part of an API response that describes marker
* based pagination
*/
export interface ShieldInformationBarrierReports {
/**
* The limit that was used for these entries. This will be the same as the
* `limit` query parameter unless that value exceeded the maximum value
* allowed. The maximum value varies by API.
* Example: 1000
*/
limit?: number;
/**
* The marker for the start of the next page of results.
* Example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
*/
next_marker?: string;
/**
* A list of shield information
* barrier reports.
*/
entries?: schemas.ShieldInformationBarrierReport[];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as schemas from '.';
/**
* List of Shield Information Barrier Segment Members
*
* The part of an API response that describes marker
* based pagination
*/
export interface ShieldInformationBarrierSegmentMembers {
/**
* The limit that was used for these entries. This will be the same as the
* `limit` query parameter unless that value exceeded the maximum value
* allowed. The maximum value varies by API.
* Example: 1000
*/
limit?: number;
/**
* The marker for the start of the next page of results.
* Example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
*/
next_marker?: string;
/**
* A list of shield information
* barrier segment members
*/
entries?: schemas.ShieldInformationBarrierSegmentMember[];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as schemas from '.';
/**
* List of Shield Information Barrier Segment Restrictions
*
* The part of an API response that describes marker
* based pagination
*/
export interface ShieldInformationBarrierSegmentRestrictions {
/**
* The limit that was used for these entries. This will be the same as the
* `limit` query parameter unless that value exceeded the maximum value
* allowed. The maximum value varies by API.
* Example: 1000
*/
limit?: number;
/**
* The marker for the start of the next page of results.
* Example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
*/
next_marker?: string;
/**
* A list of shield information barrier
* segment restriction objects
*/
entries?: schemas.ShieldInformationBarrierSegmentRestriction[];
}
26 changes: 26 additions & 0 deletions src/schemas/shield-information-barrier-segments.generated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as schemas from '.';
/**
* List of Shield Information Barrier Segments
*
* The part of an API response that describes marker
* based pagination
*/
export interface ShieldInformationBarrierSegments {
/**
* The limit that was used for these entries. This will be the same as the
* `limit` query parameter unless that value exceeded the maximum value
* allowed. The maximum value varies by API.
* Example: 1000
*/
limit?: number;
/**
* The marker for the start of the next page of results.
* Example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
*/
next_marker?: string;
/**
* A list of shield information barrier
* segments
*/
entries?: schemas.ShieldInformationBarrierSegment[];
}
25 changes: 25 additions & 0 deletions src/schemas/shield-information-barriers.generated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as schemas from '.';
/**
* List of Shield Information Barriers
*
* The part of an API response that describes marker
* based pagination
*/
export interface ShieldInformationBarriers {
/**
* The limit that was used for these entries. This will be the same as the
* `limit` query parameter unless that value exceeded the maximum value
* allowed. The maximum value varies by API.
* Example: 1000
*/
limit?: number;
/**
* The marker for the start of the next page of results.
* Example: JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
*/
next_marker?: string;
/**
* A list of shield information barrier objects
*/
entries?: schemas.ShieldInformationBarrier[];
}
8 changes: 6 additions & 2 deletions src/schemas/sign-request-create-request.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ export interface SignRequestCreateRequest extends schemas.SignRequestBase {
*/
source_files?: schemas.FileBase[];
/**
* Array of signers for the sign request. 35 is the
* max number of signers permitted.
* Force a specific color for the signature (blue, black, or red)
* Example: blue
*/
signature_color?: 'blue' | 'black' | 'red';
/**
* Array of signers for the sign request. 35 is the max number of signers permitted.
*/
signers: schemas.SignRequestCreateSigner[];
}
12 changes: 10 additions & 2 deletions src/schemas/sign-request-create-signer.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import * as schemas from '.';
*/
export interface SignRequestCreateSigner {
/**
* Email address of the signer
* Email address of the signer.
* The email address of the signer is required when making signature requests, except when using templates that are configured to include emails.
* Example: example@gmail.com
*/
email: string;
email?: string;
/**
* Defines the role of the signer in the sign request. A `signer`
* must sign the document and an `approver` must approve the document. A
Expand Down Expand Up @@ -74,4 +75,11 @@ export interface SignRequestCreateSigner {
* Example: SecretPassword123
*/
password?: string;
/**
* If set, signers who have the same group ID will be assigned to the same input.
* A signer group is expected to have more than one signer. When a group contains fewer than two signers,
* it will be converted to a single signer and the group will be removed.
* Example: cd4ff89-8fc1-42cf-8b29-1890dedd26d7
*/
signer_group_id?: string;
}
2 changes: 1 addition & 1 deletion src/schemas/sign-request-prefill-tag.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface SignRequestPrefillTag {
checkbox_value?: boolean;
/**
* Date prefill value
* Example: 2021-04-26T08:12:13.982Z
* Example: 2021-04-26
*/
date_value?: string;
}
Loading

0 comments on commit 11bf5d2

Please sign in to comment.