@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
385 lines • 16.2 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { AgreementActions, AgreementActions$Outbound } from "./agreementactions.js";
import { AgreementLinks, AgreementLinks$Outbound } from "./agreementlinks.js";
import { CurrencyCode } from "./currencycode.js";
import { CustomProperty, CustomProperty$Outbound } from "./customproperty.js";
import { LinkedData, LinkedData$Outbound } from "./linkeddata.js";
import { Party, Party$Outbound } from "./party.js";
import { ResourceMetadata, ResourceMetadata$Outbound } from "./resourcemetadata.js";
/**
* Terms specifying the payment due date, based on a defined number of days or other conditions.
*/
export declare const PaymentTermsDueDate: {
readonly UnderSevenDays: "UNDER_SEVEN_DAYS";
readonly SevenDays: "SEVEN_DAYS";
readonly FifteenDays: "FIFTEEN_DAYS";
readonly ThirtyDays: "THIRTY_DAYS";
readonly FortyFiveDays: "FORTY_FIVE_DAYS";
readonly SixtyDays: "SIXTY_DAYS";
readonly NinetyDays: "NINETY_DAYS";
readonly OverNinetyDays: "OVER_NINETY_DAYS";
readonly OnReceipt: "ON_RECEIPT";
readonly Other: "OTHER";
readonly Silent: "SILENT";
};
/**
* Terms specifying the payment due date, based on a defined number of days or other conditions.
*/
export type PaymentTermsDueDate = ClosedEnum<typeof PaymentTermsDueDate>;
/**
* "The conditions or rules written in a legal agreement. The set of possible provisions is determined by the agreement type."
*
* @remarks
*/
export type Provisions = {
/**
* The type of assignment rights in the agreement (e.g., transferability)
*/
assignmentType?: string | null | undefined;
/**
* Provisions related to changes in control of the assigning party
*/
assignmentChangeOfControl?: string | null | undefined;
/**
* Provisions for the termination of assignment rights
*/
assignmentTerminationRights?: string | null | undefined;
/**
* A subset of ISO 8601 duration. Fractional or negative values are not supported.
*/
confidentialityObligationPeriod?: string | null | undefined;
/**
* The governing law clause identifies the substantive law that will govern the rights and obligations of the parties to the agreement.
*/
governingLaw?: string | null | undefined;
/**
* A jurisdiction clause expressly sets out which courts or tribunals have the power to hear a dispute which arises under the agreement.
*/
jurisdiction?: string | null | undefined;
/**
* Type of non-disclosure agreement (e.g., unilateral, bilateral).
*/
ndaType?: string | null | undefined;
/**
* Total annual value of the agreement.
*/
annualAgreementValue?: number | null | undefined;
/**
* Currency code (e.g., USD, EUR) for the agreement's annual value.
*/
annualAgreementValueCurrencyCode?: CurrencyCode | null | undefined;
/**
* Total value of the agreement.
*/
totalAgreementValue?: number | null | undefined;
/**
* Currency code (e.g., USD, EUR) for the agreement's total value.
*/
totalAgreementValueCurrencyCode?: CurrencyCode | null | undefined;
/**
* Terms specifying the payment due date, based on a defined number of days or other conditions.
*/
paymentTermsDueDate?: PaymentTermsDueDate | undefined;
/**
* Indicates if late payment fees can be charged.
*/
canChargeLatePaymentFees?: boolean | null | undefined;
/**
* Percentage fee charged on late payments.
*/
latePaymentFeePercent?: number | null | undefined;
/**
* Maximum liability cap in the agreement
*/
liabilityCapFixedAmount?: number | null | undefined;
/**
* Currency code for the liability cap amount.
*/
liabilityCapCurrencyCode?: CurrencyCode | null | undefined;
/**
* Multiplier applied to calculate the liability cap
*/
liabilityCapMultiplier?: number | null | undefined;
/**
* Duration for the liability cap
*/
liabilityCapDuration?: string | null | undefined;
/**
* Maximum allowed percentage increase in prices, limited between 0 and 100.
*/
priceCapPercentIncrease?: number | null | undefined;
/**
* Specifies the type of renewal (e.g., automatic, manual).
*/
renewalType?: string | null | undefined;
/**
* The period of time that a party is required to provide to indicate their intention to renew an agreement.
*/
renewalNoticePeriod?: string | null | undefined;
/**
* ISO 8601 formatted date-time string. May be local (no timezone), UTC (Z suffix), or include an explicit offset (e.g., +05:30, -0800).
*/
renewalNoticeDate?: string | undefined;
/**
* The duration of the auto-renewal period.
*/
autoRenewalTermLength?: string | null | undefined;
/**
* The period an agreement has been extended after it has been renewed.
*/
renewalExtensionPeriod?: string | null | undefined;
/**
* User ID of the person responsible for managing the renewal process
*/
renewalProcessOwner?: string | undefined;
/**
* Additional information related to the renewal process.
*/
renewalAdditionalInfo?: string | null | undefined;
/**
* The specific duration that a party has to give notice before terminating the agreement due to a significant breach or violation of terms.
*
* @remarks
* This period allows the other party to address the cause or prepare for termination.
*/
terminationPeriodForCause?: string | null | undefined;
/**
* Specifies the required notice period that a party must provide before terminating the agreement for convenience, without cause, under the terms outlined in the contract.
*/
terminationPeriodForConvenience?: string | null | undefined;
/**
* ISO 8601 formatted date-time string. May be local (no timezone), UTC (Z suffix), or include an explicit offset (e.g., +05:30, -0800).
*/
effectiveDate?: string | undefined;
/**
* ISO 8601 formatted date-time string. May be local (no timezone), UTC (Z suffix), or include an explicit offset (e.g., +05:30, -0800).
*/
expirationDate?: string | undefined;
/**
* ISO 8601 formatted date-time string. May be local (no timezone), UTC (Z suffix), or include an explicit offset (e.g., +05:30, -0800).
*/
executionDate?: string | undefined;
/**
* Overall duration of the agreement.
*/
termLength?: string | null | undefined;
};
export type RelatedAgreementDocuments = {
/**
* ID of the parent agreement document, if related.
*/
parentAgreementDocumentId?: string | undefined;
};
/**
* The Agreement component represents a comprehensive overview of a contractual document, detailing its unique identifiers, key properties, parties involved,
*
* @remarks
* and specific provisions. It includes general information such as the title, type, status, and important dates like effective and expiration dates.
* The component also incorporates various provisions—legal, financial, lifecycle, and custom—along with metadata, external references, and related documents
* to offer a full representation of the structure and context of an agreement.
*/
export type Agreement = {
id?: string | undefined;
/**
* Title of the agreement document, summarizing its purpose.
*/
title?: string | null | undefined;
/**
* The file name of the agreement.
*/
fileName?: string | null | undefined;
/**
* The id the original agreement document.
*/
documentId?: string | null | undefined;
/**
* The type of agreement.
*/
type?: string | null | undefined;
/**
* Server-defined category based on the agreement type.
*/
category?: string | null | undefined;
/**
* A detailed summary of the agreement's key provisions and scope.
*/
summary?: string | null | undefined;
/**
* Current status of the agreement (e.g., PENDING, COMPLETE, INACTIVE)
*/
status?: string | null | undefined;
/**
* The review status of the agreement, indicating whether it has been complete or pending.
*/
reviewStatus?: string | null | undefined;
/**
* The date when the agreement extraction review was completed.
*/
reviewCompletedAt?: Date | null | undefined;
/**
* A list of parties involved in the agreement.
*/
parties?: Array<Party> | null | undefined;
/**
* "The conditions or rules written in a legal agreement. The set of possible provisions is determined by the agreement type."
*
* @remarks
*/
provisions?: Provisions | null | undefined;
/**
* A generic map/dict. The key is a string, and the value can be of any type, including strings, booleans, numbers, arrays, or objects
*/
customProvisions?: {
[k: string]: CustomProperty;
} | null | undefined;
/**
* A generic map/dict. The key is a string, and the value can be of any type, including strings, booleans, numbers, arrays, or objects
*/
additionalUserDefinedData?: {
[k: string]: CustomProperty;
} | null | undefined;
/**
* A generic map/dict. The key is a string, and the value can be of any type, including strings, booleans, numbers, arrays, or objects
*/
additionalCustomClmData?: {
[k: string]: CustomProperty;
} | null | undefined;
/**
* A generic map/dict. The key is a string, and the value can be of any type, including strings, booleans, numbers, arrays, or objects
*/
additionalCustomEsignData?: {
[k: string]: CustomProperty;
} | null | undefined;
relatedAgreementDocuments?: RelatedAgreementDocuments | undefined;
/**
* List of languages applicable to the agreement, identified using BCP-47 language codes.
*/
languages?: Array<string | null> | null | undefined;
/**
* The name of the source system which created this agreement, e.g. eSign, CLM, or Salesforce.
*/
sourceName?: string | null | undefined;
/**
* The ID of the entity in the source system that this entity is associated with. For example, it could be an ID of the envelope in eSign.
*/
sourceId?: string | null | undefined;
/**
* The Account ID of the source system who creates this entity, e.g. eSign Account ID
*/
sourceAccountId?: string | null | undefined;
linkedData?: Array<LinkedData> | undefined;
metadata?: ResourceMetadata | undefined;
/**
* Hypermedia controls (HATEOAS) for agreement specific links to resources.
*
* @remarks
*/
links?: AgreementLinks | null | undefined;
/**
* Available actions on the agreement. Actions are conditionally present based on the current state of the resource.
*
* @remarks
*/
actions?: AgreementActions | null | undefined;
};
/** @internal */
export declare const PaymentTermsDueDate$inboundSchema: z.ZodNativeEnum<typeof PaymentTermsDueDate>;
/** @internal */
export declare const PaymentTermsDueDate$outboundSchema: z.ZodNativeEnum<typeof PaymentTermsDueDate>;
/** @internal */
export declare const Provisions$inboundSchema: z.ZodType<Provisions, z.ZodTypeDef, unknown>;
/** @internal */
export type Provisions$Outbound = {
assignment_type?: string | null | undefined;
assignment_change_of_control?: string | null | undefined;
assignment_termination_rights?: string | null | undefined;
confidentiality_obligation_period?: string | null | undefined;
governing_law?: string | null | undefined;
jurisdiction?: string | null | undefined;
nda_type?: string | null | undefined;
annual_agreement_value?: number | null | undefined;
annual_agreement_value_currency_code?: string | null | undefined;
total_agreement_value?: number | null | undefined;
total_agreement_value_currency_code?: string | null | undefined;
payment_terms_due_date: string;
can_charge_late_payment_fees?: boolean | null | undefined;
late_payment_fee_percent?: number | null | undefined;
liability_cap_fixed_amount?: number | null | undefined;
liability_cap_currency_code?: string | null | undefined;
liability_cap_multiplier?: number | null | undefined;
liability_cap_duration?: string | null | undefined;
price_cap_percent_increase?: number | null | undefined;
renewal_type?: string | null | undefined;
renewal_notice_period?: string | null | undefined;
renewal_notice_date?: string | undefined;
auto_renewal_term_length?: string | null | undefined;
renewal_extension_period?: string | null | undefined;
renewal_process_owner?: string | undefined;
renewal_additional_info?: string | null | undefined;
termination_period_for_cause?: string | null | undefined;
termination_period_for_convenience?: string | null | undefined;
effective_date?: string | undefined;
expiration_date?: string | undefined;
execution_date?: string | undefined;
term_length?: string | null | undefined;
};
/** @internal */
export declare const Provisions$outboundSchema: z.ZodType<Provisions$Outbound, z.ZodTypeDef, Provisions>;
export declare function provisionsToJSON(provisions: Provisions): string;
export declare function provisionsFromJSON(jsonString: string): SafeParseResult<Provisions, SDKValidationError>;
/** @internal */
export declare const RelatedAgreementDocuments$inboundSchema: z.ZodType<RelatedAgreementDocuments, z.ZodTypeDef, unknown>;
/** @internal */
export type RelatedAgreementDocuments$Outbound = {
parent_agreement_document_id: string;
};
/** @internal */
export declare const RelatedAgreementDocuments$outboundSchema: z.ZodType<RelatedAgreementDocuments$Outbound, z.ZodTypeDef, RelatedAgreementDocuments>;
export declare function relatedAgreementDocumentsToJSON(relatedAgreementDocuments: RelatedAgreementDocuments): string;
export declare function relatedAgreementDocumentsFromJSON(jsonString: string): SafeParseResult<RelatedAgreementDocuments, SDKValidationError>;
/** @internal */
export declare const Agreement$inboundSchema: z.ZodType<Agreement, z.ZodTypeDef, unknown>;
/** @internal */
export type Agreement$Outbound = {
id: string;
title?: string | null | undefined;
file_name?: string | null | undefined;
document_id?: string | null | undefined;
type?: string | null | undefined;
category?: string | null | undefined;
summary?: string | null | undefined;
status?: string | null | undefined;
review_status?: string | null | undefined;
review_completed_at?: string | null | undefined;
parties?: Array<Party$Outbound> | null | undefined;
provisions?: Provisions$Outbound | null | undefined;
custom_provisions?: {
[k: string]: CustomProperty$Outbound;
} | null | undefined;
additional_user_defined_data?: {
[k: string]: CustomProperty$Outbound;
} | null | undefined;
additional_custom_clm_data?: {
[k: string]: CustomProperty$Outbound;
} | null | undefined;
additional_custom_esign_data?: {
[k: string]: CustomProperty$Outbound;
} | null | undefined;
related_agreement_documents?: RelatedAgreementDocuments$Outbound | undefined;
languages?: Array<string | null> | null | undefined;
source_name?: string | null | undefined;
source_id?: string | null | undefined;
source_account_id?: string | null | undefined;
linked_data?: Array<LinkedData$Outbound> | undefined;
metadata?: ResourceMetadata$Outbound | undefined;
_links?: AgreementLinks$Outbound | null | undefined;
_actions?: AgreementActions$Outbound | null | undefined;
};
/** @internal */
export declare const Agreement$outboundSchema: z.ZodType<Agreement$Outbound, z.ZodTypeDef, Agreement>;
export declare function agreementToJSON(agreement: Agreement): string;
export declare function agreementFromJSON(jsonString: string): SafeParseResult<Agreement, SDKValidationError>;
//# sourceMappingURL=agreement.d.ts.map