UNPKG

@docusign/iam-sdk

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.

370 lines 19.8 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.Agreement$ = exports.Agreement$outboundSchema = exports.Agreement$inboundSchema = exports.RelatedAgreementDocuments$ = exports.RelatedAgreementDocuments$outboundSchema = exports.RelatedAgreementDocuments$inboundSchema = exports.Provisions$ = exports.Provisions$outboundSchema = exports.Provisions$inboundSchema = exports.PaymentTermsDueDate$ = exports.PaymentTermsDueDate$outboundSchema = exports.PaymentTermsDueDate$inboundSchema = exports.PaymentTermsDueDate = void 0; exports.provisionsToJSON = provisionsToJSON; exports.provisionsFromJSON = provisionsFromJSON; exports.relatedAgreementDocumentsToJSON = relatedAgreementDocumentsToJSON; exports.relatedAgreementDocumentsFromJSON = relatedAgreementDocumentsFromJSON; exports.agreementToJSON = agreementToJSON; exports.agreementFromJSON = agreementFromJSON; const z = __importStar(require("zod")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); const rfcdate_js_1 = require("../../types/rfcdate.js"); const currencycode_js_1 = require("./currencycode.js"); const customproperty_js_1 = require("./customproperty.js"); const party_js_1 = require("./party.js"); const resourcemetadata_js_1 = require("./resourcemetadata.js"); /** * Terms specifying the payment due date, based on a defined number of days or other conditions. */ exports.PaymentTermsDueDate = { UnderSevenDays: "UNDER_SEVEN_DAYS", SevenDays: "SEVEN_DAYS", FifteenDays: "FIFTEEN_DAYS", ThirtyDays: "THIRTY_DAYS", FortyFiveDays: "FORTY_FIVE_DAYS", SixtyDays: "SIXTY_DAYS", NinetyDays: "NINETY_DAYS", OverNinetyDays: "OVER_NINETY_DAYS", OnReceipt: "ON_RECEIPT", Other: "OTHER", Silent: "SILENT", }; /** @internal */ exports.PaymentTermsDueDate$inboundSchema = z.nativeEnum(exports.PaymentTermsDueDate); /** @internal */ exports.PaymentTermsDueDate$outboundSchema = exports.PaymentTermsDueDate$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var PaymentTermsDueDate$; (function (PaymentTermsDueDate$) { /** @deprecated use `PaymentTermsDueDate$inboundSchema` instead. */ PaymentTermsDueDate$.inboundSchema = exports.PaymentTermsDueDate$inboundSchema; /** @deprecated use `PaymentTermsDueDate$outboundSchema` instead. */ PaymentTermsDueDate$.outboundSchema = exports.PaymentTermsDueDate$outboundSchema; })(PaymentTermsDueDate$ || (exports.PaymentTermsDueDate$ = PaymentTermsDueDate$ = {})); /** @internal */ exports.Provisions$inboundSchema = z.object({ assignment_type: z.string().optional(), assignment_change_of_control: z.string().optional(), assignment_termination_rights: z.string().optional(), confidentiality_obligation_period: z.nullable(z.string()).optional(), governing_law: z.nullable(z.string()).optional(), jurisdiction: z.nullable(z.string()).optional(), nda_type: z.nullable(z.string()).optional(), annual_agreement_value: z.nullable(z.number()).optional(), annual_agreement_value_currency_code: z.nullable(currencycode_js_1.CurrencyCode$inboundSchema) .optional(), total_agreement_value: z.nullable(z.number()).optional(), total_agreement_value_currency_code: z.nullable(currencycode_js_1.CurrencyCode$inboundSchema) .optional(), payment_terms_due_date: exports.PaymentTermsDueDate$inboundSchema.default("OTHER"), can_charge_late_payment_fees: z.nullable(z.boolean()).optional(), late_payment_fee_percent: z.nullable(z.number().int()).optional(), liability_cap_fixed_amount: z.nullable(z.number()).optional(), liability_cap_currency_code: z.nullable(currencycode_js_1.CurrencyCode$inboundSchema) .optional(), liability_cap_multiplier: z.nullable(z.number()).optional(), liability_cap_duration: z.nullable(z.string()).optional(), price_cap_percent_increase: z.nullable(z.number()).optional(), renewal_type: z.nullable(z.string()).optional(), renewal_notice_period: z.nullable(z.string()).optional(), renewal_notice_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(), auto_renewal_term_length: z.nullable(z.string()).optional(), renewal_extension_period: z.nullable(z.string()).optional(), renewal_process_owner: z.nullable(z.string()).optional(), renewal_additional_info: z.nullable(z.string()).optional(), termination_period_for_cause: z.nullable(z.string()).optional(), termination_period_for_convenience: z.nullable(z.string()).optional(), effective_date: z.nullable(z.string().transform(v => new rfcdate_js_1.RFCDate(v))) .optional(), expiration_date: z.nullable(z.string().transform(v => new rfcdate_js_1.RFCDate(v))) .optional(), execution_date: z.nullable(z.string().transform(v => new rfcdate_js_1.RFCDate(v))) .optional(), term_length: z.nullable(z.string()).optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "assignment_type": "assignmentType", "assignment_change_of_control": "assignmentChangeOfControl", "assignment_termination_rights": "assignmentTerminationRights", "confidentiality_obligation_period": "confidentialityObligationPeriod", "governing_law": "governingLaw", "nda_type": "ndaType", "annual_agreement_value": "annualAgreementValue", "annual_agreement_value_currency_code": "annualAgreementValueCurrencyCode", "total_agreement_value": "totalAgreementValue", "total_agreement_value_currency_code": "totalAgreementValueCurrencyCode", "payment_terms_due_date": "paymentTermsDueDate", "can_charge_late_payment_fees": "canChargeLatePaymentFees", "late_payment_fee_percent": "latePaymentFeePercent", "liability_cap_fixed_amount": "liabilityCapFixedAmount", "liability_cap_currency_code": "liabilityCapCurrencyCode", "liability_cap_multiplier": "liabilityCapMultiplier", "liability_cap_duration": "liabilityCapDuration", "price_cap_percent_increase": "priceCapPercentIncrease", "renewal_type": "renewalType", "renewal_notice_period": "renewalNoticePeriod", "renewal_notice_date": "renewalNoticeDate", "auto_renewal_term_length": "autoRenewalTermLength", "renewal_extension_period": "renewalExtensionPeriod", "renewal_process_owner": "renewalProcessOwner", "renewal_additional_info": "renewalAdditionalInfo", "termination_period_for_cause": "terminationPeriodForCause", "termination_period_for_convenience": "terminationPeriodForConvenience", "effective_date": "effectiveDate", "expiration_date": "expirationDate", "execution_date": "executionDate", "term_length": "termLength", }); }); /** @internal */ exports.Provisions$outboundSchema = z.object({ assignmentType: z.string().optional(), assignmentChangeOfControl: z.string().optional(), assignmentTerminationRights: z.string().optional(), confidentialityObligationPeriod: z.nullable(z.string()).optional(), governingLaw: z.nullable(z.string()).optional(), jurisdiction: z.nullable(z.string()).optional(), ndaType: z.nullable(z.string()).optional(), annualAgreementValue: z.nullable(z.number()).optional(), annualAgreementValueCurrencyCode: z.nullable(currencycode_js_1.CurrencyCode$outboundSchema) .optional(), totalAgreementValue: z.nullable(z.number()).optional(), totalAgreementValueCurrencyCode: z.nullable(currencycode_js_1.CurrencyCode$outboundSchema) .optional(), paymentTermsDueDate: exports.PaymentTermsDueDate$outboundSchema.default("OTHER"), canChargeLatePaymentFees: z.nullable(z.boolean()).optional(), latePaymentFeePercent: z.nullable(z.number().int()).optional(), liabilityCapFixedAmount: z.nullable(z.number()).optional(), liabilityCapCurrencyCode: z.nullable(currencycode_js_1.CurrencyCode$outboundSchema).optional(), liabilityCapMultiplier: z.nullable(z.number()).optional(), liabilityCapDuration: z.nullable(z.string()).optional(), priceCapPercentIncrease: z.nullable(z.number()).optional(), renewalType: z.nullable(z.string()).optional(), renewalNoticePeriod: z.nullable(z.string()).optional(), renewalNoticeDate: z.nullable(z.date().transform(v => v.toISOString())) .optional(), autoRenewalTermLength: z.nullable(z.string()).optional(), renewalExtensionPeriod: z.nullable(z.string()).optional(), renewalProcessOwner: z.nullable(z.string()).optional(), renewalAdditionalInfo: z.nullable(z.string()).optional(), terminationPeriodForCause: z.nullable(z.string()).optional(), terminationPeriodForConvenience: z.nullable(z.string()).optional(), effectiveDate: z.nullable(z.instanceof(rfcdate_js_1.RFCDate).transform(v => v.toString())) .optional(), expirationDate: z.nullable(z.instanceof(rfcdate_js_1.RFCDate).transform(v => v.toString())) .optional(), executionDate: z.nullable(z.instanceof(rfcdate_js_1.RFCDate).transform(v => v.toString())) .optional(), termLength: z.nullable(z.string()).optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { assignmentType: "assignment_type", assignmentChangeOfControl: "assignment_change_of_control", assignmentTerminationRights: "assignment_termination_rights", confidentialityObligationPeriod: "confidentiality_obligation_period", governingLaw: "governing_law", ndaType: "nda_type", annualAgreementValue: "annual_agreement_value", annualAgreementValueCurrencyCode: "annual_agreement_value_currency_code", totalAgreementValue: "total_agreement_value", totalAgreementValueCurrencyCode: "total_agreement_value_currency_code", paymentTermsDueDate: "payment_terms_due_date", canChargeLatePaymentFees: "can_charge_late_payment_fees", latePaymentFeePercent: "late_payment_fee_percent", liabilityCapFixedAmount: "liability_cap_fixed_amount", liabilityCapCurrencyCode: "liability_cap_currency_code", liabilityCapMultiplier: "liability_cap_multiplier", liabilityCapDuration: "liability_cap_duration", priceCapPercentIncrease: "price_cap_percent_increase", renewalType: "renewal_type", renewalNoticePeriod: "renewal_notice_period", renewalNoticeDate: "renewal_notice_date", autoRenewalTermLength: "auto_renewal_term_length", renewalExtensionPeriod: "renewal_extension_period", renewalProcessOwner: "renewal_process_owner", renewalAdditionalInfo: "renewal_additional_info", terminationPeriodForCause: "termination_period_for_cause", terminationPeriodForConvenience: "termination_period_for_convenience", effectiveDate: "effective_date", expirationDate: "expiration_date", executionDate: "execution_date", termLength: "term_length", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Provisions$; (function (Provisions$) { /** @deprecated use `Provisions$inboundSchema` instead. */ Provisions$.inboundSchema = exports.Provisions$inboundSchema; /** @deprecated use `Provisions$outboundSchema` instead. */ Provisions$.outboundSchema = exports.Provisions$outboundSchema; })(Provisions$ || (exports.Provisions$ = Provisions$ = {})); function provisionsToJSON(provisions) { return JSON.stringify(exports.Provisions$outboundSchema.parse(provisions)); } function provisionsFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Provisions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Provisions' from JSON`); } /** @internal */ exports.RelatedAgreementDocuments$inboundSchema = z.object({ parent_agreement_document_id: z.nullable(z.string().default("00000000-0000-0000-0000-000000000000")), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "parent_agreement_document_id": "parentAgreementDocumentId", }); }); /** @internal */ exports.RelatedAgreementDocuments$outboundSchema = z.object({ parentAgreementDocumentId: z.nullable(z.string().default("00000000-0000-0000-0000-000000000000")), }).transform((v) => { return (0, primitives_js_1.remap)(v, { parentAgreementDocumentId: "parent_agreement_document_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var RelatedAgreementDocuments$; (function (RelatedAgreementDocuments$) { /** @deprecated use `RelatedAgreementDocuments$inboundSchema` instead. */ RelatedAgreementDocuments$.inboundSchema = exports.RelatedAgreementDocuments$inboundSchema; /** @deprecated use `RelatedAgreementDocuments$outboundSchema` instead. */ RelatedAgreementDocuments$.outboundSchema = exports.RelatedAgreementDocuments$outboundSchema; })(RelatedAgreementDocuments$ || (exports.RelatedAgreementDocuments$ = RelatedAgreementDocuments$ = {})); function relatedAgreementDocumentsToJSON(relatedAgreementDocuments) { return JSON.stringify(exports.RelatedAgreementDocuments$outboundSchema.parse(relatedAgreementDocuments)); } function relatedAgreementDocumentsFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RelatedAgreementDocuments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RelatedAgreementDocuments' from JSON`); } /** @internal */ exports.Agreement$inboundSchema = z.object({ id: z.nullable(z.string().default("00000000-0000-0000-0000-000000000000")), title: z.nullable(z.string()).optional(), file_name: z.nullable(z.string()).optional(), type: z.nullable(z.string()).optional(), category: z.nullable(z.string()).optional(), summary: z.nullable(z.string()).optional(), status: z.nullable(z.string()).optional(), parties: z.nullable(z.array(party_js_1.Party$inboundSchema)).optional(), provisions: z.nullable(z.lazy(() => exports.Provisions$inboundSchema)).optional(), additional_user_defined_data: z.nullable(z.record(customproperty_js_1.CustomProperty$inboundSchema)).optional(), additional_custom_clm_data: z.nullable(z.record(customproperty_js_1.CustomProperty$inboundSchema)) .optional(), additional_custom_esign_data: z.nullable(z.record(customproperty_js_1.CustomProperty$inboundSchema)).optional(), related_agreement_documents: z.lazy(() => exports.RelatedAgreementDocuments$inboundSchema).optional(), languages: z.nullable(z.array(z.nullable(z.string()))).optional(), source_name: z.nullable(z.string()).optional(), source_id: z.nullable(z.string()).optional(), source_account_id: z.nullable(z.string()).optional(), metadata: resourcemetadata_js_1.ResourceMetadata$inboundSchema.optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "file_name": "fileName", "additional_user_defined_data": "additionalUserDefinedData", "additional_custom_clm_data": "additionalCustomClmData", "additional_custom_esign_data": "additionalCustomEsignData", "related_agreement_documents": "relatedAgreementDocuments", "source_name": "sourceName", "source_id": "sourceId", "source_account_id": "sourceAccountId", }); }); /** @internal */ exports.Agreement$outboundSchema = z.object({ id: z.nullable(z.string().default("00000000-0000-0000-0000-000000000000")), title: z.nullable(z.string()).optional(), fileName: z.nullable(z.string()).optional(), type: z.nullable(z.string()).optional(), category: z.nullable(z.string()).optional(), summary: z.nullable(z.string()).optional(), status: z.nullable(z.string()).optional(), parties: z.nullable(z.array(party_js_1.Party$outboundSchema)).optional(), provisions: z.nullable(z.lazy(() => exports.Provisions$outboundSchema)).optional(), additionalUserDefinedData: z.nullable(z.record(customproperty_js_1.CustomProperty$outboundSchema)) .optional(), additionalCustomClmData: z.nullable(z.record(customproperty_js_1.CustomProperty$outboundSchema)) .optional(), additionalCustomEsignData: z.nullable(z.record(customproperty_js_1.CustomProperty$outboundSchema)) .optional(), relatedAgreementDocuments: z.lazy(() => exports.RelatedAgreementDocuments$outboundSchema).optional(), languages: z.nullable(z.array(z.nullable(z.string()))).optional(), sourceName: z.nullable(z.string()).optional(), sourceId: z.nullable(z.string()).optional(), sourceAccountId: z.nullable(z.string()).optional(), metadata: resourcemetadata_js_1.ResourceMetadata$outboundSchema.optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { fileName: "file_name", additionalUserDefinedData: "additional_user_defined_data", additionalCustomClmData: "additional_custom_clm_data", additionalCustomEsignData: "additional_custom_esign_data", relatedAgreementDocuments: "related_agreement_documents", sourceName: "source_name", sourceId: "source_id", sourceAccountId: "source_account_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Agreement$; (function (Agreement$) { /** @deprecated use `Agreement$inboundSchema` instead. */ Agreement$.inboundSchema = exports.Agreement$inboundSchema; /** @deprecated use `Agreement$outboundSchema` instead. */ Agreement$.outboundSchema = exports.Agreement$outboundSchema; })(Agreement$ || (exports.Agreement$ = Agreement$ = {})); function agreementToJSON(agreement) { return JSON.stringify(exports.Agreement$outboundSchema.parse(agreement)); } function agreementFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Agreement$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Agreement' from JSON`); } //# sourceMappingURL=agreement.js.map