diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 094234fea..8767d4104 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -1,27 +1,10 @@ "use strict"; var __create = Object.create; var __defProp = Object.defineProperty; -var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; @@ -38,36 +21,20 @@ var __copyProps = (to, from, except, desc) => { return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); -}; // node_modules/delayed-stream/lib/delayed_stream.js var require_delayed_stream = __commonJS({ - "node_modules/delayed-stream/lib/delayed_stream.js"(exports, module2) { + "node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) { var Stream = require("stream").Stream; - var util2 = require("util"); + var util3 = require("util"); module2.exports = DelayedStream; function DelayedStream() { this.source = null; @@ -78,7 +45,7 @@ var require_delayed_stream = __commonJS({ this._released = false; this._bufferedEvents = []; } - util2.inherits(DelayedStream, Stream); + util3.inherits(DelayedStream, Stream); DelayedStream.create = function(source, options) { var delayedStream = new this(); options = options || {}; @@ -156,8 +123,8 @@ var require_delayed_stream = __commonJS({ // node_modules/combined-stream/lib/combined_stream.js var require_combined_stream = __commonJS({ - "node_modules/combined-stream/lib/combined_stream.js"(exports, module2) { - var util2 = require("util"); + "node_modules/combined-stream/lib/combined_stream.js"(exports2, module2) { + var util3 = require("util"); var Stream = require("stream").Stream; var DelayedStream = require_delayed_stream(); module2.exports = CombinedStream; @@ -173,7 +140,7 @@ var require_combined_stream = __commonJS({ this._insideLoop = false; this._pendingNext = false; } - util2.inherits(CombinedStream, Stream); + util3.inherits(CombinedStream, Stream); CombinedStream.create = function(options) { var combinedStream = new this(); options = options || {}; @@ -270,8 +237,7 @@ var require_combined_stream = __commonJS({ if (!this.pauseStreams) { return; } - if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") - this._currentStream.pause(); + if (this.pauseStreams && this._currentStream && typeof this._currentStream.pause == "function") this._currentStream.pause(); this.emit("pause"); }; CombinedStream.prototype.resume = function() { @@ -280,8 +246,7 @@ var require_combined_stream = __commonJS({ this.writable = true; this._getNext(); } - if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") - this._currentStream.resume(); + if (this.pauseStreams && this._currentStream && typeof this._currentStream.resume == "function") this._currentStream.resume(); this.emit("resume"); }; CombinedStream.prototype.end = function() { @@ -327,7 +292,7 @@ var require_combined_stream = __commonJS({ // node_modules/mime-db/db.json var require_db = __commonJS({ - "node_modules/mime-db/db.json"(exports, module2) { + "node_modules/mime-db/db.json"(exports2, module2) { module2.exports = { "application/1d-interleaved-parityfec": { source: "iana" @@ -8852,27 +8817,27 @@ var require_db = __commonJS({ // node_modules/mime-db/index.js var require_mime_db = __commonJS({ - "node_modules/mime-db/index.js"(exports, module2) { + "node_modules/mime-db/index.js"(exports2, module2) { module2.exports = require_db(); } }); // node_modules/mime-types/index.js var require_mime_types = __commonJS({ - "node_modules/mime-types/index.js"(exports) { + "node_modules/mime-types/index.js"(exports2) { "use strict"; var db = require_mime_db(); var extname = require("path").extname; var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; var TEXT_TYPE_REGEXP = /^text\//i; - exports.charset = charset; - exports.charsets = { lookup: charset }; - exports.contentType = contentType; - exports.extension = extension; - exports.extensions = /* @__PURE__ */ Object.create(null); - exports.lookup = lookup; - exports.types = /* @__PURE__ */ Object.create(null); - populateMaps(exports.extensions, exports.types); + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); function charset(type) { if (!type || typeof type !== "string") { return false; @@ -8891,14 +8856,13 @@ var require_mime_types = __commonJS({ if (!str || typeof str !== "string") { return false; } - var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str; + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; if (!mime) { return false; } if (mime.indexOf("charset") === -1) { - var charset2 = exports.charset(mime); - if (charset2) - mime += "; charset=" + charset2.toLowerCase(); + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); } return mime; } @@ -8907,7 +8871,7 @@ var require_mime_types = __commonJS({ return false; } var match = EXTRACT_TYPE_REGEXP.exec(type); - var exts = match && exports.extensions[match[1].toLowerCase()]; + var exts = match && exports2.extensions[match[1].toLowerCase()]; if (!exts || !exts.length) { return false; } @@ -8921,7 +8885,7 @@ var require_mime_types = __commonJS({ if (!extension2) { return false; } - return exports.types[extension2] || false; + return exports2.types[extension2] || false; } function populateMaps(extensions, types) { var preference = ["nginx", "apache", void 0, "iana"]; @@ -8950,7 +8914,7 @@ var require_mime_types = __commonJS({ // node_modules/asynckit/lib/defer.js var require_defer = __commonJS({ - "node_modules/asynckit/lib/defer.js"(exports, module2) { + "node_modules/asynckit/lib/defer.js"(exports2, module2) { module2.exports = defer; function defer(fn) { var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null; @@ -8965,7 +8929,7 @@ var require_defer = __commonJS({ // node_modules/asynckit/lib/async.js var require_async = __commonJS({ - "node_modules/asynckit/lib/async.js"(exports, module2) { + "node_modules/asynckit/lib/async.js"(exports2, module2) { var defer = require_defer(); module2.exports = async; function async(callback) { @@ -8988,7 +8952,7 @@ var require_async = __commonJS({ // node_modules/asynckit/lib/abort.js var require_abort = __commonJS({ - "node_modules/asynckit/lib/abort.js"(exports, module2) { + "node_modules/asynckit/lib/abort.js"(exports2, module2) { module2.exports = abort; function abort(state) { Object.keys(state.jobs).forEach(clean.bind(state)); @@ -9004,7 +8968,7 @@ var require_abort = __commonJS({ // node_modules/asynckit/lib/iterate.js var require_iterate = __commonJS({ - "node_modules/asynckit/lib/iterate.js"(exports, module2) { + "node_modules/asynckit/lib/iterate.js"(exports2, module2) { var async = require_async(); var abort = require_abort(); module2.exports = iterate; @@ -9037,7 +9001,7 @@ var require_iterate = __commonJS({ // node_modules/asynckit/lib/state.js var require_state = __commonJS({ - "node_modules/asynckit/lib/state.js"(exports, module2) { + "node_modules/asynckit/lib/state.js"(exports2, module2) { module2.exports = state; function state(list, sortMethod) { var isNamedList = !Array.isArray(list), initState = { @@ -9059,7 +9023,7 @@ var require_state = __commonJS({ // node_modules/asynckit/lib/terminator.js var require_terminator = __commonJS({ - "node_modules/asynckit/lib/terminator.js"(exports, module2) { + "node_modules/asynckit/lib/terminator.js"(exports2, module2) { var abort = require_abort(); var async = require_async(); module2.exports = terminator; @@ -9076,7 +9040,7 @@ var require_terminator = __commonJS({ // node_modules/asynckit/parallel.js var require_parallel = __commonJS({ - "node_modules/asynckit/parallel.js"(exports, module2) { + "node_modules/asynckit/parallel.js"(exports2, module2) { var iterate = require_iterate(); var initState = require_state(); var terminator = require_terminator(); @@ -9103,7 +9067,7 @@ var require_parallel = __commonJS({ // node_modules/asynckit/serialOrdered.js var require_serialOrdered = __commonJS({ - "node_modules/asynckit/serialOrdered.js"(exports, module2) { + "node_modules/asynckit/serialOrdered.js"(exports2, module2) { var iterate = require_iterate(); var initState = require_state(); var terminator = require_terminator(); @@ -9137,7 +9101,7 @@ var require_serialOrdered = __commonJS({ // node_modules/asynckit/serial.js var require_serial = __commonJS({ - "node_modules/asynckit/serial.js"(exports, module2) { + "node_modules/asynckit/serial.js"(exports2, module2) { var serialOrdered = require_serialOrdered(); module2.exports = serial; function serial(list, iterator, callback) { @@ -9148,7 +9112,7 @@ var require_serial = __commonJS({ // node_modules/asynckit/index.js var require_asynckit = __commonJS({ - "node_modules/asynckit/index.js"(exports, module2) { + "node_modules/asynckit/index.js"(exports2, module2) { module2.exports = { parallel: require_parallel(), serial: require_serial(), @@ -9159,7 +9123,7 @@ var require_asynckit = __commonJS({ // node_modules/form-data/lib/populate.js var require_populate = __commonJS({ - "node_modules/form-data/lib/populate.js"(exports, module2) { + "node_modules/form-data/lib/populate.js"(exports2, module2) { module2.exports = function(dst, src) { Object.keys(src).forEach(function(prop) { dst[prop] = dst[prop] || src[prop]; @@ -9171,9 +9135,9 @@ var require_populate = __commonJS({ // node_modules/form-data/lib/form_data.js var require_form_data = __commonJS({ - "node_modules/form-data/lib/form_data.js"(exports, module2) { + "node_modules/form-data/lib/form_data.js"(exports2, module2) { var CombinedStream = require_combined_stream(); - var util2 = require("util"); + var util3 = require("util"); var path = require("path"); var http2 = require("http"); var https2 = require("https"); @@ -9184,7 +9148,7 @@ var require_form_data = __commonJS({ var asynckit = require_asynckit(); var populate = require_populate(); module2.exports = FormData3; - util2.inherits(FormData3, CombinedStream); + util3.inherits(FormData3, CombinedStream); function FormData3(options) { if (!(this instanceof FormData3)) { return new FormData3(options); @@ -9209,7 +9173,7 @@ var require_form_data = __commonJS({ if (typeof value == "number") { value = "" + value; } - if (util2.isArray(value)) { + if (util3.isArray(value)) { this._error(new Error("Arrays are not supported.")); return; } @@ -9273,7 +9237,9 @@ var require_form_data = __commonJS({ var contentType = this._getContentType(value, options); var contents = ""; var headers = { + // add custom disposition as third element or keep it two elements if not "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array "Content-Type": [].concat(contentType || []) }; if (typeof options.header == "object") { @@ -9281,8 +9247,7 @@ var require_form_data = __commonJS({ } var header; for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) - continue; + if (!headers.hasOwnProperty(prop)) continue; header = headers[prop]; if (header == null) { continue; @@ -9484,7 +9449,7 @@ var require_form_data = __commonJS({ // node_modules/proxy-from-env/index.js var require_proxy_from_env = __commonJS({ - "node_modules/proxy-from-env/index.js"(exports) { + "node_modules/proxy-from-env/index.js"(exports2) { "use strict"; var parseUrl = require("url").parse; var DEFAULT_PORTS = { @@ -9498,7 +9463,7 @@ var require_proxy_from_env = __commonJS({ var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; - function getProxyForUrl2(url2) { + function getProxyForUrl(url2) { var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; var proto = parsedUrl.protocol; var hostname = parsedUrl.host; @@ -9548,13 +9513,13 @@ var require_proxy_from_env = __commonJS({ function getEnv(key) { return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ""; } - exports.getProxyForUrl = getProxyForUrl2; + exports2.getProxyForUrl = getProxyForUrl; } }); // node_modules/ms/index.js var require_ms = __commonJS({ - "node_modules/ms/index.js"(exports, module2) { + "node_modules/ms/index.js"(exports2, module2) { var s = 1e3; var m = s * 60; var h = m * 60; @@ -9670,7 +9635,7 @@ var require_ms = __commonJS({ // node_modules/debug/src/common.js var require_common = __commonJS({ - "node_modules/debug/src/common.js"(exports, module2) { + "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; @@ -9705,7 +9670,7 @@ var require_common = __commonJS({ return; } const self2 = debug; - const curr = Number(new Date()); + const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; self2.prev = prevTime; @@ -9833,13 +9798,13 @@ var require_common = __commonJS({ // node_modules/debug/src/browser.js var require_browser = __commonJS({ - "node_modules/debug/src/browser.js"(exports, module2) { - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { + "node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { let warned = false; return () => { if (!warned) { @@ -9848,7 +9813,7 @@ var require_browser = __commonJS({ } }; })(); - exports.colors = [ + exports2.colors = [ "#0000CC", "#0000FF", "#0033CC", @@ -9934,7 +9899,11 @@ var require_browser = __commonJS({ return false; } let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); @@ -9956,14 +9925,14 @@ var require_browser = __commonJS({ }); args.splice(lastC, 0, c); } - exports.log = console.debug || console.log || (() => { + exports2.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { - exports.storage.setItem("debug", namespaces); + exports2.storage.setItem("debug", namespaces); } else { - exports.storage.removeItem("debug"); + exports2.storage.removeItem("debug"); } } catch (error) { } @@ -9971,7 +9940,7 @@ var require_browser = __commonJS({ function load() { let r; try { - r = exports.storage.getItem("debug"); + r = exports2.storage.getItem("debug"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { @@ -9985,7 +9954,7 @@ var require_browser = __commonJS({ } catch (error) { } } - module2.exports = require_common()(exports); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -9999,7 +9968,7 @@ var require_browser = __commonJS({ // node_modules/has-flag/index.js var require_has_flag = __commonJS({ - "node_modules/has-flag/index.js"(exports, module2) { + "node_modules/has-flag/index.js"(exports2, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; @@ -10012,7 +9981,7 @@ var require_has_flag = __commonJS({ // node_modules/supports-color/index.js var require_supports_color = __commonJS({ - "node_modules/supports-color/index.js"(exports, module2) { + "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; var os = require("os"); var tty = require("tty"); @@ -10114,25 +10083,25 @@ var require_supports_color = __commonJS({ // node_modules/debug/src/node.js var require_node = __commonJS({ - "node_modules/debug/src/node.js"(exports, module2) { + "node_modules/debug/src/node.js"(exports2, module2) { var tty = require("tty"); - var util2 = require("util"); - exports.init = init; - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.destroy = util2.deprecate( + var util3 = require("util"); + exports2.init = init; + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util3.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." ); - exports.colors = [6, 2, 3, 4, 5, 1]; + exports2.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ + exports2.colors = [ 20, 21, 26, @@ -10213,7 +10182,7 @@ var require_node = __commonJS({ } } catch (error) { } - exports.inspectOpts = Object.keys(process.env).filter((key) => { + exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { @@ -10233,7 +10202,7 @@ var require_node = __commonJS({ return obj; }, {}); function useColors() { - return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); } function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; @@ -10248,13 +10217,13 @@ var require_node = __commonJS({ } } function getDate() { - if (exports.inspectOpts.hideDate) { + if (exports2.inspectOpts.hideDate) { return ""; } - return new Date().toISOString() + " "; + return (/* @__PURE__ */ new Date()).toISOString() + " "; } function log(...args) { - return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + return process.stderr.write(util3.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); } function save(namespaces) { if (namespaces) { @@ -10268,27 +10237,27 @@ var require_node = __commonJS({ } function init(debug) { debug.inspectOpts = {}; - const keys = Object.keys(exports.inspectOpts); + const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common()(exports); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; - return util2.inspect(v, this.inspectOpts); + return util3.inspect(v, this.inspectOpts); }; } }); // node_modules/debug/src/index.js var require_src = __commonJS({ - "node_modules/debug/src/index.js"(exports, module2) { + "node_modules/debug/src/index.js"(exports2, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { @@ -10299,7 +10268,7 @@ var require_src = __commonJS({ // node_modules/follow-redirects/debug.js var require_debug = __commonJS({ - "node_modules/follow-redirects/debug.js"(exports, module2) { + "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug; module2.exports = function() { if (!debug) { @@ -10319,7 +10288,7 @@ var require_debug = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ - "node_modules/follow-redirects/index.js"(exports, module2) { + "node_modules/follow-redirects/index.js"(exports2, module2) { var url2 = require("url"); var URL2 = url2.URL; var http2 = require("http"); @@ -10565,7 +10534,11 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : this._options.path; + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path + ); if (this._isRedirect) { var i = 0; var self2 = this; @@ -10612,11 +10585,16 @@ var require_follow_redirects = __commonJS({ var beforeRedirect = this._options.beforeRedirect; if (beforeRedirect) { requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request Host: response.req.getHeader("host") }, this._options.headers); } var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) { this._options.method = "GET"; this._requestBodyBuffers = []; removeMatchingHeaders(/^content-/i, this._options.headers); @@ -10648,7 +10626,7 @@ var require_follow_redirects = __commonJS({ this._performRequest(); }; function wrap(protocols) { - var exports2 = { + var exports3 = { maxRedirects: 21, maxBodyLength: 10 * 1024 * 1024 }; @@ -10656,7 +10634,7 @@ var require_follow_redirects = __commonJS({ Object.keys(protocols).forEach(function(scheme) { var protocol = scheme + ":"; var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol); + var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol); function request(input, options, callback) { if (isURL(input)) { input = spreadUrlObject(input); @@ -10672,8 +10650,8 @@ var require_follow_redirects = __commonJS({ options = null; } options = Object.assign({ - maxRedirects: exports2.maxRedirects, - maxBodyLength: exports2.maxBodyLength + maxRedirects: exports3.maxRedirects, + maxBodyLength: exports3.maxBodyLength }, input, options); options.nativeProtocols = nativeProtocols; if (!isString2(options.host) && !isString2(options.hostname)) { @@ -10693,7 +10671,7 @@ var require_follow_redirects = __commonJS({ get: { value: get, configurable: true, enumerable: true, writable: true } }); }); - return exports2; + return exports3; } function noop2() { } @@ -10796,7 +10774,7 @@ var require_follow_redirects = __commonJS({ // node_modules/es-object-atoms/index.js var require_es_object_atoms = __commonJS({ - "node_modules/es-object-atoms/index.js"(exports, module2) { + "node_modules/es-object-atoms/index.js"(exports2, module2) { "use strict"; module2.exports = Object; } @@ -10804,7 +10782,7 @@ var require_es_object_atoms = __commonJS({ // node_modules/es-errors/index.js var require_es_errors = __commonJS({ - "node_modules/es-errors/index.js"(exports, module2) { + "node_modules/es-errors/index.js"(exports2, module2) { "use strict"; module2.exports = Error; } @@ -10812,7 +10790,7 @@ var require_es_errors = __commonJS({ // node_modules/es-errors/eval.js var require_eval = __commonJS({ - "node_modules/es-errors/eval.js"(exports, module2) { + "node_modules/es-errors/eval.js"(exports2, module2) { "use strict"; module2.exports = EvalError; } @@ -10820,7 +10798,7 @@ var require_eval = __commonJS({ // node_modules/es-errors/range.js var require_range = __commonJS({ - "node_modules/es-errors/range.js"(exports, module2) { + "node_modules/es-errors/range.js"(exports2, module2) { "use strict"; module2.exports = RangeError; } @@ -10828,7 +10806,7 @@ var require_range = __commonJS({ // node_modules/es-errors/ref.js var require_ref = __commonJS({ - "node_modules/es-errors/ref.js"(exports, module2) { + "node_modules/es-errors/ref.js"(exports2, module2) { "use strict"; module2.exports = ReferenceError; } @@ -10836,7 +10814,7 @@ var require_ref = __commonJS({ // node_modules/es-errors/syntax.js var require_syntax = __commonJS({ - "node_modules/es-errors/syntax.js"(exports, module2) { + "node_modules/es-errors/syntax.js"(exports2, module2) { "use strict"; module2.exports = SyntaxError; } @@ -10844,7 +10822,7 @@ var require_syntax = __commonJS({ // node_modules/es-errors/type.js var require_type = __commonJS({ - "node_modules/es-errors/type.js"(exports, module2) { + "node_modules/es-errors/type.js"(exports2, module2) { "use strict"; module2.exports = TypeError; } @@ -10852,7 +10830,7 @@ var require_type = __commonJS({ // node_modules/es-errors/uri.js var require_uri = __commonJS({ - "node_modules/es-errors/uri.js"(exports, module2) { + "node_modules/es-errors/uri.js"(exports2, module2) { "use strict"; module2.exports = URIError; } @@ -10860,7 +10838,7 @@ var require_uri = __commonJS({ // node_modules/math-intrinsics/abs.js var require_abs = __commonJS({ - "node_modules/math-intrinsics/abs.js"(exports, module2) { + "node_modules/math-intrinsics/abs.js"(exports2, module2) { "use strict"; module2.exports = Math.abs; } @@ -10868,7 +10846,7 @@ var require_abs = __commonJS({ // node_modules/math-intrinsics/floor.js var require_floor = __commonJS({ - "node_modules/math-intrinsics/floor.js"(exports, module2) { + "node_modules/math-intrinsics/floor.js"(exports2, module2) { "use strict"; module2.exports = Math.floor; } @@ -10876,7 +10854,7 @@ var require_floor = __commonJS({ // node_modules/math-intrinsics/max.js var require_max = __commonJS({ - "node_modules/math-intrinsics/max.js"(exports, module2) { + "node_modules/math-intrinsics/max.js"(exports2, module2) { "use strict"; module2.exports = Math.max; } @@ -10884,7 +10862,7 @@ var require_max = __commonJS({ // node_modules/math-intrinsics/min.js var require_min = __commonJS({ - "node_modules/math-intrinsics/min.js"(exports, module2) { + "node_modules/math-intrinsics/min.js"(exports2, module2) { "use strict"; module2.exports = Math.min; } @@ -10892,7 +10870,7 @@ var require_min = __commonJS({ // node_modules/math-intrinsics/pow.js var require_pow = __commonJS({ - "node_modules/math-intrinsics/pow.js"(exports, module2) { + "node_modules/math-intrinsics/pow.js"(exports2, module2) { "use strict"; module2.exports = Math.pow; } @@ -10900,7 +10878,7 @@ var require_pow = __commonJS({ // node_modules/math-intrinsics/round.js var require_round = __commonJS({ - "node_modules/math-intrinsics/round.js"(exports, module2) { + "node_modules/math-intrinsics/round.js"(exports2, module2) { "use strict"; module2.exports = Math.round; } @@ -10908,7 +10886,7 @@ var require_round = __commonJS({ // node_modules/math-intrinsics/isNaN.js var require_isNaN = __commonJS({ - "node_modules/math-intrinsics/isNaN.js"(exports, module2) { + "node_modules/math-intrinsics/isNaN.js"(exports2, module2) { "use strict"; module2.exports = Number.isNaN || function isNaN2(a) { return a !== a; @@ -10918,7 +10896,7 @@ var require_isNaN = __commonJS({ // node_modules/math-intrinsics/sign.js var require_sign = __commonJS({ - "node_modules/math-intrinsics/sign.js"(exports, module2) { + "node_modules/math-intrinsics/sign.js"(exports2, module2) { "use strict"; var $isNaN = require_isNaN(); module2.exports = function sign(number) { @@ -10932,7 +10910,7 @@ var require_sign = __commonJS({ // node_modules/gopd/gOPD.js var require_gOPD = __commonJS({ - "node_modules/gopd/gOPD.js"(exports, module2) { + "node_modules/gopd/gOPD.js"(exports2, module2) { "use strict"; module2.exports = Object.getOwnPropertyDescriptor; } @@ -10940,7 +10918,7 @@ var require_gOPD = __commonJS({ // node_modules/gopd/index.js var require_gopd = __commonJS({ - "node_modules/gopd/index.js"(exports, module2) { + "node_modules/gopd/index.js"(exports2, module2) { "use strict"; var $gOPD = require_gOPD(); if ($gOPD) { @@ -10956,7 +10934,7 @@ var require_gopd = __commonJS({ // node_modules/es-define-property/index.js var require_es_define_property = __commonJS({ - "node_modules/es-define-property/index.js"(exports, module2) { + "node_modules/es-define-property/index.js"(exports2, module2) { "use strict"; var $defineProperty = Object.defineProperty || false; if ($defineProperty) { @@ -10972,7 +10950,7 @@ var require_es_define_property = __commonJS({ // node_modules/has-symbols/shams.js var require_shams = __commonJS({ - "node_modules/has-symbols/shams.js"(exports, module2) { + "node_modules/has-symbols/shams.js"(exports2, module2) { "use strict"; module2.exports = function hasSymbols() { if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { @@ -11012,7 +10990,10 @@ var require_shams = __commonJS({ return false; } if (typeof Object.getOwnPropertyDescriptor === "function") { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + var descriptor = ( + /** @type {PropertyDescriptor} */ + Object.getOwnPropertyDescriptor(obj, sym) + ); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } @@ -11024,7 +11005,7 @@ var require_shams = __commonJS({ // node_modules/has-symbols/index.js var require_has_symbols = __commonJS({ - "node_modules/has-symbols/index.js"(exports, module2) { + "node_modules/has-symbols/index.js"(exports2, module2) { "use strict"; var origSymbol = typeof Symbol !== "undefined" && Symbol; var hasSymbolSham = require_shams(); @@ -11048,7 +11029,7 @@ var require_has_symbols = __commonJS({ // node_modules/get-proto/Reflect.getPrototypeOf.js var require_Reflect_getPrototypeOf = __commonJS({ - "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module2) { + "node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) { "use strict"; module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; } @@ -11056,7 +11037,7 @@ var require_Reflect_getPrototypeOf = __commonJS({ // node_modules/get-proto/Object.getPrototypeOf.js var require_Object_getPrototypeOf = __commonJS({ - "node_modules/get-proto/Object.getPrototypeOf.js"(exports, module2) { + "node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) { "use strict"; var $Object = require_es_object_atoms(); module2.exports = $Object.getPrototypeOf || null; @@ -11065,7 +11046,7 @@ var require_Object_getPrototypeOf = __commonJS({ // node_modules/function-bind/implementation.js var require_implementation = __commonJS({ - "node_modules/function-bind/implementation.js"(exports, module2) { + "node_modules/function-bind/implementation.js"(exports2, module2) { "use strict"; var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; @@ -11141,7 +11122,7 @@ var require_implementation = __commonJS({ // node_modules/function-bind/index.js var require_function_bind = __commonJS({ - "node_modules/function-bind/index.js"(exports, module2) { + "node_modules/function-bind/index.js"(exports2, module2) { "use strict"; var implementation = require_implementation(); module2.exports = Function.prototype.bind || implementation; @@ -11150,7 +11131,7 @@ var require_function_bind = __commonJS({ // node_modules/call-bind-apply-helpers/functionCall.js var require_functionCall = __commonJS({ - "node_modules/call-bind-apply-helpers/functionCall.js"(exports, module2) { + "node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) { "use strict"; module2.exports = Function.prototype.call; } @@ -11158,7 +11139,7 @@ var require_functionCall = __commonJS({ // node_modules/call-bind-apply-helpers/functionApply.js var require_functionApply = __commonJS({ - "node_modules/call-bind-apply-helpers/functionApply.js"(exports, module2) { + "node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) { "use strict"; module2.exports = Function.prototype.apply; } @@ -11166,7 +11147,7 @@ var require_functionApply = __commonJS({ // node_modules/call-bind-apply-helpers/reflectApply.js var require_reflectApply = __commonJS({ - "node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module2) { + "node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) { "use strict"; module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; } @@ -11174,7 +11155,7 @@ var require_reflectApply = __commonJS({ // node_modules/call-bind-apply-helpers/actualApply.js var require_actualApply = __commonJS({ - "node_modules/call-bind-apply-helpers/actualApply.js"(exports, module2) { + "node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) { "use strict"; var bind2 = require_function_bind(); var $apply = require_functionApply(); @@ -11186,7 +11167,7 @@ var require_actualApply = __commonJS({ // node_modules/call-bind-apply-helpers/index.js var require_call_bind_apply_helpers = __commonJS({ - "node_modules/call-bind-apply-helpers/index.js"(exports, module2) { + "node_modules/call-bind-apply-helpers/index.js"(exports2, module2) { "use strict"; var bind2 = require_function_bind(); var $TypeError = require_type(); @@ -11203,30 +11184,38 @@ var require_call_bind_apply_helpers = __commonJS({ // node_modules/dunder-proto/get.js var require_get = __commonJS({ - "node_modules/dunder-proto/get.js"(exports, module2) { + "node_modules/dunder-proto/get.js"(exports2, module2) { "use strict"; var callBind = require_call_bind_apply_helpers(); var gOPD = require_gopd(); var hasProtoAccessor; try { - hasProtoAccessor = [].__proto__ === Array.prototype; + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ + [].__proto__ === Array.prototype; } catch (e) { if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { throw e; } } - var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, "__proto__"); + var desc = !!hasProtoAccessor && gOPD && gOPD( + Object.prototype, + /** @type {keyof typeof Object.prototype} */ + "__proto__" + ); var $Object = Object; var $getPrototypeOf = $Object.getPrototypeOf; - module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? function getDunder(value) { - return $getPrototypeOf(value == null ? value : $Object(value)); - } : false; + module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( + /** @type {import('./get')} */ + function getDunder(value) { + return $getPrototypeOf(value == null ? value : $Object(value)); + } + ) : false; } }); // node_modules/get-proto/index.js var require_get_proto = __commonJS({ - "node_modules/get-proto/index.js"(exports, module2) { + "node_modules/get-proto/index.js"(exports2, module2) { "use strict"; var reflectGetProto = require_Reflect_getPrototypeOf(); var originalGetProto = require_Object_getPrototypeOf(); @@ -11246,7 +11235,7 @@ var require_get_proto = __commonJS({ // node_modules/hasown/index.js var require_hasown = __commonJS({ - "node_modules/hasown/index.js"(exports, module2) { + "node_modules/hasown/index.js"(exports2, module2) { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; @@ -11257,7 +11246,7 @@ var require_hasown = __commonJS({ // node_modules/get-intrinsic/index.js var require_get_intrinsic = __commonJS({ - "node_modules/get-intrinsic/index.js"(exports, module2) { + "node_modules/get-intrinsic/index.js"(exports2, module2) { "use strict"; var undefined2; var $Object = require_es_object_atoms(); @@ -11331,6 +11320,7 @@ var require_get_intrinsic = __commonJS({ "%encodeURIComponent%": encodeURIComponent, "%Error%": $Error, "%eval%": eval, + // eslint-disable-line no-eval "%EvalError%": $EvalError, "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, @@ -11561,7 +11551,7 @@ var require_get_intrinsic = __commonJS({ if (!allowMissing) { throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); } - return void 0; + return void undefined2; } if ($gOPD && i + 1 >= parts.length) { var desc = $gOPD(value, part); @@ -11587,7 +11577,7 @@ var require_get_intrinsic = __commonJS({ // node_modules/define-data-property/index.js var require_define_data_property = __commonJS({ - "node_modules/define-data-property/index.js"(exports, module2) { + "node_modules/define-data-property/index.js"(exports2, module2) { "use strict"; var $defineProperty = require_es_define_property(); var $SyntaxError = require_syntax(); @@ -11635,7 +11625,7 @@ var require_define_data_property = __commonJS({ // node_modules/has-property-descriptors/index.js var require_has_property_descriptors = __commonJS({ - "node_modules/has-property-descriptors/index.js"(exports, module2) { + "node_modules/has-property-descriptors/index.js"(exports2, module2) { "use strict"; var $defineProperty = require_es_define_property(); var hasPropertyDescriptors = function hasPropertyDescriptors2() { @@ -11657,7 +11647,7 @@ var require_has_property_descriptors = __commonJS({ // node_modules/set-function-length/index.js var require_set_function_length = __commonJS({ - "node_modules/set-function-length/index.js"(exports, module2) { + "node_modules/set-function-length/index.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var define = require_define_data_property(); @@ -11686,9 +11676,21 @@ var require_set_function_length = __commonJS({ } if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { if (hasDescriptors) { - define(fn, "length", length, true, true); + define( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); } else { - define(fn, "length", length); + define( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); } } return fn; @@ -11698,7 +11700,7 @@ var require_set_function_length = __commonJS({ // node_modules/call-bind/index.js var require_call_bind = __commonJS({ - "node_modules/call-bind/index.js"(exports, module2) { + "node_modules/call-bind/index.js"(exports2, module2) { "use strict"; var bind2 = require_function_bind(); var GetIntrinsic = require_get_intrinsic(); @@ -11733,7 +11735,7 @@ var require_call_bind = __commonJS({ // node_modules/call-bind/callBound.js var require_callBound = __commonJS({ - "node_modules/call-bind/callBound.js"(exports, module2) { + "node_modules/call-bind/callBound.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBind = require_call_bind(); @@ -11750,14 +11752,14 @@ var require_callBound = __commonJS({ // node_modules/object-inspect/util.inspect.js var require_util_inspect = __commonJS({ - "node_modules/object-inspect/util.inspect.js"(exports, module2) { + "node_modules/object-inspect/util.inspect.js"(exports2, module2) { module2.exports = require("util").inspect; } }); // node_modules/object-inspect/index.js var require_object_inspect = __commonJS({ - "node_modules/object-inspect/index.js"(exports, module2) { + "node_modules/object-inspect/index.js"(exports2, module2) { var hasMap = typeof Map === "function" && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; @@ -12272,7 +12274,7 @@ var require_object_inspect = __commonJS({ // node_modules/side-channel/index.js var require_side_channel = __commonJS({ - "node_modules/side-channel/index.js"(exports, module2) { + "node_modules/side-channel/index.js"(exports2, module2) { "use strict"; var GetIntrinsic = require_get_intrinsic(); var callBound = require_callBound(); @@ -12292,7 +12294,8 @@ var require_side_channel = __commonJS({ for (; (curr = prev.next) !== null; prev = curr) { if (curr.key === key) { prev.next = curr.next; - curr.next = list.next; + curr.next = /** @type {NonNullable} */ + list.next; list.next = curr; return curr; } @@ -12307,7 +12310,9 @@ var require_side_channel = __commonJS({ if (node) { node.value = value; } else { - objects.next = { + objects.next = /** @type {import('.').ListNode} */ + { + // eslint-disable-line no-param-reassign, no-extra-parens key, next: objects.next, value @@ -12384,7 +12389,7 @@ var require_side_channel = __commonJS({ // node_modules/qs/lib/formats.js var require_formats = __commonJS({ - "node_modules/qs/lib/formats.js"(exports, module2) { + "node_modules/qs/lib/formats.js"(exports2, module2) { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; @@ -12410,7 +12415,7 @@ var require_formats = __commonJS({ // node_modules/qs/lib/utils.js var require_utils = __commonJS({ - "node_modules/qs/lib/utils.js"(exports, module2) { + "node_modules/qs/lib/utils.js"(exports2, module2) { "use strict"; var formats = require_formats(); var has = Object.prototype.hasOwnProperty; @@ -12615,7 +12620,7 @@ var require_utils = __commonJS({ // node_modules/qs/lib/stringify.js var require_stringify = __commonJS({ - "node_modules/qs/lib/stringify.js"(exports, module2) { + "node_modules/qs/lib/stringify.js"(exports2, module2) { "use strict"; var getSideChannel = require_side_channel(); var utils = require_utils(); @@ -12654,6 +12659,7 @@ var require_stringify = __commonJS({ encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], + // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); @@ -12894,7 +12900,7 @@ var require_stringify = __commonJS({ // node_modules/qs/lib/parse.js var require_parse = __commonJS({ - "node_modules/qs/lib/parse.js"(exports, module2) { + "node_modules/qs/lib/parse.js"(exports2, module2) { "use strict"; var utils = require_utils(); var has = Object.prototype.hasOwnProperty; @@ -13086,6 +13092,7 @@ var require_parse = __commonJS({ decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults2.decodeDotInKeys, decoder: typeof opts.decoder === "function" ? opts.decoder : defaults2.decoder, delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults2.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults2.depth, duplicates, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, @@ -13120,7 +13127,7 @@ var require_parse = __commonJS({ // node_modules/qs/lib/index.js var require_lib = __commonJS({ - "node_modules/qs/lib/index.js"(exports, module2) { + "node_modules/qs/lib/index.js"(exports2, module2) { "use strict"; var stringify = require_stringify(); var parse = require_parse(); @@ -13368,7 +13375,7 @@ function bind(fn, thisArg) { // node_modules/axios/lib/utils.js var { toString } = Object.prototype; var { getPrototypeOf } = Object; -var kindOf = ((cache) => (thing) => { +var kindOf = /* @__PURE__ */ ((cache) => (thing) => { const str = toString.call(thing); return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); @@ -13411,7 +13418,8 @@ var isFileList = kindOfTest("FileList"); var isStream = (val) => isObject(val) && isFunction(val.pipe); var isFormData = (thing) => { let kind; - return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); + return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); @@ -13453,8 +13461,7 @@ function findKey(obj, key) { return null; } var _global = (() => { - if (typeof globalThis !== "undefined") - return globalThis; + if (typeof globalThis !== "undefined") return globalThis; return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; })(); var isContextDefined = (context) => !isUndefined(context) && context !== _global; @@ -13508,8 +13515,7 @@ var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { let prop; const merged = {}; destObj = destObj || {}; - if (sourceObj == null) - return destObj; + if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); i = props.length; @@ -13534,20 +13540,17 @@ var endsWith = (str, searchString, position) => { return lastIndex !== -1 && lastIndex === position; }; var toArray = (thing) => { - if (!thing) - return null; - if (isArray(thing)) - return thing; + if (!thing) return null; + if (isArray(thing)) return thing; let i = thing.length; - if (!isNumber(i)) - return null; + if (!isNumber(i)) return null; const arr = new Array(i); while (i-- > 0) { arr[i] = thing[i]; } return arr; }; -var isTypedArray = ((TypedArray) => { +var isTypedArray = /* @__PURE__ */ ((TypedArray) => { return (thing) => { return TypedArray && thing instanceof TypedArray; }; @@ -13597,8 +13600,7 @@ var freezeMethods = (obj) => { return false; } const value = obj[name]; - if (!isFunction(value)) - return; + if (!isFunction(value)) return; descriptor.enumerable = false; if ("writable" in descriptor) { descriptor.writable = false; @@ -13626,21 +13628,6 @@ var noop = () => { var toFiniteNumber = (value, defaultValue) => { return value != null && Number.isFinite(value = +value) ? value : defaultValue; }; -var ALPHA = "abcdefghijklmnopqrstuvwxyz"; -var DIGIT = "0123456789"; -var ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; -var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ""; - const { length } = alphabet; - while (size--) { - str += alphabet[Math.random() * length | 0]; - } - return str; -}; function isSpecCompliantForm(thing) { return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]); } @@ -13729,6 +13716,7 @@ var utils_default = { isHTMLForm, hasOwnProperty, hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors, freezeMethods, toObjectSet, @@ -13738,8 +13726,6 @@ var utils_default = { findKey, global: _global, isContextDefined, - ALPHABET, - generateString, isSpecCompliantForm, toJSONObject, isAsyncFn, @@ -13769,14 +13755,18 @@ function AxiosError(message, code, config, request, response) { utils_default.inherits(AxiosError, Error, { toJSON: function toJSON() { return { + // Standard message: this.message, name: this.name, + // Microsoft description: this.description, number: this.number, + // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, + // Axios config: utils_default.toJSONObject(this.config), code: this.code, status: this.status @@ -13798,6 +13788,7 @@ var descriptors = {}; "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" + // eslint-disable-next-line func-names ].forEach((code) => { descriptors[code] = { value: code }; }); @@ -13830,8 +13821,7 @@ function removeBrackets(key) { return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; } function renderKey(path, key, dots) { - if (!path) - return key; + if (!path) return key; return path.concat(key).map(function each(token, i) { token = removeBrackets(token); return !dots && i ? "[" + token + "]" : token; @@ -13865,8 +13855,7 @@ function toFormData(obj, formData2, options) { throw new TypeError("visitor must be a function"); } function convertValue(value) { - if (value === null) - return ""; + if (value === null) return ""; if (utils_default.isDate(value)) { return value.toISOString(); } @@ -13888,6 +13877,7 @@ function toFormData(obj, formData2, options) { key = removeBrackets(key); arr.forEach(function each(el, index) { !(utils_default.isUndefined(el) || el === null) && formData2.append( + // eslint-disable-next-line no-nested-ternary indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el) ); @@ -13908,8 +13898,7 @@ function toFormData(obj, formData2, options) { isVisitable }); function build(value, path) { - if (utils_default.isUndefined(value)) - return; + if (utils_default.isUndefined(value)) return; if (stack.indexOf(value) !== -1) { throw Error("Circular reference detected in " + path.join(".")); } @@ -13978,6 +13967,11 @@ function buildURL(url2, params, options) { return url2; } const _encode = options && options.encode || encode2; + if (utils_default.isFunction(options)) { + options = { + serialize: options + }; + } const serializeFn = options && options.serialize; let serializedParams; if (serializeFn) { @@ -14000,6 +13994,14 @@ var InterceptorManager = class { constructor() { this.handlers = []; } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ use(fulfilled, rejected, options) { this.handlers.push({ fulfilled, @@ -14009,16 +14011,38 @@ var InterceptorManager = class { }); return this.handlers.length - 1; } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ clear() { if (this.handlers) { this.handlers = []; } } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ forEach(fn) { utils_default.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { @@ -14036,11 +14060,31 @@ var transitional_default = { clarifyTimeoutError: false }; +// node_modules/axios/lib/platform/node/index.js +var import_crypto = __toESM(require("crypto"), 1); + // node_modules/axios/lib/platform/node/classes/URLSearchParams.js var import_url = __toESM(require("url"), 1); var URLSearchParams_default = import_url.default.URLSearchParams; // node_modules/axios/lib/platform/node/index.js +var ALPHA = "abcdefghijklmnopqrstuvwxyz"; +var DIGIT = "0123456789"; +var ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +}; +var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ""; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + import_crypto.default.randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + return str; +}; var node_default = { isNode: true, classes: { @@ -14048,6 +14092,8 @@ var node_default = { FormData: FormData_default, Blob: typeof Blob !== "undefined" && Blob || null }, + ALPHABET, + generateString, protocols: ["http", "https", "file", "data"] }; @@ -14064,7 +14110,8 @@ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefi var _navigator = typeof navigator === "object" && navigator || void 0; var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); var hasStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; })(); var origin = hasBrowserEnv && window.location.href || "http://localhost"; @@ -14108,8 +14155,7 @@ function arrayToObject(arr) { function formDataToJSON(formData2) { function buildPath(path, value, target, index) { let name = path[index++]; - if (name === "__proto__") - return true; + if (name === "__proto__") return true; const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils_default.isArray(target) ? target.length : name; @@ -14222,6 +14268,10 @@ var defaults = { } return data; }], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", @@ -14319,8 +14369,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { if (isHeaderNameFilter) { value = header; } - if (!utils_default.isString(value)) - return; + if (!utils_default.isString(value)) return; if (utils_default.isString(filter2)) { return value.indexOf(filter2) !== -1; } @@ -14568,8 +14617,9 @@ function combineURLs(baseURL, relativeURL) { } // node_modules/axios/lib/core/buildFullPath.js -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; @@ -14584,7 +14634,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1); var import_zlib = __toESM(require("zlib"), 1); // node_modules/axios/lib/env/data.js -var VERSION = "1.7.5"; +var VERSION = "1.8.4"; // node_modules/axios/lib/helpers/parseProtocol.js function parseProtocol(url2) { @@ -14743,7 +14793,7 @@ var AxiosTransformStream_default = AxiosTransformStream; var import_events = require("events"); // node_modules/axios/lib/helpers/formDataToStream.js -var import_util = require("util"); +var import_util = __toESM(require("util"), 1); var import_stream2 = require("stream"); // node_modules/axios/lib/helpers/readBlob.js @@ -14762,8 +14812,8 @@ var readBlob = async function* (blob) { var readBlob_default = readBlob; // node_modules/axios/lib/helpers/formDataToStream.js -var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_"; -var textEncoder = new import_util.TextEncoder(); +var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_"; +var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new import_util.default.TextEncoder(); var CRLF = "\r\n"; var CRLF_BYTES = textEncoder.encode(CRLF); var CRLF_BYTES_COUNT = 2; @@ -14805,7 +14855,7 @@ var formDataToStream = (form, headersHandler, options) => { const { tag = "form-data-boundary", size = 25, - boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET) + boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {}; if (!utils_default.isFormData(form)) { throw TypeError("FormData instance required"); @@ -15013,7 +15063,7 @@ function dispatchBeforeRedirect(options, responseDetails) { function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { - const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location); + const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); } @@ -15049,8 +15099,7 @@ var wrapAsync = (asyncExecutor) => { let onDone; let isDone; const done = (value, isRejected) => { - if (isDone) - return; + if (isDone) return; isDone = true; onDone && onDone(value, isRejected); }; @@ -15122,7 +15171,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort); } } - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0); const protocol = parsed.protocol || supportedProtocols[0]; if (protocol === "data:") { @@ -15188,7 +15237,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { } catch (e) { } } - } else if (utils_default.isBlob(data)) { + } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { data.size && headers.setContentType(data.type || "application/octet-stream"); headers.setContentLength(data.size || 0); data = import_stream4.default.Readable.from(readBlob_default(data)); @@ -15282,7 +15331,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { if (config.socketPath) { options.socketPath = config.socketPath; } else { - options.hostname = parsed.hostname; + options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; options.port = parsed.port; setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path); } @@ -15311,8 +15360,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { options.insecureHTTPParser = config.insecureHTTPParser; } req = transport.request(options, function handleResponse(res) { - if (req.destroyed) - return; + if (req.destroyed) return; const streams = [res]; const responseLength = +res.headers["content-length"]; if (onDownloadProgress || maxDownloadRate) { @@ -15335,6 +15383,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { delete res.headers["content-encoding"]; } switch ((res.headers["content-encoding"] || "").toLowerCase()) { + /*eslint default-case:0*/ case "gzip": case "x-gzip": case "compress": @@ -15391,7 +15440,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { return; } const err = new AxiosError_default( - "maxContentLength size of " + config.maxContentLength + " exceeded", + "stream has been aborted", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest @@ -15400,8 +15449,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { reject(err); }); responseStream.on("error", function handleStreamError(err) { - if (req.destroyed) - return; + if (req.destroyed) return; reject(AxiosError_default.from(err, null, config, lastRequest)); }); responseStream.on("end", function handleStreamEnd() { @@ -15449,8 +15497,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { return; } req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) - return; + if (isDone) return; let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded"; const transitional2 = config.transitional || transitional_default; if (config.timeoutErrorMessage) { @@ -15488,72 +15535,53 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) { }; // node_modules/axios/lib/helpers/isURLSameOrigin.js -var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() { - const msie = platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent); - const urlParsingNode = document.createElement("a"); - let originURL; - function resolveURL(url2) { - let href = url2; - if (msie) { - urlParsingNode.setAttribute("href", href); - href = urlParsingNode.href; - } - urlParsingNode.setAttribute("href", href); - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "", - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "", - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "", - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname - }; - } - originURL = resolveURL(window.location.href); - return function isURLSameOrigin(requestURL) { - const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL; - return parsed.protocol === originURL.protocol && parsed.host === originURL.host; - }; -}() : function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; -}(); +var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => { + url2 = new URL(url2, platform_default.origin); + return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port); +})( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) +) : () => true; // node_modules/axios/lib/helpers/cookies.js -var cookies_default = platform_default.hasStandardBrowserEnv ? { - write(name, value, expires, path, domain, secure) { - const cookie = [name + "=" + encodeURIComponent(value)]; - utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); - utils_default.isString(path) && cookie.push("path=" + path); - utils_default.isString(domain) && cookie.push("domain=" + domain); - secure === true && cookie.push("secure"); - document.cookie = cookie.join("; "); - }, - read(name) { - const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); - return match ? decodeURIComponent(match[3]) : null; - }, - remove(name) { - this.write(name, "", Date.now() - 864e5); +var cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + "=" + encodeURIComponent(value)]; + utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString()); + utils_default.isString(path) && cookie.push("path=" + path); + utils_default.isString(domain) && cookie.push("domain=" + domain); + secure === true && cookie.push("secure"); + document.cookie = cookie.join("; "); + }, + read(name) { + const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)")); + return match ? decodeURIComponent(match[3]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5); + } } -} : { - write() { - }, - read() { - return null; - }, - remove() { +) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } } -}; +); // node_modules/axios/lib/core/mergeConfig.js var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing; function mergeConfig(config1, config2) { config2 = config2 || {}; const config = {}; - function getMergedValue(target, source, caseless) { + function getMergedValue(target, source, prop, caseless) { if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { return utils_default.merge.call({ caseless }, target, source); } else if (utils_default.isPlainObject(source)) { @@ -15563,11 +15591,11 @@ function mergeConfig(config1, config2) { } return source; } - function mergeDeepProperties(a, b, caseless) { + function mergeDeepProperties(a, b, prop, caseless) { if (!utils_default.isUndefined(b)) { - return getMergedValue(a, b, caseless); + return getMergedValue(a, b, prop, caseless); } else if (!utils_default.isUndefined(a)) { - return getMergedValue(void 0, a, caseless); + return getMergedValue(void 0, a, prop, caseless); } } function valueFromConfig2(a, b) { @@ -15618,7 +15646,7 @@ function mergeConfig(config1, config2) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) }; utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; @@ -15633,7 +15661,7 @@ var resolveConfig_default = (config) => { const newConfig = mergeConfig({}, config); let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; newConfig.headers = headers = AxiosHeaders_default.from(headers); - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer); if (auth) { headers.set( "Authorization", @@ -15790,36 +15818,37 @@ var xhr_default = isXHRAdapterSupported && function(config) { // node_modules/axios/lib/helpers/composeSignals.js var composeSignals = (signals, timeout) => { - let controller = new AbortController(); - let aborted; - const onabort = function(cancel) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = cancel instanceof Error ? cancel : this.reason; - controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); - } - }; - let timer = timeout && setTimeout(() => { - onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); - }, timeout); - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted; + const onabort = function(reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)); + } + }; + let timer = timeout && setTimeout(() => { timer = null; - signals.forEach((signal2) => { - signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort)); - }); - signals = null; - } - }; - signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort)); - const { signal } = controller; - signal.unsubscribe = unsubscribe; - return [signal, () => { - timer && clearTimeout(timer); - timer = null; - }]; + onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }; + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; + } }; var composeSignals_default = composeSignals; @@ -15838,13 +15867,31 @@ var streamChunk = function* (chunk, chunkSize) { pos = end; } }; -var readBytes = async function* (iterable, chunkSize, encode3) { - for await (const chunk of iterable) { - yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize); +var readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; +var readStream = async function* (stream4) { + if (stream4[Symbol.asyncIterator]) { + yield* stream4; + return; + } + const reader = stream4.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); } }; -var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => { - const iterator = readBytes(stream4, chunkSize, encode3); +var trackStream = (stream4, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream4, chunkSize); let bytes = 0; let done; let _onFinish = (e) => { @@ -15885,7 +15932,7 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => { // node_modules/axios/lib/adapters/fetch.js var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function"; var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function"; -var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); +var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer())); var test = (fn, ...args) => { try { return !!fn(...args); @@ -15925,7 +15972,11 @@ var getBodyLength = async (body) => { return body.size; } if (utils_default.isSpecCompliantForm(body)) { - return (await new Request(body).arrayBuffer()).byteLength; + const _request = new Request(platform_default.origin, { + method: "POST", + body + }); + return (await _request.arrayBuffer()).byteLength; } if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { return body.byteLength; @@ -15957,14 +16008,11 @@ var fetch_default = isFetchSupported && (async (config) => { fetchOptions } = resolveConfig_default(config); responseType = responseType ? (responseType + "").toLowerCase() : "text"; - let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : []; - let finished, request; - const onFinish = () => { - !finished && setTimeout(() => { - composedSignal && composedSignal.unsubscribe(); - }); - finished = true; - }; + let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + let request; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); let requestContentLength; try { if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { @@ -15982,7 +16030,7 @@ var fetch_default = isFetchSupported && (async (config) => { requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)) ); - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); } } if (!utils_default.isString(withCredentials)) { @@ -16000,7 +16048,7 @@ var fetch_default = isFetchSupported && (async (config) => { }); let response = await fetch(request); const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); - if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) { + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { const options = {}; ["status", "statusText", "headers"].forEach((prop) => { options[prop] = response[prop]; @@ -16013,15 +16061,14 @@ var fetch_default = isFetchSupported && (async (config) => { response = new Response( trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { flush && flush(); - isStreamResponse && onFinish(); - }, encodeText), + unsubscribe && unsubscribe(); + }), options ); } responseType = responseType || "text"; let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config); - !isStreamResponse && onFinish(); - stopTimeout && stopTimeout(); + !isStreamResponse && unsubscribe && unsubscribe(); return await new Promise((resolve, reject) => { settle(resolve, reject, { data: responseData, @@ -16033,7 +16080,7 @@ var fetch_default = isFetchSupported && (async (config) => { }); }); } catch (err) { - onFinish(); + unsubscribe && unsubscribe(); if (err && err.name === "TypeError" && /fetch/i.test(err.message)) { throw Object.assign( new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), @@ -16176,6 +16223,12 @@ validators.transitional = function transitional(validator, version, message) { return validator ? validator(value, opt, opts) : true; }; }; +validators.spelling = function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; function assertOptions(options, schema, allowUnknown) { if (typeof options !== "object") { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); @@ -16213,13 +16266,21 @@ var Axios = class { response: new InterceptorManager_default() }; } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ async request(configOrUrl, config) { try { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { - let dummy; - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error(); + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; try { if (!err.stack) { @@ -16261,6 +16322,16 @@ var Axios = class { }, true); } } + if (config.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + validator_default.assertOptions(config, { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, true); config.method = (config.method || this.defaults.method || "get").toLowerCase(); let contextHeaders = headers && utils_default.merge( headers.common, @@ -16327,7 +16398,7 @@ var Axios = class { } getUri(config) { config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } }; @@ -16359,7 +16430,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m var Axios_default = Axios; // node_modules/axios/lib/cancel/CancelToken.js -var CancelToken = class { +var CancelToken = class _CancelToken { constructor(executor) { if (typeof executor !== "function") { throw new TypeError("executor must be a function."); @@ -16370,8 +16441,7 @@ var CancelToken = class { }); const token = this; this.promise.then((cancel) => { - if (!token._listeners) - return; + if (!token._listeners) return; let i = token._listeners.length; while (i-- > 0) { token._listeners[i](cancel); @@ -16397,11 +16467,17 @@ var CancelToken = class { resolvePromise(token.reason); }); } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ throwIfRequested() { if (this.reason) { throw this.reason; } } + /** + * Subscribe to the cancel signal + */ subscribe(listener) { if (this.reason) { listener(this.reason); @@ -16413,6 +16489,9 @@ var CancelToken = class { this._listeners = [listener]; } } + /** + * Unsubscribe from the cancel signal + */ unsubscribe(listener) { if (!this._listeners) { return; @@ -16422,9 +16501,22 @@ var CancelToken = class { this._listeners.splice(index, 1); } } + toAbortSignal() { + const controller = new AbortController(); + const abort = (err) => { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = () => this.unsubscribe(abort); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ static source() { let cancel; - const token = new CancelToken(function executor(c) { + const token = new _CancelToken(function executor(c) { cancel = c; }); return { @@ -16572,563 +16664,709 @@ var { } = axios_default; // model/accountCreateRequest.ts -var _AccountCreateRequest = class { +var AccountCreateRequest = class _AccountCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountCreateRequest"); } }; -var AccountCreateRequest = _AccountCreateRequest; -AccountCreateRequest.discriminator = void 0; -AccountCreateRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - } -]; // model/accountCreateResponse.ts -var _AccountCreateResponse = class { +var AccountCreateResponse = class _AccountCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "oauthData", + baseName: "oauth_data", + type: "OAuthTokenResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountCreateResponse"); } }; -var AccountCreateResponse = _AccountCreateResponse; -AccountCreateResponse.discriminator = void 0; -AccountCreateResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "oauthData", - baseName: "oauth_data", - type: "OAuthTokenResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountGetResponse.ts -var _AccountGetResponse = class { +var AccountGetResponse = class _AccountGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountGetResponse"); } }; -var AccountGetResponse = _AccountGetResponse; -AccountGetResponse.discriminator = void 0; -AccountGetResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountResponse.ts -var _AccountResponse = class { +var AccountResponse = class _AccountResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "isPaidHs", + baseName: "is_paid_hs", + type: "boolean" + }, + { + name: "isPaidHf", + baseName: "is_paid_hf", + type: "boolean" + }, + { + name: "quotas", + baseName: "quotas", + type: "AccountResponseQuotas" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "roleCode", + baseName: "role_code", + type: "string" + }, + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + }, + { + name: "usage", + baseName: "usage", + type: "AccountResponseUsage" + } + ]; + } static getAttributeTypeMap() { return _AccountResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponse"); } }; -var AccountResponse = _AccountResponse; -AccountResponse.discriminator = void 0; -AccountResponse.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "isPaidHs", - baseName: "is_paid_hs", - type: "boolean" - }, - { - name: "isPaidHf", - baseName: "is_paid_hf", - type: "boolean" - }, - { - name: "quotas", - baseName: "quotas", - type: "AccountResponseQuotas" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "roleCode", - baseName: "role_code", - type: "string" - }, - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - }, - { - name: "usage", - baseName: "usage", - type: "AccountResponseUsage" - } -]; // model/accountResponseQuotas.ts -var _AccountResponseQuotas = class { +var AccountResponseQuotas = class _AccountResponseQuotas { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiSignatureRequestsLeft", + baseName: "api_signature_requests_left", + type: "number" + }, + { + name: "documentsLeft", + baseName: "documents_left", + type: "number" + }, + { + name: "templatesTotal", + baseName: "templates_total", + type: "number" + }, + { + name: "templatesLeft", + baseName: "templates_left", + type: "number" + }, + { + name: "smsVerificationsLeft", + baseName: "sms_verifications_left", + type: "number" + }, + { + name: "numFaxPagesLeft", + baseName: "num_fax_pages_left", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _AccountResponseQuotas.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponseQuotas"); } }; -var AccountResponseQuotas = _AccountResponseQuotas; -AccountResponseQuotas.discriminator = void 0; -AccountResponseQuotas.attributeTypeMap = [ - { - name: "apiSignatureRequestsLeft", - baseName: "api_signature_requests_left", - type: "number" - }, - { - name: "documentsLeft", - baseName: "documents_left", - type: "number" - }, - { - name: "templatesTotal", - baseName: "templates_total", - type: "number" - }, - { - name: "templatesLeft", - baseName: "templates_left", - type: "number" - }, - { - name: "smsVerificationsLeft", - baseName: "sms_verifications_left", - type: "number" - }, - { - name: "numFaxPagesLeft", - baseName: "num_fax_pages_left", - type: "number" - } -]; // model/accountResponseUsage.ts -var _AccountResponseUsage = class { +var AccountResponseUsage = class _AccountResponseUsage { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxPagesSent", + baseName: "fax_pages_sent", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _AccountResponseUsage.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountResponseUsage"); } }; -var AccountResponseUsage = _AccountResponseUsage; -AccountResponseUsage.discriminator = void 0; -AccountResponseUsage.attributeTypeMap = [ - { - name: "faxPagesSent", - baseName: "fax_pages_sent", - type: "number" - } -]; // model/accountUpdateRequest.ts -var _AccountUpdateRequest = class { +var AccountUpdateRequest = class _AccountUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "locale", + baseName: "locale", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountUpdateRequest"); } }; -var AccountUpdateRequest = _AccountUpdateRequest; -AccountUpdateRequest.discriminator = void 0; -AccountUpdateRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "locale", - baseName: "locale", - type: "string" - } -]; // model/accountVerifyRequest.ts -var _AccountVerifyRequest = class { +var AccountVerifyRequest = class _AccountVerifyRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyRequest"); } }; -var AccountVerifyRequest = _AccountVerifyRequest; -AccountVerifyRequest.discriminator = void 0; -AccountVerifyRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/accountVerifyResponse.ts -var _AccountVerifyResponse = class { +var AccountVerifyResponse = class _AccountVerifyResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "account", + baseName: "account", + type: "AccountVerifyResponseAccount" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyResponse"); } }; -var AccountVerifyResponse = _AccountVerifyResponse; -AccountVerifyResponse.discriminator = void 0; -AccountVerifyResponse.attributeTypeMap = [ - { - name: "account", - baseName: "account", - type: "AccountVerifyResponseAccount" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/accountVerifyResponseAccount.ts -var _AccountVerifyResponseAccount = class { +var AccountVerifyResponseAccount = class _AccountVerifyResponseAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _AccountVerifyResponseAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "AccountVerifyResponseAccount"); } }; -var AccountVerifyResponseAccount = _AccountVerifyResponseAccount; -AccountVerifyResponseAccount.discriminator = void 0; -AccountVerifyResponseAccount.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/apiAppCreateRequest.ts -var _ApiAppCreateRequest = class { +var ApiAppCreateRequest = class _ApiAppCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "customLogoFile", + baseName: "custom_logo_file", + type: "RequestFile" + }, + { + name: "oauth", + baseName: "oauth", + type: "SubOAuth" + }, + { + name: "options", + baseName: "options", + type: "SubOptions" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "SubWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppCreateRequest"); } }; -var ApiAppCreateRequest = _ApiAppCreateRequest; -ApiAppCreateRequest.discriminator = void 0; -ApiAppCreateRequest.attributeTypeMap = [ - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "customLogoFile", - baseName: "custom_logo_file", - type: "RequestFile" - }, - { - name: "oauth", - baseName: "oauth", - type: "SubOAuth" - }, - { - name: "options", - baseName: "options", - type: "SubOptions" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "SubWhiteLabelingOptions" - } -]; // model/apiAppGetResponse.ts -var _ApiAppGetResponse = class { +var ApiAppGetResponse = class _ApiAppGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiApp", + baseName: "api_app", + type: "ApiAppResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ApiAppGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppGetResponse"); } }; -var ApiAppGetResponse = _ApiAppGetResponse; -ApiAppGetResponse.discriminator = void 0; -ApiAppGetResponse.attributeTypeMap = [ - { - name: "apiApp", - baseName: "api_app", - type: "ApiAppResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/apiAppListResponse.ts -var _ApiAppListResponse = class { +var ApiAppListResponse = class _ApiAppListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiApps", + baseName: "api_apps", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ApiAppListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppListResponse"); } }; -var ApiAppListResponse = _ApiAppListResponse; -ApiAppListResponse.discriminator = void 0; -ApiAppListResponse.attributeTypeMap = [ - { - name: "apiApps", - baseName: "api_apps", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/apiAppResponse.ts -var _ApiAppResponse = class { +var ApiAppResponse = class _ApiAppResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "isApproved", + baseName: "is_approved", + type: "boolean" + }, + { + name: "oauth", + baseName: "oauth", + type: "ApiAppResponseOAuth" + }, + { + name: "options", + baseName: "options", + type: "ApiAppResponseOptions" + }, + { + name: "ownerAccount", + baseName: "owner_account", + type: "ApiAppResponseOwnerAccount" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "ApiAppResponseWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponse"); } }; -var ApiAppResponse = _ApiAppResponse; -ApiAppResponse.discriminator = void 0; -ApiAppResponse.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "isApproved", - baseName: "is_approved", - type: "boolean" - }, - { - name: "oauth", - baseName: "oauth", - type: "ApiAppResponseOAuth" - }, - { - name: "options", - baseName: "options", - type: "ApiAppResponseOptions" - }, - { - name: "ownerAccount", - baseName: "owner_account", - type: "ApiAppResponseOwnerAccount" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "ApiAppResponseWhiteLabelingOptions" - } -]; // model/apiAppResponseOAuth.ts -var _ApiAppResponseOAuth = class { +var ApiAppResponseOAuth = class _ApiAppResponseOAuth { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "secret", + baseName: "secret", + type: "string" + }, + { + name: "scopes", + baseName: "scopes", + type: "Array" + }, + { + name: "chargesUsers", + baseName: "charges_users", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOAuth.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOAuth"); } }; -var ApiAppResponseOAuth = _ApiAppResponseOAuth; -ApiAppResponseOAuth.discriminator = void 0; -ApiAppResponseOAuth.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "secret", - baseName: "secret", - type: "string" - }, - { - name: "scopes", - baseName: "scopes", - type: "Array" - }, - { - name: "chargesUsers", - baseName: "charges_users", - type: "boolean" - } -]; // model/apiAppResponseOptions.ts -var _ApiAppResponseOptions = class { +var ApiAppResponseOptions = class _ApiAppResponseOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "canInsertEverywhere", + baseName: "can_insert_everywhere", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOptions"); } }; -var ApiAppResponseOptions = _ApiAppResponseOptions; -ApiAppResponseOptions.discriminator = void 0; -ApiAppResponseOptions.attributeTypeMap = [ - { - name: "canInsertEverywhere", - baseName: "can_insert_everywhere", - type: "boolean" - } -]; // model/apiAppResponseOwnerAccount.ts -var _ApiAppResponseOwnerAccount = class { +var ApiAppResponseOwnerAccount = class _ApiAppResponseOwnerAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseOwnerAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppResponseOwnerAccount"); } }; -var ApiAppResponseOwnerAccount = _ApiAppResponseOwnerAccount; -ApiAppResponseOwnerAccount.discriminator = void 0; -ApiAppResponseOwnerAccount.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/apiAppResponseWhiteLabelingOptions.ts -var _ApiAppResponseWhiteLabelingOptions = class { +var ApiAppResponseWhiteLabelingOptions = class _ApiAppResponseWhiteLabelingOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "headerBackgroundColor", + baseName: "header_background_color", + type: "string" + }, + { + name: "legalVersion", + baseName: "legal_version", + type: "string" + }, + { + name: "linkColor", + baseName: "link_color", + type: "string" + }, + { + name: "pageBackgroundColor", + baseName: "page_background_color", + type: "string" + }, + { + name: "primaryButtonColor", + baseName: "primary_button_color", + type: "string" + }, + { + name: "primaryButtonColorHover", + baseName: "primary_button_color_hover", + type: "string" + }, + { + name: "primaryButtonTextColor", + baseName: "primary_button_text_color", + type: "string" + }, + { + name: "primaryButtonTextColorHover", + baseName: "primary_button_text_color_hover", + type: "string" + }, + { + name: "secondaryButtonColor", + baseName: "secondary_button_color", + type: "string" + }, + { + name: "secondaryButtonColorHover", + baseName: "secondary_button_color_hover", + type: "string" + }, + { + name: "secondaryButtonTextColor", + baseName: "secondary_button_text_color", + type: "string" + }, + { + name: "secondaryButtonTextColorHover", + baseName: "secondary_button_text_color_hover", + type: "string" + }, + { + name: "textColor1", + baseName: "text_color1", + type: "string" + }, + { + name: "textColor2", + baseName: "text_color2", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ApiAppResponseWhiteLabelingOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17136,172 +17374,242 @@ var _ApiAppResponseWhiteLabelingOptions = class { ); } }; -var ApiAppResponseWhiteLabelingOptions = _ApiAppResponseWhiteLabelingOptions; -ApiAppResponseWhiteLabelingOptions.discriminator = void 0; -ApiAppResponseWhiteLabelingOptions.attributeTypeMap = [ - { - name: "headerBackgroundColor", - baseName: "header_background_color", - type: "string" - }, - { - name: "legalVersion", - baseName: "legal_version", - type: "string" - }, - { - name: "linkColor", - baseName: "link_color", - type: "string" - }, - { - name: "pageBackgroundColor", - baseName: "page_background_color", - type: "string" - }, - { - name: "primaryButtonColor", - baseName: "primary_button_color", - type: "string" - }, - { - name: "primaryButtonColorHover", - baseName: "primary_button_color_hover", - type: "string" - }, - { - name: "primaryButtonTextColor", - baseName: "primary_button_text_color", - type: "string" - }, - { - name: "primaryButtonTextColorHover", - baseName: "primary_button_text_color_hover", - type: "string" - }, - { - name: "secondaryButtonColor", - baseName: "secondary_button_color", - type: "string" - }, - { - name: "secondaryButtonColorHover", - baseName: "secondary_button_color_hover", - type: "string" - }, - { - name: "secondaryButtonTextColor", - baseName: "secondary_button_text_color", - type: "string" - }, - { - name: "secondaryButtonTextColorHover", - baseName: "secondary_button_text_color_hover", - type: "string" - }, - { - name: "textColor1", - baseName: "text_color1", - type: "string" - }, - { - name: "textColor2", - baseName: "text_color2", - type: "string" - } -]; // model/apiAppUpdateRequest.ts -var _ApiAppUpdateRequest = class { +var ApiAppUpdateRequest = class _ApiAppUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "customLogoFile", + baseName: "custom_logo_file", + type: "RequestFile" + }, + { + name: "domains", + baseName: "domains", + type: "Array" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "oauth", + baseName: "oauth", + type: "SubOAuth" + }, + { + name: "options", + baseName: "options", + type: "SubOptions" + }, + { + name: "whiteLabelingOptions", + baseName: "white_labeling_options", + type: "SubWhiteLabelingOptions" + } + ]; + } static getAttributeTypeMap() { return _ApiAppUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ApiAppUpdateRequest"); } }; -var ApiAppUpdateRequest = _ApiAppUpdateRequest; -ApiAppUpdateRequest.discriminator = void 0; -ApiAppUpdateRequest.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "customLogoFile", - baseName: "custom_logo_file", - type: "RequestFile" - }, - { - name: "domains", - baseName: "domains", - type: "Array" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "oauth", - baseName: "oauth", - type: "SubOAuth" - }, - { - name: "options", - baseName: "options", - type: "SubOptions" - }, - { - name: "whiteLabelingOptions", - baseName: "white_labeling_options", - type: "SubWhiteLabelingOptions" - } -]; // model/bulkSendJobGetResponse.ts -var _BulkSendJobGetResponse = class { +var BulkSendJobGetResponse = class _BulkSendJobGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJob", + baseName: "bulk_send_job", + type: "BulkSendJobResponse" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "signatureRequests", + baseName: "signature_requests", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobGetResponse"); } }; -var BulkSendJobGetResponse = _BulkSendJobGetResponse; -BulkSendJobGetResponse.discriminator = void 0; -BulkSendJobGetResponse.attributeTypeMap = [ - { - name: "bulkSendJob", - baseName: "bulk_send_job", - type: "BulkSendJobResponse" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "signatureRequests", - baseName: "signature_requests", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/bulkSendJobGetResponseSignatureRequests.ts -var _BulkSendJobGetResponseSignatureRequests = class { +var BulkSendJobGetResponseSignatureRequests = class _BulkSendJobGetResponseSignatureRequests { constructor() { + /** + * Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "isComplete", + baseName: "is_complete", + type: "boolean" + }, + { + name: "isDeclined", + baseName: "is_declined", + type: "boolean" + }, + { + name: "hasError", + baseName: "has_error", + type: "boolean" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "signingUrl", + baseName: "signing_url", + type: "string" + }, + { + name: "detailsUrl", + baseName: "details_url", + type: "string" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "responseData", + baseName: "response_data", + type: "Array" + }, + { + name: "signatures", + baseName: "signatures", + type: "Array" + }, + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobGetResponseSignatureRequests.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17309,325 +17617,255 @@ var _BulkSendJobGetResponseSignatureRequests = class { ); } }; -var BulkSendJobGetResponseSignatureRequests = _BulkSendJobGetResponseSignatureRequests; -BulkSendJobGetResponseSignatureRequests.discriminator = void 0; -BulkSendJobGetResponseSignatureRequests.attributeTypeMap = [ - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "isComplete", - baseName: "is_complete", - type: "boolean" - }, - { - name: "isDeclined", - baseName: "is_declined", - type: "boolean" - }, - { - name: "hasError", - baseName: "has_error", - type: "boolean" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "signingUrl", - baseName: "signing_url", - type: "string" - }, - { - name: "detailsUrl", - baseName: "details_url", - type: "string" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "responseData", - baseName: "response_data", - type: "Array" - }, - { - name: "signatures", - baseName: "signatures", - type: "Array" - }, - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - } -]; // model/bulkSendJobListResponse.ts -var _BulkSendJobListResponse = class { +var BulkSendJobListResponse = class _BulkSendJobListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJobs", + baseName: "bulk_send_jobs", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobListResponse"); } }; -var BulkSendJobListResponse = _BulkSendJobListResponse; -BulkSendJobListResponse.discriminator = void 0; -BulkSendJobListResponse.attributeTypeMap = [ - { - name: "bulkSendJobs", - baseName: "bulk_send_jobs", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/bulkSendJobResponse.ts -var _BulkSendJobResponse = class { +var BulkSendJobResponse = class _BulkSendJobResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + }, + { + name: "total", + baseName: "total", + type: "number" + }, + { + name: "isCreator", + baseName: "is_creator", + type: "boolean" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobResponse"); } }; -var BulkSendJobResponse = _BulkSendJobResponse; -BulkSendJobResponse.discriminator = void 0; -BulkSendJobResponse.attributeTypeMap = [ - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - }, - { - name: "total", - baseName: "total", - type: "number" - }, - { - name: "isCreator", - baseName: "is_creator", - type: "boolean" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - } -]; // model/bulkSendJobSendResponse.ts -var _BulkSendJobSendResponse = class { +var BulkSendJobSendResponse = class _BulkSendJobSendResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "bulkSendJob", + baseName: "bulk_send_job", + type: "BulkSendJobResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _BulkSendJobSendResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "BulkSendJobSendResponse"); } }; -var BulkSendJobSendResponse = _BulkSendJobSendResponse; -BulkSendJobSendResponse.discriminator = void 0; -BulkSendJobSendResponse.attributeTypeMap = [ - { - name: "bulkSendJob", - baseName: "bulk_send_job", - type: "BulkSendJobResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedEditUrlRequest.ts -var _EmbeddedEditUrlRequest = class { +var EmbeddedEditUrlRequest = class _EmbeddedEditUrlRequest { constructor() { + /** + * This allows the requester to enable/disable to add or change CC roles when editing the template. + */ this["allowEditCcs"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * This allows the requester to enable the preview experience (i.e. does not allow the requester\'s end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set). + */ this["previewOnly"] = false; + /** + * This allows the requester to enable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "allowEditCcs", + baseName: "allow_edit_ccs", + type: "boolean" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "previewOnly", + baseName: "preview_only", + type: "boolean" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedEditUrlRequest"); } }; -var EmbeddedEditUrlRequest = _EmbeddedEditUrlRequest; -EmbeddedEditUrlRequest.discriminator = void 0; -EmbeddedEditUrlRequest.attributeTypeMap = [ - { - name: "allowEditCcs", - baseName: "allow_edit_ccs", - type: "boolean" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "previewOnly", - baseName: "preview_only", - type: "boolean" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/embeddedEditUrlResponse.ts -var _EmbeddedEditUrlResponse = class { +var EmbeddedEditUrlResponse = class _EmbeddedEditUrlResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "embedded", + baseName: "embedded", + type: "EmbeddedEditUrlResponseEmbedded" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedEditUrlResponse"); } }; -var EmbeddedEditUrlResponse = _EmbeddedEditUrlResponse; -EmbeddedEditUrlResponse.discriminator = void 0; -EmbeddedEditUrlResponse.attributeTypeMap = [ - { - name: "embedded", - baseName: "embedded", - type: "EmbeddedEditUrlResponseEmbedded" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedEditUrlResponseEmbedded.ts -var _EmbeddedEditUrlResponseEmbedded = class { +var EmbeddedEditUrlResponseEmbedded = class _EmbeddedEditUrlResponseEmbedded { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "editUrl", + baseName: "edit_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedEditUrlResponseEmbedded.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17635,50 +17873,58 @@ var _EmbeddedEditUrlResponseEmbedded = class { ); } }; -var EmbeddedEditUrlResponseEmbedded = _EmbeddedEditUrlResponseEmbedded; -EmbeddedEditUrlResponseEmbedded.discriminator = void 0; -EmbeddedEditUrlResponseEmbedded.attributeTypeMap = [ - { - name: "editUrl", - baseName: "edit_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/embeddedSignUrlResponse.ts -var _EmbeddedSignUrlResponse = class { +var EmbeddedSignUrlResponse = class _EmbeddedSignUrlResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "embedded", + baseName: "embedded", + type: "EmbeddedSignUrlResponseEmbedded" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _EmbeddedSignUrlResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EmbeddedSignUrlResponse"); } }; -var EmbeddedSignUrlResponse = _EmbeddedSignUrlResponse; -EmbeddedSignUrlResponse.discriminator = void 0; -EmbeddedSignUrlResponse.attributeTypeMap = [ - { - name: "embedded", - baseName: "embedded", - type: "EmbeddedSignUrlResponseEmbedded" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/embeddedSignUrlResponseEmbedded.ts -var _EmbeddedSignUrlResponseEmbedded = class { - static getAttributeTypeMap() { +var EmbeddedSignUrlResponseEmbedded = class _EmbeddedSignUrlResponseEmbedded { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signUrl", + baseName: "sign_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } + static getAttributeTypeMap() { return _EmbeddedSignUrlResponseEmbedded.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17686,157 +17932,173 @@ var _EmbeddedSignUrlResponseEmbedded = class { ); } }; -var EmbeddedSignUrlResponseEmbedded = _EmbeddedSignUrlResponseEmbedded; -EmbeddedSignUrlResponseEmbedded.discriminator = void 0; -EmbeddedSignUrlResponseEmbedded.attributeTypeMap = [ - { - name: "signUrl", - baseName: "sign_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/errorResponse.ts -var _ErrorResponse = class { +var ErrorResponse = class _ErrorResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "error", + baseName: "error", + type: "ErrorResponseError" + } + ]; + } static getAttributeTypeMap() { return _ErrorResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ErrorResponse"); } }; -var ErrorResponse = _ErrorResponse; -ErrorResponse.discriminator = void 0; -ErrorResponse.attributeTypeMap = [ - { - name: "error", - baseName: "error", - type: "ErrorResponseError" - } -]; // model/errorResponseError.ts -var _ErrorResponseError = class { +var ErrorResponseError = class _ErrorResponseError { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "errorMsg", + baseName: "error_msg", + type: "string" + }, + { + name: "errorName", + baseName: "error_name", + type: "string" + }, + { + name: "errorPath", + baseName: "error_path", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ErrorResponseError.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ErrorResponseError"); } }; -var ErrorResponseError = _ErrorResponseError; -ErrorResponseError.discriminator = void 0; -ErrorResponseError.attributeTypeMap = [ - { - name: "errorMsg", - baseName: "error_msg", - type: "string" - }, - { - name: "errorName", - baseName: "error_name", - type: "string" - }, - { - name: "errorPath", - baseName: "error_path", - type: "string" - } -]; // model/eventCallbackHelper.ts -var crypto = __toESM(require("crypto")); -var _EventCallbackHelper = class { -}; -var EventCallbackHelper = _EventCallbackHelper; -EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; -EventCallbackHelper.EVENT_TYPE_APP_CALLBACK = "app_callback"; -EventCallbackHelper.isValid = (apiKey, eventCallback) => { - const hmac = crypto.createHmac("sha256", apiKey); - hmac.update( - `${eventCallback.event.eventTime}${eventCallback.event.eventType}` - ); - return eventCallback.event.eventHash === hmac.digest("hex").toString(); -}; -EventCallbackHelper.getCallbackType = (eventCallback) => { - if (!eventCallback.event.eventMetadata || !eventCallback.event.eventMetadata.reportedForAppId) { - return _EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; +var crypto2 = __toESM(require("crypto")); +var EventCallbackHelper = class _EventCallbackHelper { + static { + this.EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; + } + static { + this.EVENT_TYPE_APP_CALLBACK = "app_callback"; + } + static { + /** + * Verify that callback came from HelloSign.com + */ + this.isValid = (apiKey, eventCallback) => { + const hmac = crypto2.createHmac("sha256", apiKey); + hmac.update( + `${eventCallback.event.eventTime}${eventCallback.event.eventType}` + ); + return eventCallback.event.eventHash === hmac.digest("hex").toString(); + }; + } + static { + /** + * Identifies the callback type, one of "account_callback" or "app_callback". + * "app_callback" will always include a value for "reported_for_app_id" + */ + this.getCallbackType = (eventCallback) => { + if (!eventCallback.event.eventMetadata || !eventCallback.event.eventMetadata.reportedForAppId) { + return _EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; + } + return _EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; + }; } - return _EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; }; // model/eventCallbackRequest.ts -var _EventCallbackRequest = class { +var EventCallbackRequest = class _EventCallbackRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "event", + baseName: "event", + type: "EventCallbackRequestEvent" + }, + { + name: "account", + baseName: "account", + type: "AccountResponse" + }, + { + name: "signatureRequest", + baseName: "signature_request", + type: "SignatureRequestResponse" + }, + { + name: "template", + baseName: "template", + type: "TemplateResponse" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EventCallbackRequest"); } }; -var EventCallbackRequest = _EventCallbackRequest; -EventCallbackRequest.discriminator = void 0; -EventCallbackRequest.attributeTypeMap = [ - { - name: "event", - baseName: "event", - type: "EventCallbackRequestEvent" - }, - { - name: "account", - baseName: "account", - type: "AccountResponse" - }, - { - name: "signatureRequest", - baseName: "signature_request", - type: "SignatureRequestResponse" - }, - { - name: "template", - baseName: "template", - type: "TemplateResponse" - } -]; // model/eventCallbackRequestEvent.ts -var _EventCallbackRequestEvent = class { +var EventCallbackRequestEvent = class _EventCallbackRequestEvent { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "eventTime", + baseName: "event_time", + type: "string" + }, + { + name: "eventType", + baseName: "event_type", + type: "EventCallbackRequestEvent.EventTypeEnum" + }, + { + name: "eventHash", + baseName: "event_hash", + type: "string" + }, + { + name: "eventMetadata", + baseName: "event_metadata", + type: "EventCallbackRequestEventMetadata" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequestEvent.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "EventCallbackRequestEvent"); } }; -var EventCallbackRequestEvent = _EventCallbackRequestEvent; -EventCallbackRequestEvent.discriminator = void 0; -EventCallbackRequestEvent.attributeTypeMap = [ - { - name: "eventTime", - baseName: "event_time", - type: "string" - }, - { - name: "eventType", - baseName: "event_type", - type: "EventCallbackRequestEvent.EventTypeEnum" - }, - { - name: "eventHash", - baseName: "event_hash", - type: "string" - }, - { - name: "eventMetadata", - baseName: "event_metadata", - type: "EventCallbackRequestEventMetadata" - } -]; ((EventCallbackRequestEvent2) => { let EventTypeEnum; ((EventTypeEnum2) => { @@ -17867,10 +18129,38 @@ EventCallbackRequestEvent.attributeTypeMap = [ })(EventCallbackRequestEvent || (EventCallbackRequestEvent = {})); // model/eventCallbackRequestEventMetadata.ts -var _EventCallbackRequestEventMetadata = class { +var EventCallbackRequestEventMetadata = class _EventCallbackRequestEventMetadata { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "relatedSignatureId", + baseName: "related_signature_id", + type: "string" + }, + { + name: "reportedForAccountId", + baseName: "reported_for_account_id", + type: "string" + }, + { + name: "reportedForAppId", + baseName: "reported_for_app_id", + type: "string" + }, + { + name: "eventMessage", + baseName: "event_message", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _EventCallbackRequestEventMetadata.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -17878,83 +18168,67 @@ var _EventCallbackRequestEventMetadata = class { ); } }; -var EventCallbackRequestEventMetadata = _EventCallbackRequestEventMetadata; -EventCallbackRequestEventMetadata.discriminator = void 0; -EventCallbackRequestEventMetadata.attributeTypeMap = [ - { - name: "relatedSignatureId", - baseName: "related_signature_id", - type: "string" - }, - { - name: "reportedForAccountId", - baseName: "reported_for_account_id", - type: "string" - }, - { - name: "reportedForAppId", - baseName: "reported_for_app_id", - type: "string" - }, - { - name: "eventMessage", - baseName: "event_message", - type: "string" - } -]; // model/faxGetResponse.ts -var _FaxGetResponse = class { +var FaxGetResponse = class _FaxGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "fax", + baseName: "fax", + type: "FaxResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxGetResponse"); } }; -var FaxGetResponse = _FaxGetResponse; -FaxGetResponse.discriminator = void 0; -FaxGetResponse.attributeTypeMap = [ - { - name: "fax", - baseName: "fax", - type: "FaxResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/faxLineAddUserRequest.ts -var _FaxLineAddUserRequest = class { +var FaxLineAddUserRequest = class _FaxLineAddUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineAddUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineAddUserRequest"); } }; -var FaxLineAddUserRequest = _FaxLineAddUserRequest; -FaxLineAddUserRequest.discriminator = void 0; -FaxLineAddUserRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/faxLineAreaCodeGetCountryEnum.ts var FaxLineAreaCodeGetCountryEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetCountryEnum2) => { @@ -17983,23 +18257,27 @@ var FaxLineAreaCodeGetProvinceEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetProvinc })(FaxLineAreaCodeGetProvinceEnum || {}); // model/faxLineAreaCodeGetResponse.ts -var _FaxLineAreaCodeGetResponse = class { +var FaxLineAreaCodeGetResponse = class _FaxLineAreaCodeGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "areaCodes", + baseName: "area_codes", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxLineAreaCodeGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineAreaCodeGetResponse"); } }; -var FaxLineAreaCodeGetResponse = _FaxLineAreaCodeGetResponse; -FaxLineAreaCodeGetResponse.discriminator = void 0; -FaxLineAreaCodeGetResponse.attributeTypeMap = [ - { - name: "areaCodes", - baseName: "area_codes", - type: "Array" - } -]; // model/faxLineAreaCodeGetStateEnum.ts var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2) => { @@ -18058,38 +18336,42 @@ var FaxLineAreaCodeGetStateEnum = /* @__PURE__ */ ((FaxLineAreaCodeGetStateEnum2 })(FaxLineAreaCodeGetStateEnum || {}); // model/faxLineCreateRequest.ts -var _FaxLineCreateRequest = class { +var FaxLineCreateRequest = class _FaxLineCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "areaCode", + baseName: "area_code", + type: "number" + }, + { + name: "country", + baseName: "country", + type: "FaxLineCreateRequest.CountryEnum" + }, + { + name: "city", + baseName: "city", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineCreateRequest"); } }; -var FaxLineCreateRequest = _FaxLineCreateRequest; -FaxLineCreateRequest.discriminator = void 0; -FaxLineCreateRequest.attributeTypeMap = [ - { - name: "areaCode", - baseName: "area_code", - type: "number" - }, - { - name: "country", - baseName: "country", - type: "FaxLineCreateRequest.CountryEnum" - }, - { - name: "city", - baseName: "city", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - } -]; ((FaxLineCreateRequest2) => { let CountryEnum; ((CountryEnum2) => { @@ -18100,261 +18382,293 @@ FaxLineCreateRequest.attributeTypeMap = [ })(FaxLineCreateRequest || (FaxLineCreateRequest = {})); // model/faxLineDeleteRequest.ts -var _FaxLineDeleteRequest = class { +var FaxLineDeleteRequest = class _FaxLineDeleteRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineDeleteRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineDeleteRequest"); } }; -var FaxLineDeleteRequest = _FaxLineDeleteRequest; -FaxLineDeleteRequest.discriminator = void 0; -FaxLineDeleteRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - } -]; // model/faxLineListResponse.ts -var _FaxLineListResponse = class { +var FaxLineListResponse = class _FaxLineListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "faxLines", + baseName: "fax_lines", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxLineListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineListResponse"); } }; -var FaxLineListResponse = _FaxLineListResponse; -FaxLineListResponse.discriminator = void 0; -FaxLineListResponse.attributeTypeMap = [ - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "faxLines", - baseName: "fax_lines", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "WarningResponse" - } -]; // model/faxLineRemoveUserRequest.ts -var _FaxLineRemoveUserRequest = class { +var FaxLineRemoveUserRequest = class _FaxLineRemoveUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxLineRemoveUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineRemoveUserRequest"); } }; -var FaxLineRemoveUserRequest = _FaxLineRemoveUserRequest; -FaxLineRemoveUserRequest.discriminator = void 0; -FaxLineRemoveUserRequest.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/faxLineResponse.ts -var _FaxLineResponse = class { +var FaxLineResponse = class _FaxLineResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxLine", + baseName: "fax_line", + type: "FaxLineResponseFaxLine" + }, + { + name: "warnings", + baseName: "warnings", + type: "WarningResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxLineResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineResponse"); } }; -var FaxLineResponse = _FaxLineResponse; -FaxLineResponse.discriminator = void 0; -FaxLineResponse.attributeTypeMap = [ - { - name: "faxLine", - baseName: "fax_line", - type: "FaxLineResponseFaxLine" - }, - { - name: "warnings", - baseName: "warnings", - type: "WarningResponse" - } -]; // model/faxLineResponseFaxLine.ts -var _FaxLineResponseFaxLine = class { +var FaxLineResponseFaxLine = class _FaxLineResponseFaxLine { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "number", + baseName: "number", + type: "string" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _FaxLineResponseFaxLine.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxLineResponseFaxLine"); } }; -var FaxLineResponseFaxLine = _FaxLineResponseFaxLine; -FaxLineResponseFaxLine.discriminator = void 0; -FaxLineResponseFaxLine.attributeTypeMap = [ - { - name: "number", - baseName: "number", - type: "string" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "updatedAt", - baseName: "updated_at", - type: "number" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - } -]; // model/faxListResponse.ts -var _FaxListResponse = class { +var FaxListResponse = class _FaxListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxes", + baseName: "faxes", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + } + ]; + } static getAttributeTypeMap() { return _FaxListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxListResponse"); } }; -var FaxListResponse = _FaxListResponse; -FaxListResponse.discriminator = void 0; -FaxListResponse.attributeTypeMap = [ - { - name: "faxes", - baseName: "faxes", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - } -]; // model/faxResponse.ts -var _FaxResponse = class { +var FaxResponse = class _FaxResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "faxId", + baseName: "fax_id", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "transmissions", + baseName: "transmissions", + type: "Array" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxResponse"); } }; -var FaxResponse = _FaxResponse; -FaxResponse.discriminator = void 0; -FaxResponse.attributeTypeMap = [ - { - name: "faxId", - baseName: "fax_id", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "sender", - baseName: "sender", - type: "string" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "transmissions", - baseName: "transmissions", - type: "Array" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - } -]; // model/faxResponseTransmission.ts -var _FaxResponseTransmission = class { +var FaxResponseTransmission = class _FaxResponseTransmission { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "statusCode", + baseName: "status_code", + type: "FaxResponseTransmission.StatusCodeEnum" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _FaxResponseTransmission.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxResponseTransmission"); } }; -var FaxResponseTransmission = _FaxResponseTransmission; -FaxResponseTransmission.discriminator = void 0; -FaxResponseTransmission.attributeTypeMap = [ - { - name: "recipient", - baseName: "recipient", - type: "string" - }, - { - name: "statusCode", - baseName: "status_code", - type: "FaxResponseTransmission.StatusCodeEnum" - }, - { - name: "sentAt", - baseName: "sent_at", - type: "number" - } -]; ((FaxResponseTransmission2) => { let StatusCodeEnum; ((StatusCodeEnum2) => { @@ -18370,143 +18684,162 @@ FaxResponseTransmission.attributeTypeMap = [ })(FaxResponseTransmission || (FaxResponseTransmission = {})); // model/faxSendRequest.ts -var _FaxSendRequest = class { +var FaxSendRequest = class _FaxSendRequest { constructor() { + /** + * API Test Mode Setting + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "recipient", + baseName: "recipient", + type: "string" + }, + { + name: "sender", + baseName: "sender", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "coverPageTo", + baseName: "cover_page_to", + type: "string" + }, + { + name: "coverPageFrom", + baseName: "cover_page_from", + type: "string" + }, + { + name: "coverPageMessage", + baseName: "cover_page_message", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FaxSendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FaxSendRequest"); } }; -var FaxSendRequest = _FaxSendRequest; -FaxSendRequest.discriminator = void 0; -FaxSendRequest.attributeTypeMap = [ - { - name: "recipient", - baseName: "recipient", - type: "string" - }, - { - name: "sender", - baseName: "sender", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "coverPageTo", - baseName: "cover_page_to", - type: "string" - }, - { - name: "coverPageFrom", - baseName: "cover_page_from", - type: "string" - }, - { - name: "coverPageMessage", - baseName: "cover_page_message", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/fileResponse.ts -var _FileResponse = class { +var FileResponse = class _FileResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "fileUrl", + baseName: "file_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _FileResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FileResponse"); } }; -var FileResponse = _FileResponse; -FileResponse.discriminator = void 0; -FileResponse.attributeTypeMap = [ - { - name: "fileUrl", - baseName: "file_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/fileResponseDataUri.ts -var _FileResponseDataUri = class { +var FileResponseDataUri = class _FileResponseDataUri { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "dataUri", + baseName: "data_uri", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _FileResponseDataUri.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "FileResponseDataUri"); } }; -var FileResponseDataUri = _FileResponseDataUri; -FileResponseDataUri.discriminator = void 0; -FileResponseDataUri.attributeTypeMap = [ - { - name: "dataUri", - baseName: "data_uri", - type: "string" - } -]; // model/listInfoResponse.ts -var _ListInfoResponse = class { +var ListInfoResponse = class _ListInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "numPages", + baseName: "num_pages", + type: "number" + }, + { + name: "numResults", + baseName: "num_results", + type: "number" + }, + { + name: "page", + baseName: "page", + type: "number" + }, + { + name: "pageSize", + baseName: "page_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _ListInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ListInfoResponse"); } }; -var ListInfoResponse = _ListInfoResponse; -ListInfoResponse.discriminator = void 0; -ListInfoResponse.attributeTypeMap = [ - { - name: "numPages", - baseName: "num_pages", - type: "number" - }, - { - name: "numResults", - baseName: "num_results", - type: "number" - }, - { - name: "page", - baseName: "page", - type: "number" - }, - { - name: "pageSize", - baseName: "page_size", - type: "number" - } -]; // model/models.ts var primitives = [ @@ -18531,7 +18864,7 @@ var arrayPrefix = "Array<"; var arraySuffix = ">"; var mapPrefix = "{ [key: string]: "; var mapSuffix = "; }"; -var ObjectSerializer = class { +var ObjectSerializer = class _ObjectSerializer { static findCorrectType(data, expectedType) { if (data == void 0) { return expectedType; @@ -18577,23 +18910,23 @@ var ObjectSerializer = class { return data; } else if (endsWith2(type, nullableSuffix)) { let subType = type.slice(0, -nullableSuffix.length); - return ObjectSerializer.serialize(data, subType); + return _ObjectSerializer.serialize(data, subType); } else if (endsWith2(type, optionalSuffix)) { let subType = type.slice(0, -optionalSuffix.length); - return ObjectSerializer.serialize(data, subType); + return _ObjectSerializer.serialize(data, subType); } else if (startsWith(type, arrayPrefix)) { let subType = type.slice(arrayPrefix.length, -arraySuffix.length); let transformedData = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; - transformedData.push(ObjectSerializer.serialize(datum, subType)); + transformedData.push(_ObjectSerializer.serialize(datum, subType)); } return transformedData; } else if (startsWith(type, mapPrefix)) { let subType = type.slice(mapPrefix.length, -mapSuffix.length); let transformedData = {}; for (let key in data) { - transformedData[key] = ObjectSerializer.serialize(data[key], subType); + transformedData[key] = _ObjectSerializer.serialize(data[key], subType); } return transformedData; } else if (type === "Date") { @@ -18610,7 +18943,7 @@ var ObjectSerializer = class { let instance = {}; for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; - let value = ObjectSerializer.serialize( + let value = _ObjectSerializer.serialize( data[attributeType.name], attributeType.type ); @@ -18622,30 +18955,30 @@ var ObjectSerializer = class { } } static deserialize(data, type) { - type = ObjectSerializer.findCorrectType(data, type); + type = _ObjectSerializer.findCorrectType(data, type); if (data == void 0) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; } else if (endsWith2(type, nullableSuffix)) { let subType = type.slice(0, -nullableSuffix.length); - return ObjectSerializer.deserialize(data, subType); + return _ObjectSerializer.deserialize(data, subType); } else if (endsWith2(type, optionalSuffix)) { let subType = type.slice(0, -optionalSuffix.length); - return ObjectSerializer.deserialize(data, subType); + return _ObjectSerializer.deserialize(data, subType); } else if (startsWith(type, arrayPrefix)) { let subType = type.slice(arrayPrefix.length, -arraySuffix.length); let transformedData = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; - transformedData.push(ObjectSerializer.deserialize(datum, subType)); + transformedData.push(_ObjectSerializer.deserialize(datum, subType)); } return transformedData; } else if (startsWith(type, mapPrefix)) { let subType = type.slice(mapPrefix.length, -mapSuffix.length); let transformedData = {}; for (let key in data) { - transformedData[key] = ObjectSerializer.deserialize(data[key], subType); + transformedData[key] = _ObjectSerializer.deserialize(data[key], subType); } return transformedData; } else if (type === "Date") { @@ -18662,7 +18995,7 @@ var ObjectSerializer = class { for (let index = 0; index < attributeTypes.length; index++) { let attributeType = attributeTypes[index]; const propertyKey = data[attributeType.baseName] !== void 0 ? attributeType.baseName : attributeType.name; - instance[attributeType.name] = ObjectSerializer.deserialize( + instance[attributeType.name] = _ObjectSerializer.deserialize( data[propertyKey], attributeType.type ); @@ -18734,151 +19067,173 @@ var VoidAuth = class { }; // model/oAuthTokenGenerateRequest.ts -var _OAuthTokenGenerateRequest = class { +var OAuthTokenGenerateRequest = class _OAuthTokenGenerateRequest { constructor() { + /** + * When generating a new token use `authorization_code`. + */ this["grantType"] = "authorization_code"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + }, + { + name: "code", + baseName: "code", + type: "string" + }, + { + name: "grantType", + baseName: "grant_type", + type: "string" + }, + { + name: "state", + baseName: "state", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenGenerateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenGenerateRequest"); } }; -var OAuthTokenGenerateRequest = _OAuthTokenGenerateRequest; -OAuthTokenGenerateRequest.discriminator = void 0; -OAuthTokenGenerateRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - }, - { - name: "code", - baseName: "code", - type: "string" - }, - { - name: "grantType", - baseName: "grant_type", - type: "string" - }, - { - name: "state", - baseName: "state", - type: "string" - } -]; // model/oAuthTokenRefreshRequest.ts -var _OAuthTokenRefreshRequest = class { +var OAuthTokenRefreshRequest = class _OAuthTokenRefreshRequest { constructor() { + /** + * When refreshing an existing token use `refresh_token`. + */ this["grantType"] = "refresh_token"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "grantType", + baseName: "grant_type", + type: "string" + }, + { + name: "refreshToken", + baseName: "refresh_token", + type: "string" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "clientSecret", + baseName: "client_secret", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenRefreshRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenRefreshRequest"); } }; -var OAuthTokenRefreshRequest = _OAuthTokenRefreshRequest; -OAuthTokenRefreshRequest.discriminator = void 0; -OAuthTokenRefreshRequest.attributeTypeMap = [ - { - name: "grantType", - baseName: "grant_type", - type: "string" - }, - { - name: "refreshToken", - baseName: "refresh_token", - type: "string" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "clientSecret", - baseName: "client_secret", - type: "string" - } -]; // model/oAuthTokenResponse.ts -var _OAuthTokenResponse = class { +var OAuthTokenResponse = class _OAuthTokenResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accessToken", + baseName: "access_token", + type: "string" + }, + { + name: "tokenType", + baseName: "token_type", + type: "string" + }, + { + name: "refreshToken", + baseName: "refresh_token", + type: "string" + }, + { + name: "expiresIn", + baseName: "expires_in", + type: "number" + }, + { + name: "state", + baseName: "state", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _OAuthTokenResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "OAuthTokenResponse"); } }; -var OAuthTokenResponse = _OAuthTokenResponse; -OAuthTokenResponse.discriminator = void 0; -OAuthTokenResponse.attributeTypeMap = [ - { - name: "accessToken", - baseName: "access_token", - type: "string" - }, - { - name: "tokenType", - baseName: "token_type", - type: "string" - }, - { - name: "refreshToken", - baseName: "refresh_token", - type: "string" - }, - { - name: "expiresIn", - baseName: "expires_in", - type: "number" - }, - { - name: "state", - baseName: "state", - type: "string" - } -]; // model/reportCreateRequest.ts -var _ReportCreateRequest = class { +var ReportCreateRequest = class _ReportCreateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "endDate", + baseName: "end_date", + type: "string" + }, + { + name: "reportType", + baseName: "report_type", + type: "Array" + }, + { + name: "startDate", + baseName: "start_date", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _ReportCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportCreateRequest"); } }; -var ReportCreateRequest = _ReportCreateRequest; -ReportCreateRequest.discriminator = void 0; -ReportCreateRequest.attributeTypeMap = [ - { - name: "endDate", - baseName: "end_date", - type: "string" - }, - { - name: "reportType", - baseName: "report_type", - type: "Array" - }, - { - name: "startDate", - baseName: "start_date", - type: "string" - } -]; ((ReportCreateRequest2) => { let ReportTypeEnum; ((ReportTypeEnum2) => { @@ -18888,62 +19243,70 @@ ReportCreateRequest.attributeTypeMap = [ })(ReportCreateRequest || (ReportCreateRequest = {})); // model/reportCreateResponse.ts -var _ReportCreateResponse = class { +var ReportCreateResponse = class _ReportCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "report", + baseName: "report", + type: "ReportResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ReportCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportCreateResponse"); } }; -var ReportCreateResponse = _ReportCreateResponse; -ReportCreateResponse.discriminator = void 0; -ReportCreateResponse.attributeTypeMap = [ - { - name: "report", - baseName: "report", - type: "ReportResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/reportResponse.ts -var _ReportResponse = class { +var ReportResponse = class _ReportResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "success", + baseName: "success", + type: "string" + }, + { + name: "startDate", + baseName: "start_date", + type: "string" + }, + { + name: "endDate", + baseName: "end_date", + type: "string" + }, + { + name: "reportType", + baseName: "report_type", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _ReportResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "ReportResponse"); } }; -var ReportResponse = _ReportResponse; -ReportResponse.discriminator = void 0; -ReportResponse.attributeTypeMap = [ - { - name: "success", - baseName: "success", - type: "string" - }, - { - name: "startDate", - baseName: "start_date", - type: "string" - }, - { - name: "endDate", - baseName: "end_date", - type: "string" - }, - { - name: "reportType", - baseName: "report_type", - type: "Array" - } -]; ((ReportResponse2) => { let ReportTypeEnum; ((ReportTypeEnum2) => { @@ -18953,14 +19316,93 @@ ReportResponse.attributeTypeMap = [ })(ReportResponse || (ReportResponse = {})); // model/signatureRequestBulkCreateEmbeddedWithTemplateRequest.ts -var _SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class { +var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class _SignatureRequestBulkCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signerFile", + baseName: "signer_file", + type: "RequestFile" + }, + { + name: "signerList", + baseName: "signer_list", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -18968,85 +19410,95 @@ var _SignatureRequestBulkCreateEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestBulkCreateEmbeddedWithTemplateRequest = _SignatureRequestBulkCreateEmbeddedWithTemplateRequest; -SignatureRequestBulkCreateEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signerFile", - baseName: "signer_file", - type: "RequestFile" - }, - { - name: "signerList", - baseName: "signer_list", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestBulkSendWithTemplateRequest.ts -var _SignatureRequestBulkSendWithTemplateRequest = class { +var SignatureRequestBulkSendWithTemplateRequest = class _SignatureRequestBulkSendWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signerFile", + baseName: "signer_file", + type: "RequestFile" + }, + { + name: "signerList", + baseName: "signer_list", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19054,89 +19506,166 @@ var _SignatureRequestBulkSendWithTemplateRequest = class { ); } }; -var SignatureRequestBulkSendWithTemplateRequest = _SignatureRequestBulkSendWithTemplateRequest; -SignatureRequestBulkSendWithTemplateRequest.discriminator = void 0; -SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signerFile", - baseName: "signer_file", - type: "RequestFile" - }, - { - name: "signerList", - baseName: "signer_list", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestCreateEmbeddedRequest.ts -var _SignatureRequestCreateEmbeddedRequest = class { +var SignatureRequestCreateEmbeddedRequest = class _SignatureRequestCreateEmbeddedRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestCreateEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19144,141 +19673,109 @@ var _SignatureRequestCreateEmbeddedRequest = class { ); } }; -var SignatureRequestCreateEmbeddedRequest = _SignatureRequestCreateEmbeddedRequest; -SignatureRequestCreateEmbeddedRequest.discriminator = void 0; -SignatureRequestCreateEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestCreateEmbeddedWithTemplateRequest.ts -var _SignatureRequestCreateEmbeddedWithTemplateRequest = class { +var SignatureRequestCreateEmbeddedWithTemplateRequest = class _SignatureRequestCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19286,99 +19783,166 @@ var _SignatureRequestCreateEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestCreateEmbeddedWithTemplateRequest = _SignatureRequestCreateEmbeddedWithTemplateRequest; -SignatureRequestCreateEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - } -]; // model/signatureRequestEditEmbeddedRequest.ts -var _SignatureRequestEditEmbeddedRequest = class { +var SignatureRequestEditEmbeddedRequest = class _SignatureRequestEditEmbeddedRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestEditEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19386,141 +19950,109 @@ var _SignatureRequestEditEmbeddedRequest = class { ); } }; -var SignatureRequestEditEmbeddedRequest = _SignatureRequestEditEmbeddedRequest; -SignatureRequestEditEmbeddedRequest.discriminator = void 0; -SignatureRequestEditEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestEditEmbeddedWithTemplateRequest.ts -var _SignatureRequestEditEmbeddedWithTemplateRequest = class { +var SignatureRequestEditEmbeddedWithTemplateRequest = class _SignatureRequestEditEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19528,243 +20060,283 @@ var _SignatureRequestEditEmbeddedWithTemplateRequest = class { ); } }; -var SignatureRequestEditEmbeddedWithTemplateRequest = _SignatureRequestEditEmbeddedWithTemplateRequest; -SignatureRequestEditEmbeddedWithTemplateRequest.discriminator = void 0; -SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - } -]; // model/signatureRequestEditRequest.ts -var _SignatureRequestEditRequest = class { +var SignatureRequestEditRequest = class _SignatureRequestEditRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestEditRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestEditRequest"); } }; -var SignatureRequestEditRequest = _SignatureRequestEditRequest; -SignatureRequestEditRequest.discriminator = void 0; -SignatureRequestEditRequest.attributeTypeMap = [ - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestEditWithTemplateRequest.ts -var _SignatureRequestEditWithTemplateRequest = class { +var SignatureRequestEditWithTemplateRequest = class _SignatureRequestEditWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestEditWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -19772,315 +20344,288 @@ var _SignatureRequestEditWithTemplateRequest = class { ); } }; -var SignatureRequestEditWithTemplateRequest = _SignatureRequestEditWithTemplateRequest; -SignatureRequestEditWithTemplateRequest.discriminator = void 0; -SignatureRequestEditWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestGetResponse.ts -var _SignatureRequestGetResponse = class { +var SignatureRequestGetResponse = class _SignatureRequestGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequest", + baseName: "signature_request", + type: "SignatureRequestResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestGetResponse"); } }; -var SignatureRequestGetResponse = _SignatureRequestGetResponse; -SignatureRequestGetResponse.discriminator = void 0; -SignatureRequestGetResponse.attributeTypeMap = [ - { - name: "signatureRequest", - baseName: "signature_request", - type: "SignatureRequestResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/signatureRequestListResponse.ts -var _SignatureRequestListResponse = class { +var SignatureRequestListResponse = class _SignatureRequestListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequests", + baseName: "signature_requests", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestListResponse"); } }; -var SignatureRequestListResponse = _SignatureRequestListResponse; -SignatureRequestListResponse.discriminator = void 0; -SignatureRequestListResponse.attributeTypeMap = [ - { - name: "signatureRequests", - baseName: "signature_requests", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/signatureRequestRemindRequest.ts -var _SignatureRequestRemindRequest = class { +var SignatureRequestRemindRequest = class _SignatureRequestRemindRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestRemindRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestRemindRequest"); } }; -var SignatureRequestRemindRequest = _SignatureRequestRemindRequest; -SignatureRequestRemindRequest.discriminator = void 0; -SignatureRequestRemindRequest.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/signatureRequestResponse.ts -var _SignatureRequestResponse = class { +var SignatureRequestResponse = class _SignatureRequestResponse { constructor() { + /** + * Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "originalTitle", + baseName: "original_title", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "createdAt", + baseName: "created_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "isComplete", + baseName: "is_complete", + type: "boolean" + }, + { + name: "isDeclined", + baseName: "is_declined", + type: "boolean" + }, + { + name: "hasError", + baseName: "has_error", + type: "boolean" + }, + { + name: "filesUrl", + baseName: "files_url", + type: "string" + }, + { + name: "signingUrl", + baseName: "signing_url", + type: "string" + }, + { + name: "detailsUrl", + baseName: "details_url", + type: "string" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "finalCopyUri", + baseName: "final_copy_uri", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "responseData", + baseName: "response_data", + type: "Array" + }, + { + name: "signatures", + baseName: "signatures", + type: "Array" + }, + { + name: "bulkSendJobId", + baseName: "bulk_send_job_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestResponse"); } }; -var SignatureRequestResponse = _SignatureRequestResponse; -SignatureRequestResponse.discriminator = void 0; -SignatureRequestResponse.attributeTypeMap = [ - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "originalTitle", - baseName: "original_title", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "createdAt", - baseName: "created_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "isComplete", - baseName: "is_complete", - type: "boolean" - }, - { - name: "isDeclined", - baseName: "is_declined", - type: "boolean" - }, - { - name: "hasError", - baseName: "has_error", - type: "boolean" - }, - { - name: "filesUrl", - baseName: "files_url", - type: "string" - }, - { - name: "signingUrl", - baseName: "signing_url", - type: "string" - }, - { - name: "detailsUrl", - baseName: "details_url", - type: "string" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "finalCopyUri", - baseName: "final_copy_uri", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "responseData", - baseName: "response_data", - type: "Array" - }, - { - name: "signatures", - baseName: "signatures", - type: "Array" - }, - { - name: "bulkSendJobId", - baseName: "bulk_send_job_id", - type: "string" - } -]; // model/signatureRequestResponseAttachment.ts -var _SignatureRequestResponseAttachment = class { +var SignatureRequestResponseAttachment = class _SignatureRequestResponseAttachment { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "instructions", + baseName: "instructions", + type: "string" + }, + { + name: "uploadedAt", + baseName: "uploaded_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseAttachment.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20088,43 +20633,41 @@ var _SignatureRequestResponseAttachment = class { ); } }; -var SignatureRequestResponseAttachment = _SignatureRequestResponseAttachment; -SignatureRequestResponseAttachment.discriminator = void 0; -SignatureRequestResponseAttachment.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "instructions", - baseName: "instructions", - type: "string" - }, - { - name: "uploadedAt", - baseName: "uploaded_at", - type: "number" - } -]; // model/signatureRequestResponseCustomFieldBase.ts -var _SignatureRequestResponseCustomFieldBase = class { +var SignatureRequestResponseCustomFieldBase = class _SignatureRequestResponseCustomFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "editor", + baseName: "editor", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseCustomFieldBase.attributeTypeMap; } @@ -20141,45 +20684,37 @@ var _SignatureRequestResponseCustomFieldBase = class { return null; } }; -var SignatureRequestResponseCustomFieldBase = _SignatureRequestResponseCustomFieldBase; -SignatureRequestResponseCustomFieldBase.discriminator = "type"; -SignatureRequestResponseCustomFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "editor", - baseName: "editor", - type: "string" - } -]; // model/signatureRequestResponseCustomFieldCheckbox.ts -var _SignatureRequestResponseCustomFieldCheckbox = class extends SignatureRequestResponseCustomFieldBase { +var SignatureRequestResponseCustomFieldCheckbox = class _SignatureRequestResponseCustomFieldCheckbox extends SignatureRequestResponseCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only \'text\' and \'checkbox\' are currently supported. + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20187,30 +20722,37 @@ var _SignatureRequestResponseCustomFieldCheckbox = class extends SignatureReques ); } }; -var SignatureRequestResponseCustomFieldCheckbox = _SignatureRequestResponseCustomFieldCheckbox; -SignatureRequestResponseCustomFieldCheckbox.discriminator = void 0; -SignatureRequestResponseCustomFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseCustomFieldText.ts -var _SignatureRequestResponseCustomFieldText = class extends SignatureRequestResponseCustomFieldBase { +var SignatureRequestResponseCustomFieldText = class _SignatureRequestResponseCustomFieldText extends SignatureRequestResponseCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only \'text\' and \'checkbox\' are currently supported. + */ this["type"] = "text"; } - static getAttributeTypeMap() { - return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldText.attributeTypeMap); + static { + this.discriminator = void 0; } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(_SignatureRequestResponseCustomFieldText.attributeTypeMap); + } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20218,20 +20760,6 @@ var _SignatureRequestResponseCustomFieldText = class extends SignatureRequestRes ); } }; -var SignatureRequestResponseCustomFieldText = _SignatureRequestResponseCustomFieldText; -SignatureRequestResponseCustomFieldText.discriminator = void 0; -SignatureRequestResponseCustomFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseCustomFieldTypeEnum.ts var SignatureRequestResponseCustomFieldTypeEnum = /* @__PURE__ */ ((SignatureRequestResponseCustomFieldTypeEnum2) => { @@ -20241,7 +20769,39 @@ var SignatureRequestResponseCustomFieldTypeEnum = /* @__PURE__ */ ((SignatureReq })(SignatureRequestResponseCustomFieldTypeEnum || {}); // model/signatureRequestResponseDataBase.ts -var _SignatureRequestResponseDataBase = class { +var SignatureRequestResponseDataBase = class _SignatureRequestResponseDataBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseDataBase.attributeTypeMap; } @@ -20279,35 +20839,6 @@ var _SignatureRequestResponseDataBase = class { return null; } }; -var SignatureRequestResponseDataBase = _SignatureRequestResponseDataBase; -SignatureRequestResponseDataBase.discriminator = "type"; -SignatureRequestResponseDataBase.attributeTypeMap = [ - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/signatureRequestResponseDataTypeEnum.ts var SignatureRequestResponseDataTypeEnum = /* @__PURE__ */ ((SignatureRequestResponseDataTypeEnum2) => { @@ -20324,14 +20855,35 @@ var SignatureRequestResponseDataTypeEnum = /* @__PURE__ */ ((SignatureRequestRes })(SignatureRequestResponseDataTypeEnum || {}); // model/signatureRequestResponseDataValueCheckbox.ts -var _SignatureRequestResponseDataValueCheckbox = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueCheckbox = class _SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A yes/no checkbox + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20339,30 +20891,37 @@ var _SignatureRequestResponseDataValueCheckbox = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueCheckbox = _SignatureRequestResponseDataValueCheckbox; -SignatureRequestResponseDataValueCheckbox.discriminator = void 0; -SignatureRequestResponseDataValueCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueCheckboxMerge.ts -var _SignatureRequestResponseDataValueCheckboxMerge = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueCheckboxMerge = class _SignatureRequestResponseDataValueCheckboxMerge extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A checkbox field that has default value set by the api + */ this["type"] = "checkbox-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueCheckboxMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20370,30 +20929,37 @@ var _SignatureRequestResponseDataValueCheckboxMerge = class extends SignatureReq ); } }; -var SignatureRequestResponseDataValueCheckboxMerge = _SignatureRequestResponseDataValueCheckboxMerge; -SignatureRequestResponseDataValueCheckboxMerge.discriminator = void 0; -SignatureRequestResponseDataValueCheckboxMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueDateSigned.ts -var _SignatureRequestResponseDataValueDateSigned = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueDateSigned = class _SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A date + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20401,30 +20967,37 @@ var _SignatureRequestResponseDataValueDateSigned = class extends SignatureReques ); } }; -var SignatureRequestResponseDataValueDateSigned = _SignatureRequestResponseDataValueDateSigned; -SignatureRequestResponseDataValueDateSigned.discriminator = void 0; -SignatureRequestResponseDataValueDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueDropdown.ts -var _SignatureRequestResponseDataValueDropdown = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueDropdown = class _SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for dropdowns + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20432,30 +21005,42 @@ var _SignatureRequestResponseDataValueDropdown = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueDropdown = _SignatureRequestResponseDataValueDropdown; -SignatureRequestResponseDataValueDropdown.discriminator = void 0; -SignatureRequestResponseDataValueDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueInitials.ts -var _SignatureRequestResponseDataValueInitials = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueInitials = class _SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for initials + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "isSigned", + baseName: "is_signed", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20463,35 +21048,37 @@ var _SignatureRequestResponseDataValueInitials = class extends SignatureRequestR ); } }; -var SignatureRequestResponseDataValueInitials = _SignatureRequestResponseDataValueInitials; -SignatureRequestResponseDataValueInitials.discriminator = void 0; -SignatureRequestResponseDataValueInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "isSigned", - baseName: "is_signed", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueRadio.ts -var _SignatureRequestResponseDataValueRadio = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueRadio = class _SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * An input field for radios + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20499,30 +21086,42 @@ var _SignatureRequestResponseDataValueRadio = class extends SignatureRequestResp ); } }; -var SignatureRequestResponseDataValueRadio = _SignatureRequestResponseDataValueRadio; -SignatureRequestResponseDataValueRadio.discriminator = void 0; -SignatureRequestResponseDataValueRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueSignature.ts -var _SignatureRequestResponseDataValueSignature = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueSignature = class _SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A signature input field + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "isSigned", + baseName: "is_signed", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20530,35 +21129,37 @@ var _SignatureRequestResponseDataValueSignature = class extends SignatureRequest ); } }; -var SignatureRequestResponseDataValueSignature = _SignatureRequestResponseDataValueSignature; -SignatureRequestResponseDataValueSignature.discriminator = void 0; -SignatureRequestResponseDataValueSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "isSigned", - baseName: "is_signed", - type: "boolean" - } -]; // model/signatureRequestResponseDataValueText.ts -var _SignatureRequestResponseDataValueText = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueText = class _SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A text input field + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20566,30 +21167,37 @@ var _SignatureRequestResponseDataValueText = class extends SignatureRequestRespo ); } }; -var SignatureRequestResponseDataValueText = _SignatureRequestResponseDataValueText; -SignatureRequestResponseDataValueText.discriminator = void 0; -SignatureRequestResponseDataValueText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseDataValueTextMerge.ts -var _SignatureRequestResponseDataValueTextMerge = class extends SignatureRequestResponseDataBase { +var SignatureRequestResponseDataValueTextMerge = class _SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { constructor() { super(...arguments); + /** + * A text field that has default text set by the api + */ this["type"] = "text-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SignatureRequestResponseDataValueTextMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20597,26 +21205,115 @@ var _SignatureRequestResponseDataValueTextMerge = class extends SignatureRequest ); } }; -var SignatureRequestResponseDataValueTextMerge = _SignatureRequestResponseDataValueTextMerge; -SignatureRequestResponseDataValueTextMerge.discriminator = void 0; -SignatureRequestResponseDataValueTextMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/signatureRequestResponseSignatures.ts -var _SignatureRequestResponseSignatures = class { +var SignatureRequestResponseSignatures = class _SignatureRequestResponseSignatures { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "signerGroupGuid", + baseName: "signer_group_guid", + type: "string" + }, + { + name: "signerEmailAddress", + baseName: "signer_email_address", + type: "string" + }, + { + name: "signerName", + baseName: "signer_name", + type: "string" + }, + { + name: "signerRole", + baseName: "signer_role", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + }, + { + name: "statusCode", + baseName: "status_code", + type: "string" + }, + { + name: "declineReason", + baseName: "decline_reason", + type: "string" + }, + { + name: "signedAt", + baseName: "signed_at", + type: "number" + }, + { + name: "lastViewedAt", + baseName: "last_viewed_at", + type: "number" + }, + { + name: "lastRemindedAt", + baseName: "last_reminded_at", + type: "number" + }, + { + name: "hasPin", + baseName: "has_pin", + type: "boolean" + }, + { + name: "hasSmsAuth", + baseName: "has_sms_auth", + type: "boolean" + }, + { + name: "hasSmsDelivery", + baseName: "has_sms_delivery", + type: "boolean" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "reassignedBy", + baseName: "reassigned_by", + type: "string" + }, + { + name: "reassignmentReason", + baseName: "reassignment_reason", + type: "string" + }, + { + name: "reassignedFrom", + baseName: "reassigned_from", + type: "string" + }, + { + name: "error", + baseName: "error", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestResponseSignatures.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20624,270 +21321,305 @@ var _SignatureRequestResponseSignatures = class { ); } }; -var SignatureRequestResponseSignatures = _SignatureRequestResponseSignatures; -SignatureRequestResponseSignatures.discriminator = void 0; -SignatureRequestResponseSignatures.attributeTypeMap = [ - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "signerGroupGuid", - baseName: "signer_group_guid", - type: "string" - }, - { - name: "signerEmailAddress", - baseName: "signer_email_address", - type: "string" - }, - { - name: "signerName", - baseName: "signer_name", - type: "string" - }, - { - name: "signerRole", - baseName: "signer_role", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - }, - { - name: "statusCode", - baseName: "status_code", - type: "string" - }, - { - name: "declineReason", - baseName: "decline_reason", - type: "string" - }, - { - name: "signedAt", - baseName: "signed_at", - type: "number" - }, - { - name: "lastViewedAt", - baseName: "last_viewed_at", - type: "number" - }, - { - name: "lastRemindedAt", - baseName: "last_reminded_at", - type: "number" - }, - { - name: "hasPin", - baseName: "has_pin", - type: "boolean" - }, - { - name: "hasSmsAuth", - baseName: "has_sms_auth", - type: "boolean" - }, - { - name: "hasSmsDelivery", - baseName: "has_sms_delivery", - type: "boolean" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "reassignedBy", - baseName: "reassigned_by", - type: "string" - }, - { - name: "reassignmentReason", - baseName: "reassignment_reason", - type: "string" - }, - { - name: "reassignedFrom", - baseName: "reassigned_from", - type: "string" - }, - { - name: "error", - baseName: "error", - type: "string" - } -]; // model/signatureRequestSendRequest.ts -var _SignatureRequestSendRequest = class { +var SignatureRequestSendRequest = class _SignatureRequestSendRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. + */ this["hideTextTags"] = false; + /** + * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated + */ this["isQualifiedSignature"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "groupedSigners", + baseName: "grouped_signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "isQualifiedSignature", + baseName: "is_qualified_signature", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestSendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestSendRequest"); } }; -var SignatureRequestSendRequest = _SignatureRequestSendRequest; -SignatureRequestSendRequest.discriminator = void 0; -SignatureRequestSendRequest.attributeTypeMap = [ - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "groupedSigners", - baseName: "grouped_signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "isQualifiedSignature", - baseName: "is_qualified_signature", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/signatureRequestSendWithTemplateRequest.ts -var _SignatureRequestSendWithTemplateRequest = class { +var SignatureRequestSendWithTemplateRequest = class _SignatureRequestSendWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer\'s identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. + * + * @deprecated + */ this["isQualifiedSignature"] = false; + /** + * Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. + */ this["isEid"] = false; + /** + * Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "isQualifiedSignature", + baseName: "is_qualified_signature", + type: "boolean" + }, + { + name: "isEid", + baseName: "is_eid", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestSendWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -20895,322 +21627,277 @@ var _SignatureRequestSendWithTemplateRequest = class { ); } }; -var SignatureRequestSendWithTemplateRequest = _SignatureRequestSendWithTemplateRequest; -SignatureRequestSendWithTemplateRequest.discriminator = void 0; -SignatureRequestSendWithTemplateRequest.attributeTypeMap = [ - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "isQualifiedSignature", - baseName: "is_qualified_signature", - type: "boolean" - }, - { - name: "isEid", - baseName: "is_eid", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - } -]; // model/signatureRequestUpdateRequest.ts -var _SignatureRequestUpdateRequest = class { +var SignatureRequestUpdateRequest = class _SignatureRequestUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureId", + baseName: "signature_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SignatureRequestUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SignatureRequestUpdateRequest"); } }; -var SignatureRequestUpdateRequest = _SignatureRequestUpdateRequest; -SignatureRequestUpdateRequest.discriminator = void 0; -SignatureRequestUpdateRequest.attributeTypeMap = [ - { - name: "signatureId", - baseName: "signature_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/subAttachment.ts -var _SubAttachment = class { +var SubAttachment = class _SubAttachment { constructor() { + /** + * Determines if the attachment must be uploaded. + */ this["required"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signerIndex", + baseName: "signer_index", + type: "number" + }, + { + name: "instructions", + baseName: "instructions", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubAttachment.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubAttachment"); } }; -var SubAttachment = _SubAttachment; -SubAttachment.discriminator = void 0; -SubAttachment.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signerIndex", - baseName: "signer_index", - type: "number" - }, - { - name: "instructions", - baseName: "instructions", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - } -]; // model/subBulkSignerList.ts -var _SubBulkSignerList = class { +var SubBulkSignerList = class _SubBulkSignerList { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubBulkSignerList.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubBulkSignerList"); } }; -var SubBulkSignerList = _SubBulkSignerList; -SubBulkSignerList.discriminator = void 0; -SubBulkSignerList.attributeTypeMap = [ - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - } -]; // model/subBulkSignerListCustomField.ts -var _SubBulkSignerListCustomField = class { +var SubBulkSignerListCustomField = class _SubBulkSignerListCustomField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubBulkSignerListCustomField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubBulkSignerListCustomField"); } }; -var SubBulkSignerListCustomField = _SubBulkSignerListCustomField; -SubBulkSignerListCustomField.discriminator = void 0; -SubBulkSignerListCustomField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/subCC.ts -var _SubCC = class { +var SubCC = class _SubCC { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubCC.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubCC"); } }; -var SubCC = _SubCC; -SubCC.discriminator = void 0; -SubCC.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/subCustomField.ts -var _SubCustomField = class { +var SubCustomField = class _SubCustomField { constructor() { + /** + * Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. + */ this["required"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "editor", + baseName: "editor", + type: "string" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "value", + baseName: "value", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubCustomField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubCustomField"); } }; -var SubCustomField = _SubCustomField; -SubCustomField.discriminator = void 0; -SubCustomField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "editor", - baseName: "editor", - type: "string" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "value", - baseName: "value", - type: "string" - } -]; // model/subEditorOptions.ts -var _SubEditorOptions = class { +var SubEditorOptions = class _SubEditorOptions { constructor() { + /** + * Allows requesters to edit the list of signers + */ this["allowEditSigners"] = false; + /** + * Allows requesters to edit documents, including delete and add + */ this["allowEditDocuments"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "allowEditSigners", + baseName: "allow_edit_signers", + type: "boolean" + }, + { + name: "allowEditDocuments", + baseName: "allow_edit_documents", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubEditorOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubEditorOptions"); } }; -var SubEditorOptions = _SubEditorOptions; -SubEditorOptions.discriminator = void 0; -SubEditorOptions.attributeTypeMap = [ - { - name: "allowEditSigners", - baseName: "allow_edit_signers", - type: "boolean" - }, - { - name: "allowEditDocuments", - baseName: "allow_edit_documents", - type: "boolean" - } -]; // model/subFieldOptions.ts -var _SubFieldOptions = class { +var SubFieldOptions = class _SubFieldOptions { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "dateFormat", + baseName: "date_format", + type: "SubFieldOptions.DateFormatEnum" + } + ]; + } static getAttributeTypeMap() { return _SubFieldOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFieldOptions"); } }; -var SubFieldOptions = _SubFieldOptions; -SubFieldOptions.discriminator = void 0; -SubFieldOptions.attributeTypeMap = [ - { - name: "dateFormat", - baseName: "date_format", - type: "SubFieldOptions.DateFormatEnum" - } -]; ((SubFieldOptions2) => { let DateFormatEnum; ((DateFormatEnum2) => { @@ -21224,104 +21911,119 @@ SubFieldOptions.attributeTypeMap = [ })(SubFieldOptions || (SubFieldOptions = {})); // model/subFormFieldGroup.ts -var _SubFormFieldGroup = class { +var SubFormFieldGroup = class _SubFormFieldGroup { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "groupId", + baseName: "group_id", + type: "string" + }, + { + name: "groupLabel", + baseName: "group_label", + type: "string" + }, + { + name: "requirement", + baseName: "requirement", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldGroup.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldGroup"); } }; -var SubFormFieldGroup = _SubFormFieldGroup; -SubFormFieldGroup.discriminator = void 0; -SubFormFieldGroup.attributeTypeMap = [ - { - name: "groupId", - baseName: "group_id", - type: "string" - }, - { - name: "groupLabel", - baseName: "group_label", - type: "string" - }, - { - name: "requirement", - baseName: "requirement", - type: "string" - } -]; // model/subFormFieldRule.ts -var _SubFormFieldRule = class { +var SubFormFieldRule = class _SubFormFieldRule { constructor() { + /** + * Currently only `AND` is supported. Support for `OR` is being worked on. + */ this["triggerOperator"] = "AND"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "triggerOperator", + baseName: "trigger_operator", + type: "string" + }, + { + name: "triggers", + baseName: "triggers", + type: "Array" + }, + { + name: "actions", + baseName: "actions", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRule.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRule"); } }; -var SubFormFieldRule = _SubFormFieldRule; -SubFormFieldRule.discriminator = void 0; -SubFormFieldRule.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "triggerOperator", - baseName: "trigger_operator", - type: "string" - }, - { - name: "triggers", - baseName: "triggers", - type: "Array" - }, - { - name: "actions", - baseName: "actions", - type: "Array" - } -]; // model/subFormFieldRuleAction.ts -var _SubFormFieldRuleAction = class { +var SubFormFieldRuleAction = class _SubFormFieldRuleAction { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "hidden", + baseName: "hidden", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "SubFormFieldRuleAction.TypeEnum" + }, + { + name: "fieldId", + baseName: "field_id", + type: "string" + }, + { + name: "groupId", + baseName: "group_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRuleAction.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRuleAction"); } }; -var SubFormFieldRuleAction = _SubFormFieldRuleAction; -SubFormFieldRuleAction.discriminator = void 0; -SubFormFieldRuleAction.attributeTypeMap = [ - { - name: "hidden", - baseName: "hidden", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "SubFormFieldRuleAction.TypeEnum" - }, - { - name: "fieldId", - baseName: "field_id", - type: "string" - }, - { - name: "groupId", - baseName: "group_id", - type: "string" - } -]; ((SubFormFieldRuleAction2) => { let TypeEnum; ((TypeEnum2) => { @@ -21333,38 +22035,42 @@ SubFormFieldRuleAction.attributeTypeMap = [ })(SubFormFieldRuleAction || (SubFormFieldRuleAction = {})); // model/subFormFieldRuleTrigger.ts -var _SubFormFieldRuleTrigger = class { +var SubFormFieldRuleTrigger = class _SubFormFieldRuleTrigger { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "id", + baseName: "id", + type: "string" + }, + { + name: "operator", + baseName: "operator", + type: "SubFormFieldRuleTrigger.OperatorEnum" + }, + { + name: "value", + baseName: "value", + type: "string" + }, + { + name: "values", + baseName: "values", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldRuleTrigger.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldRuleTrigger"); } }; -var SubFormFieldRuleTrigger = _SubFormFieldRuleTrigger; -SubFormFieldRuleTrigger.discriminator = void 0; -SubFormFieldRuleTrigger.attributeTypeMap = [ - { - name: "id", - baseName: "id", - type: "string" - }, - { - name: "operator", - baseName: "operator", - type: "SubFormFieldRuleTrigger.OperatorEnum" - }, - { - name: "value", - baseName: "value", - type: "string" - }, - { - name: "values", - baseName: "values", - type: "Array" - } -]; ((SubFormFieldRuleTrigger2) => { let OperatorEnum; ((OperatorEnum2) => { @@ -21377,7 +22083,69 @@ SubFormFieldRuleTrigger.attributeTypeMap = [ })(SubFormFieldRuleTrigger || (SubFormFieldRuleTrigger = {})); // model/subFormFieldsPerDocumentBase.ts -var _SubFormFieldsPerDocumentBase = class { +var SubFormFieldsPerDocumentBase = class _SubFormFieldsPerDocumentBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "documentIndex", + baseName: "document_index", + type: "number" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "page", + baseName: "page", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubFormFieldsPerDocumentBase.attributeTypeMap; } @@ -21418,75 +22186,42 @@ var _SubFormFieldsPerDocumentBase = class { return null; } }; -var SubFormFieldsPerDocumentBase = _SubFormFieldsPerDocumentBase; -SubFormFieldsPerDocumentBase.discriminator = "type"; -SubFormFieldsPerDocumentBase.attributeTypeMap = [ - { - name: "documentIndex", - baseName: "document_index", - type: "number" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "page", - baseName: "page", - type: "number" - } -]; // model/subFormFieldsPerDocumentCheckbox.ts -var _SubFormFieldsPerDocumentCheckbox = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentCheckbox = class _SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "isChecked", + baseName: "is_checked", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21494,35 +22229,32 @@ var _SubFormFieldsPerDocumentCheckbox = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentCheckbox = _SubFormFieldsPerDocumentCheckbox; -SubFormFieldsPerDocumentCheckbox.discriminator = void 0; -SubFormFieldsPerDocumentCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "isChecked", - baseName: "is_checked", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/subFormFieldsPerDocumentCheckboxMerge.ts -var _SubFormFieldsPerDocumentCheckboxMerge = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentCheckboxMerge = class _SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. + */ this["type"] = "checkbox-merge"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentCheckboxMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21530,26 +22262,46 @@ var _SubFormFieldsPerDocumentCheckboxMerge = class extends SubFormFieldsPerDocum ); } }; -var SubFormFieldsPerDocumentCheckboxMerge = _SubFormFieldsPerDocumentCheckboxMerge; -SubFormFieldsPerDocumentCheckboxMerge.discriminator = void 0; -SubFormFieldsPerDocumentCheckboxMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentDateSigned.ts -var _SubFormFieldsPerDocumentDateSigned = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentDateSigned = class _SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A date. Use the `SubFormFieldsPerDocumentDateSigned` class. + */ this["type"] = "date_signed"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentDateSigned.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21557,25 +22309,6 @@ var _SubFormFieldsPerDocumentDateSigned = class extends SubFormFieldsPerDocument ); } }; -var SubFormFieldsPerDocumentDateSigned = _SubFormFieldsPerDocumentDateSigned; -SubFormFieldsPerDocumentDateSigned.discriminator = void 0; -SubFormFieldsPerDocumentDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentDateSigned.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentDateSigned2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21599,15 +22332,54 @@ SubFormFieldsPerDocumentDateSigned.attributeTypeMap = [ })(SubFormFieldsPerDocumentDateSigned || (SubFormFieldsPerDocumentDateSigned = {})); // model/subFormFieldsPerDocumentDropdown.ts -var _SubFormFieldsPerDocumentDropdown = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentDropdown = class _SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. + */ this["type"] = "dropdown"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "options", + baseName: "options", + type: "Array" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentDropdown.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21615,35 +22387,6 @@ var _SubFormFieldsPerDocumentDropdown = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentDropdown = _SubFormFieldsPerDocumentDropdown; -SubFormFieldsPerDocumentDropdown.discriminator = void 0; -SubFormFieldsPerDocumentDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "options", - baseName: "options", - type: "Array" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentDropdown.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentDropdown2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21688,15 +22431,54 @@ var SubFormFieldsPerDocumentFontEnum = /* @__PURE__ */ ((SubFormFieldsPerDocumen })(SubFormFieldsPerDocumentFontEnum || {}); // model/subFormFieldsPerDocumentHyperlink.ts -var _SubFormFieldsPerDocumentHyperlink = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentHyperlink = class _SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. + */ this["type"] = "hyperlink"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "contentUrl", + baseName: "content_url", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentHyperlink.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21704,35 +22486,6 @@ var _SubFormFieldsPerDocumentHyperlink = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentHyperlink = _SubFormFieldsPerDocumentHyperlink; -SubFormFieldsPerDocumentHyperlink.discriminator = void 0; -SubFormFieldsPerDocumentHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "contentUrl", - baseName: "content_url", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentHyperlink.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentHyperlink2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -21756,14 +22509,30 @@ SubFormFieldsPerDocumentHyperlink.attributeTypeMap = [ })(SubFormFieldsPerDocumentHyperlink || (SubFormFieldsPerDocumentHyperlink = {})); // model/subFormFieldsPerDocumentInitials.ts -var _SubFormFieldsPerDocumentInitials = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentInitials = class _SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21771,58 +22540,72 @@ var _SubFormFieldsPerDocumentInitials = class extends SubFormFieldsPerDocumentBa ); } }; -var SubFormFieldsPerDocumentInitials = _SubFormFieldsPerDocumentInitials; -SubFormFieldsPerDocumentInitials.discriminator = void 0; -SubFormFieldsPerDocumentInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentRadio.ts -var _SubFormFieldsPerDocumentRadio = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentRadio = class _SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + }, + { + name: "isChecked", + baseName: "is_checked", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldsPerDocumentRadio"); } }; -var SubFormFieldsPerDocumentRadio = _SubFormFieldsPerDocumentRadio; -SubFormFieldsPerDocumentRadio.discriminator = void 0; -SubFormFieldsPerDocumentRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - }, - { - name: "isChecked", - baseName: "is_checked", - type: "boolean" - } -]; // model/subFormFieldsPerDocumentSignature.ts -var _SubFormFieldsPerDocumentSignature = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentSignature = class _SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. + */ this["type"] = "signature"; } - static getAttributeTypeMap() { - return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentSignature.attributeTypeMap); + static { + this.discriminator = void 0; } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentSignature.attributeTypeMap); + } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21830,89 +22613,90 @@ var _SubFormFieldsPerDocumentSignature = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentSignature = _SubFormFieldsPerDocumentSignature; -SubFormFieldsPerDocumentSignature.discriminator = void 0; -SubFormFieldsPerDocumentSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/subFormFieldsPerDocumentText.ts -var _SubFormFieldsPerDocumentText = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentText = class _SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A text input field. Use the `SubFormFieldsPerDocumentText` class. + */ this["type"] = "text"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "placeholder", + baseName: "placeholder", + type: "string" + }, + { + name: "autoFillType", + baseName: "auto_fill_type", + type: "string" + }, + { + name: "linkId", + baseName: "link_id", + type: "string" + }, + { + name: "masked", + baseName: "masked", + type: "boolean" + }, + { + name: "validationType", + baseName: "validation_type", + type: "SubFormFieldsPerDocumentText.ValidationTypeEnum" + }, + { + name: "validationCustomRegex", + baseName: "validation_custom_regex", + type: "string" + }, + { + name: "validationCustomRegexFormatLabel", + baseName: "validation_custom_regex_format_label", + type: "string" + }, + { + name: "content", + baseName: "content", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentText.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubFormFieldsPerDocumentText"); } }; -var SubFormFieldsPerDocumentText = _SubFormFieldsPerDocumentText; -SubFormFieldsPerDocumentText.discriminator = void 0; -SubFormFieldsPerDocumentText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "placeholder", - baseName: "placeholder", - type: "string" - }, - { - name: "autoFillType", - baseName: "auto_fill_type", - type: "string" - }, - { - name: "linkId", - baseName: "link_id", - type: "string" - }, - { - name: "masked", - baseName: "masked", - type: "boolean" - }, - { - name: "validationType", - baseName: "validation_type", - type: "SubFormFieldsPerDocumentText.ValidationTypeEnum" - }, - { - name: "validationCustomRegex", - baseName: "validation_custom_regex", - type: "string" - }, - { - name: "validationCustomRegexFormatLabel", - baseName: "validation_custom_regex_format_label", - type: "string" - }, - { - name: "content", - baseName: "content", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentText.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentText2) => { let ValidationTypeEnum; ((ValidationTypeEnum2) => { @@ -21949,15 +22733,44 @@ SubFormFieldsPerDocumentText.attributeTypeMap = [ })(SubFormFieldsPerDocumentText || (SubFormFieldsPerDocumentText = {})); // model/subFormFieldsPerDocumentTextMerge.ts -var _SubFormFieldsPerDocumentTextMerge = class extends SubFormFieldsPerDocumentBase { +var SubFormFieldsPerDocumentTextMerge = class _SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { constructor() { super(...arguments); + /** + * A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. + */ this["type"] = "text-merge"; + /** + * The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. + */ this["fontSize"] = 12; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "fontFamily", + baseName: "font_family", + type: "SubFormFieldsPerDocumentTextMerge.FontFamilyEnum" + }, + { + name: "fontSize", + baseName: "font_size", + type: "number" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_SubFormFieldsPerDocumentTextMerge.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -21965,25 +22778,6 @@ var _SubFormFieldsPerDocumentTextMerge = class extends SubFormFieldsPerDocumentB ); } }; -var SubFormFieldsPerDocumentTextMerge = _SubFormFieldsPerDocumentTextMerge; -SubFormFieldsPerDocumentTextMerge.discriminator = void 0; -SubFormFieldsPerDocumentTextMerge.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "fontFamily", - baseName: "font_family", - type: "SubFormFieldsPerDocumentTextMerge.FontFamilyEnum" - }, - { - name: "fontSize", - baseName: "font_size", - type: "number" - } -]; ((SubFormFieldsPerDocumentTextMerge2) => { let FontFamilyEnum; ((FontFamilyEnum2) => { @@ -22022,28 +22816,32 @@ var SubFormFieldsPerDocumentTypeEnum = /* @__PURE__ */ ((SubFormFieldsPerDocumen })(SubFormFieldsPerDocumentTypeEnum || {}); // model/subMergeField.ts -var _SubMergeField = class { +var SubMergeField = class _SubMergeField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "type", + baseName: "type", + type: "SubMergeField.TypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubMergeField.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubMergeField"); } }; -var SubMergeField = _SubMergeField; -SubMergeField.discriminator = void 0; -SubMergeField.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "type", - baseName: "type", - type: "SubMergeField.TypeEnum" - } -]; ((SubMergeField2) => { let TypeEnum; ((TypeEnum2) => { @@ -22053,28 +22851,32 @@ SubMergeField.attributeTypeMap = [ })(SubMergeField || (SubMergeField = {})); // model/subOAuth.ts -var _SubOAuth = class { +var SubOAuth = class _SubOAuth { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "callbackUrl", + baseName: "callback_url", + type: "string" + }, + { + name: "scopes", + baseName: "scopes", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _SubOAuth.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubOAuth"); } }; -var SubOAuth = _SubOAuth; -SubOAuth.discriminator = void 0; -SubOAuth.attributeTypeMap = [ - { - name: "callbackUrl", - baseName: "callback_url", - type: "string" - }, - { - name: "scopes", - baseName: "scopes", - type: "Array" - } -]; ((SubOAuth2) => { let ScopesEnum; ((ScopesEnum2) => { @@ -22090,32 +22892,62 @@ SubOAuth.attributeTypeMap = [ })(SubOAuth || (SubOAuth = {})); // model/subOptions.ts -var _SubOptions = class { +var SubOptions = class _SubOptions { constructor() { + /** + * Determines if signers can use \"Insert Everywhere\" when signing a document. + */ this["canInsertEverywhere"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "canInsertEverywhere", + baseName: "can_insert_everywhere", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubOptions"); } }; -var SubOptions = _SubOptions; -SubOptions.discriminator = void 0; -SubOptions.attributeTypeMap = [ - { - name: "canInsertEverywhere", - baseName: "can_insert_everywhere", - type: "boolean" - } -]; // model/subSignatureRequestGroupedSigners.ts -var _SubSignatureRequestGroupedSigners = class { +var SubSignatureRequestGroupedSigners = class _SubSignatureRequestGroupedSigners { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "group", + baseName: "group", + type: "string" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestGroupedSigners.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22123,69 +22955,54 @@ var _SubSignatureRequestGroupedSigners = class { ); } }; -var SubSignatureRequestGroupedSigners = _SubSignatureRequestGroupedSigners; -SubSignatureRequestGroupedSigners.discriminator = void 0; -SubSignatureRequestGroupedSigners.attributeTypeMap = [ - { - name: "group", - baseName: "group", - type: "string" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subSignatureRequestSigner.ts -var _SubSignatureRequestSigner = class { +var SubSignatureRequestSigner = class _SubSignatureRequestSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + }, + { + name: "pin", + baseName: "pin", + type: "string" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "smsPhoneNumberType", + baseName: "sms_phone_number_type", + type: "SubSignatureRequestSigner.SmsPhoneNumberTypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubSignatureRequestSigner"); } }; -var SubSignatureRequestSigner = _SubSignatureRequestSigner; -SubSignatureRequestSigner.discriminator = void 0; -SubSignatureRequestSigner.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - }, - { - name: "pin", - baseName: "pin", - type: "string" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "smsPhoneNumberType", - baseName: "sms_phone_number_type", - type: "SubSignatureRequestSigner.SmsPhoneNumberTypeEnum" - } -]; ((SubSignatureRequestSigner2) => { let SmsPhoneNumberTypeEnum; ((SmsPhoneNumberTypeEnum2) => { @@ -22195,10 +23012,48 @@ SubSignatureRequestSigner.attributeTypeMap = [ })(SubSignatureRequestSigner || (SubSignatureRequestSigner = {})); // model/subSignatureRequestTemplateSigner.ts -var _SubSignatureRequestTemplateSigner = class { +var SubSignatureRequestTemplateSigner = class _SubSignatureRequestTemplateSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "pin", + baseName: "pin", + type: "string" + }, + { + name: "smsPhoneNumber", + baseName: "sms_phone_number", + type: "string" + }, + { + name: "smsPhoneNumberType", + baseName: "sms_phone_number_type", + type: "SubSignatureRequestTemplateSigner.SmsPhoneNumberTypeEnum" + } + ]; + } static getAttributeTypeMap() { return _SubSignatureRequestTemplateSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22206,40 +23061,6 @@ var _SubSignatureRequestTemplateSigner = class { ); } }; -var SubSignatureRequestTemplateSigner = _SubSignatureRequestTemplateSigner; -SubSignatureRequestTemplateSigner.discriminator = void 0; -SubSignatureRequestTemplateSigner.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "pin", - baseName: "pin", - type: "string" - }, - { - name: "smsPhoneNumber", - baseName: "sms_phone_number", - type: "string" - }, - { - name: "smsPhoneNumberType", - baseName: "sms_phone_number_type", - type: "SubSignatureRequestTemplateSigner.SmsPhoneNumberTypeEnum" - } -]; ((SubSignatureRequestTemplateSigner2) => { let SmsPhoneNumberTypeEnum; ((SmsPhoneNumberTypeEnum2) => { @@ -22249,49 +23070,65 @@ SubSignatureRequestTemplateSigner.attributeTypeMap = [ })(SubSignatureRequestTemplateSigner || (SubSignatureRequestTemplateSigner = {})); // model/subSigningOptions.ts -var _SubSigningOptions = class { +var SubSigningOptions = class _SubSigningOptions { constructor() { + /** + * Allows drawing the signature + */ this["draw"] = false; + /** + * Allows using a smartphone to email the signature + */ this["phone"] = false; + /** + * Allows typing the signature + */ this["type"] = false; + /** + * Allows uploading the signature + */ this["upload"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "defaultType", + baseName: "default_type", + type: "SubSigningOptions.DefaultTypeEnum" + }, + { + name: "draw", + baseName: "draw", + type: "boolean" + }, + { + name: "phone", + baseName: "phone", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "boolean" + }, + { + name: "upload", + baseName: "upload", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubSigningOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubSigningOptions"); } }; -var SubSigningOptions = _SubSigningOptions; -SubSigningOptions.discriminator = void 0; -SubSigningOptions.attributeTypeMap = [ - { - name: "defaultType", - baseName: "default_type", - type: "SubSigningOptions.DefaultTypeEnum" - }, - { - name: "draw", - baseName: "draw", - type: "boolean" - }, - { - name: "phone", - baseName: "phone", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "boolean" - }, - { - name: "upload", - baseName: "upload", - type: "boolean" - } -]; ((SubSigningOptions2) => { let DefaultTypeEnum; ((DefaultTypeEnum2) => { @@ -22303,87 +23140,122 @@ SubSigningOptions.attributeTypeMap = [ })(SubSigningOptions || (SubSigningOptions = {})); // model/subTeamResponse.ts -var _SubTeamResponse = class { +var SubTeamResponse = class _SubTeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubTeamResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubTeamResponse"); } }; -var SubTeamResponse = _SubTeamResponse; -SubTeamResponse.discriminator = void 0; -SubTeamResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/subTemplateRole.ts -var _SubTemplateRole = class { +var SubTemplateRole = class _SubTemplateRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubTemplateRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubTemplateRole"); } }; -var SubTemplateRole = _SubTemplateRole; -SubTemplateRole.discriminator = void 0; -SubTemplateRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subUnclaimedDraftSigner.ts -var _SubUnclaimedDraftSigner = class { +var SubUnclaimedDraftSigner = class _SubUnclaimedDraftSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _SubUnclaimedDraftSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubUnclaimedDraftSigner"); } }; -var SubUnclaimedDraftSigner = _SubUnclaimedDraftSigner; -SubUnclaimedDraftSigner.discriminator = void 0; -SubUnclaimedDraftSigner.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/subUnclaimedDraftTemplateSigner.ts -var _SubUnclaimedDraftTemplateSigner = class { +var SubUnclaimedDraftTemplateSigner = class _SubUnclaimedDraftTemplateSigner { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _SubUnclaimedDraftTemplateSigner.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -22391,28 +23263,9 @@ var _SubUnclaimedDraftTemplateSigner = class { ); } }; -var SubUnclaimedDraftTemplateSigner = _SubUnclaimedDraftTemplateSigner; -SubUnclaimedDraftTemplateSigner.discriminator = void 0; -SubUnclaimedDraftTemplateSigner.attributeTypeMap = [ - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/subWhiteLabelingOptions.ts -var _SubWhiteLabelingOptions = class { +var SubWhiteLabelingOptions = class _SubWhiteLabelingOptions { constructor() { this["headerBackgroundColor"] = "#1a1a1a"; this["legalVersion"] = _SubWhiteLabelingOptions.LegalVersionEnum.Terms1; @@ -22429,92 +23282,96 @@ var _SubWhiteLabelingOptions = class { this["textColor1"] = "#808080"; this["textColor2"] = "#ffffff"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "headerBackgroundColor", + baseName: "header_background_color", + type: "string" + }, + { + name: "legalVersion", + baseName: "legal_version", + type: "SubWhiteLabelingOptions.LegalVersionEnum" + }, + { + name: "linkColor", + baseName: "link_color", + type: "string" + }, + { + name: "pageBackgroundColor", + baseName: "page_background_color", + type: "string" + }, + { + name: "primaryButtonColor", + baseName: "primary_button_color", + type: "string" + }, + { + name: "primaryButtonColorHover", + baseName: "primary_button_color_hover", + type: "string" + }, + { + name: "primaryButtonTextColor", + baseName: "primary_button_text_color", + type: "string" + }, + { + name: "primaryButtonTextColorHover", + baseName: "primary_button_text_color_hover", + type: "string" + }, + { + name: "secondaryButtonColor", + baseName: "secondary_button_color", + type: "string" + }, + { + name: "secondaryButtonColorHover", + baseName: "secondary_button_color_hover", + type: "string" + }, + { + name: "secondaryButtonTextColor", + baseName: "secondary_button_text_color", + type: "string" + }, + { + name: "secondaryButtonTextColorHover", + baseName: "secondary_button_text_color_hover", + type: "string" + }, + { + name: "textColor1", + baseName: "text_color1", + type: "string" + }, + { + name: "textColor2", + baseName: "text_color2", + type: "string" + }, + { + name: "resetToDefault", + baseName: "reset_to_default", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _SubWhiteLabelingOptions.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "SubWhiteLabelingOptions"); } }; -var SubWhiteLabelingOptions = _SubWhiteLabelingOptions; -SubWhiteLabelingOptions.discriminator = void 0; -SubWhiteLabelingOptions.attributeTypeMap = [ - { - name: "headerBackgroundColor", - baseName: "header_background_color", - type: "string" - }, - { - name: "legalVersion", - baseName: "legal_version", - type: "SubWhiteLabelingOptions.LegalVersionEnum" - }, - { - name: "linkColor", - baseName: "link_color", - type: "string" - }, - { - name: "pageBackgroundColor", - baseName: "page_background_color", - type: "string" - }, - { - name: "primaryButtonColor", - baseName: "primary_button_color", - type: "string" - }, - { - name: "primaryButtonColorHover", - baseName: "primary_button_color_hover", - type: "string" - }, - { - name: "primaryButtonTextColor", - baseName: "primary_button_text_color", - type: "string" - }, - { - name: "primaryButtonTextColorHover", - baseName: "primary_button_text_color_hover", - type: "string" - }, - { - name: "secondaryButtonColor", - baseName: "secondary_button_color", - type: "string" - }, - { - name: "secondaryButtonColorHover", - baseName: "secondary_button_color_hover", - type: "string" - }, - { - name: "secondaryButtonTextColor", - baseName: "secondary_button_text_color", - type: "string" - }, - { - name: "secondaryButtonTextColorHover", - baseName: "secondary_button_text_color_hover", - type: "string" - }, - { - name: "textColor1", - baseName: "text_color1", - type: "string" - }, - { - name: "textColor2", - baseName: "text_color2", - type: "string" - }, - { - name: "resetToDefault", - baseName: "reset_to_default", - type: "boolean" - } -]; ((SubWhiteLabelingOptions2) => { let LegalVersionEnum; ((LegalVersionEnum2) => { @@ -22524,33 +23381,37 @@ SubWhiteLabelingOptions.attributeTypeMap = [ })(SubWhiteLabelingOptions || (SubWhiteLabelingOptions = {})); // model/teamAddMemberRequest.ts -var _TeamAddMemberRequest = class { +var TeamAddMemberRequest = class _TeamAddMemberRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "TeamAddMemberRequest.RoleEnum" + } + ]; + } static getAttributeTypeMap() { return _TeamAddMemberRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamAddMemberRequest"); } }; -var TeamAddMemberRequest = _TeamAddMemberRequest; -TeamAddMemberRequest.discriminator = void 0; -TeamAddMemberRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "TeamAddMemberRequest.RoleEnum" - } -]; ((TeamAddMemberRequest2) => { let RoleEnum; ((RoleEnum2) => { @@ -22562,302 +23423,345 @@ TeamAddMemberRequest.attributeTypeMap = [ })(TeamAddMemberRequest || (TeamAddMemberRequest = {})); // model/teamCreateRequest.ts -var _TeamCreateRequest = class { +var TeamCreateRequest = class _TeamCreateRequest { constructor() { + /** + * The name of your Team. + */ this["name"] = "Untitled Team"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamCreateRequest"); } }; -var TeamCreateRequest = _TeamCreateRequest; -TeamCreateRequest.discriminator = void 0; -TeamCreateRequest.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/teamGetInfoResponse.ts -var _TeamGetInfoResponse = class { +var TeamGetInfoResponse = class _TeamGetInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "team", + baseName: "team", + type: "TeamInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamGetInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamGetInfoResponse"); } }; -var TeamGetInfoResponse = _TeamGetInfoResponse; -TeamGetInfoResponse.discriminator = void 0; -TeamGetInfoResponse.attributeTypeMap = [ - { - name: "team", - baseName: "team", - type: "TeamInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamGetResponse.ts -var _TeamGetResponse = class { +var TeamGetResponse = class _TeamGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "team", + baseName: "team", + type: "TeamResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamGetResponse"); } }; -var TeamGetResponse = _TeamGetResponse; -TeamGetResponse.discriminator = void 0; -TeamGetResponse.attributeTypeMap = [ - { - name: "team", - baseName: "team", - type: "TeamResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamInfoResponse.ts -var _TeamInfoResponse = class { +var TeamInfoResponse = class _TeamInfoResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "teamParent", + baseName: "team_parent", + type: "TeamParentResponse" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "numMembers", + baseName: "num_members", + type: "number" + }, + { + name: "numSubTeams", + baseName: "num_sub_teams", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TeamInfoResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInfoResponse"); } }; -var TeamInfoResponse = _TeamInfoResponse; -TeamInfoResponse.discriminator = void 0; -TeamInfoResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "teamParent", - baseName: "team_parent", - type: "TeamParentResponse" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "numMembers", - baseName: "num_members", - type: "number" - }, - { - name: "numSubTeams", - baseName: "num_sub_teams", - type: "number" - } -]; // model/teamInviteResponse.ts -var _TeamInviteResponse = class { +var TeamInviteResponse = class _TeamInviteResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "string" + }, + { + name: "sentAt", + baseName: "sent_at", + type: "number" + }, + { + name: "redeemedAt", + baseName: "redeemed_at", + type: "number" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TeamInviteResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInviteResponse"); } }; -var TeamInviteResponse = _TeamInviteResponse; -TeamInviteResponse.discriminator = void 0; -TeamInviteResponse.attributeTypeMap = [ - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "string" - }, - { - name: "sentAt", - baseName: "sent_at", - type: "number" - }, - { - name: "redeemedAt", - baseName: "redeemed_at", - type: "number" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; // model/teamInvitesResponse.ts -var _TeamInvitesResponse = class { +var TeamInvitesResponse = class _TeamInvitesResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamInvites", + baseName: "team_invites", + type: "Array" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamInvitesResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamInvitesResponse"); } }; -var TeamInvitesResponse = _TeamInvitesResponse; -TeamInvitesResponse.discriminator = void 0; -TeamInvitesResponse.attributeTypeMap = [ - { - name: "teamInvites", - baseName: "team_invites", - type: "Array" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamMemberResponse.ts -var _TeamMemberResponse = class { +var TeamMemberResponse = class _TeamMemberResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "role", + baseName: "role", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamMemberResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamMemberResponse"); } }; -var TeamMemberResponse = _TeamMemberResponse; -TeamMemberResponse.discriminator = void 0; -TeamMemberResponse.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "role", - baseName: "role", - type: "string" - } -]; // model/teamMembersResponse.ts -var _TeamMembersResponse = class { +var TeamMembersResponse = class _TeamMembersResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamMembers", + baseName: "team_members", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamMembersResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamMembersResponse"); } }; -var TeamMembersResponse = _TeamMembersResponse; -TeamMembersResponse.discriminator = void 0; -TeamMembersResponse.attributeTypeMap = [ - { - name: "teamMembers", - baseName: "team_members", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamParentResponse.ts -var _TeamParentResponse = class { +var TeamParentResponse = class _TeamParentResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "teamId", + baseName: "team_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamParentResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamParentResponse"); } }; -var TeamParentResponse = _TeamParentResponse; -TeamParentResponse.discriminator = void 0; -TeamParentResponse.attributeTypeMap = [ - { - name: "teamId", - baseName: "team_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/teamRemoveMemberRequest.ts -var _TeamRemoveMemberRequest = class { +var TeamRemoveMemberRequest = class _TeamRemoveMemberRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "newOwnerEmailAddress", + baseName: "new_owner_email_address", + type: "string" + }, + { + name: "newTeamId", + baseName: "new_team_id", + type: "string" + }, + { + name: "newRole", + baseName: "new_role", + type: "TeamRemoveMemberRequest.NewRoleEnum" + } + ]; + } static getAttributeTypeMap() { return _TeamRemoveMemberRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamRemoveMemberRequest"); } }; -var TeamRemoveMemberRequest = _TeamRemoveMemberRequest; -TeamRemoveMemberRequest.discriminator = void 0; -TeamRemoveMemberRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "newOwnerEmailAddress", - baseName: "new_owner_email_address", - type: "string" - }, - { - name: "newTeamId", - baseName: "new_team_id", - type: "string" - }, - { - name: "newRole", - baseName: "new_role", - type: "TeamRemoveMemberRequest.NewRoleEnum" - } -]; ((TeamRemoveMemberRequest2) => { let NewRoleEnum; ((NewRoleEnum2) => { @@ -22869,135 +23773,314 @@ TeamRemoveMemberRequest.attributeTypeMap = [ })(TeamRemoveMemberRequest || (TeamRemoveMemberRequest = {})); // model/teamResponse.ts -var _TeamResponse = class { +var TeamResponse = class _TeamResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "invitedAccounts", + baseName: "invited_accounts", + type: "Array" + }, + { + name: "invitedEmails", + baseName: "invited_emails", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamResponse"); } }; -var TeamResponse = _TeamResponse; -TeamResponse.discriminator = void 0; -TeamResponse.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - }, - { - name: "invitedAccounts", - baseName: "invited_accounts", - type: "Array" - }, - { - name: "invitedEmails", - baseName: "invited_emails", - type: "Array" - } -]; // model/teamSubTeamsResponse.ts -var _TeamSubTeamsResponse = class { +var TeamSubTeamsResponse = class _TeamSubTeamsResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "subTeams", + baseName: "sub_teams", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TeamSubTeamsResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamSubTeamsResponse"); } }; -var TeamSubTeamsResponse = _TeamSubTeamsResponse; -TeamSubTeamsResponse.discriminator = void 0; -TeamSubTeamsResponse.attributeTypeMap = [ - { - name: "subTeams", - baseName: "sub_teams", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/teamUpdateRequest.ts -var _TeamUpdateRequest = class { +var TeamUpdateRequest = class _TeamUpdateRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TeamUpdateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TeamUpdateRequest"); } }; -var TeamUpdateRequest = _TeamUpdateRequest; -TeamUpdateRequest.discriminator = void 0; -TeamUpdateRequest.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/templateAddUserRequest.ts -var _TemplateAddUserRequest = class { +var TemplateAddUserRequest = class _TemplateAddUserRequest { constructor() { + /** + * If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. + */ this["skipNotification"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "skipNotification", + baseName: "skip_notification", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateAddUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateAddUserRequest"); } }; -var TemplateAddUserRequest = _TemplateAddUserRequest; -TemplateAddUserRequest.discriminator = void 0; -TemplateAddUserRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "skipNotification", - baseName: "skip_notification", - type: "boolean" - } -]; // model/templateCreateEmbeddedDraftRequest.ts -var _TemplateCreateEmbeddedDraftRequest = class { +var TemplateCreateEmbeddedDraftRequest = class _TemplateCreateEmbeddedDraftRequest { constructor() { + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. + */ this["allowCcs"] = true; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). + */ this["usePreexistingFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23005,141 +24088,30 @@ var _TemplateCreateEmbeddedDraftRequest = class { ); } }; -var TemplateCreateEmbeddedDraftRequest = _TemplateCreateEmbeddedDraftRequest; -TemplateCreateEmbeddedDraftRequest.discriminator = void 0; -TemplateCreateEmbeddedDraftRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - } -]; // model/templateCreateEmbeddedDraftResponse.ts -var _TemplateCreateEmbeddedDraftResponse = class { +var TemplateCreateEmbeddedDraftResponse = class _TemplateCreateEmbeddedDraftResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateCreateEmbeddedDraftResponseTemplate" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23147,26 +24119,40 @@ var _TemplateCreateEmbeddedDraftResponse = class { ); } }; -var TemplateCreateEmbeddedDraftResponse = _TemplateCreateEmbeddedDraftResponse; -TemplateCreateEmbeddedDraftResponse.discriminator = void 0; -TemplateCreateEmbeddedDraftResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateCreateEmbeddedDraftResponseTemplate" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateEmbeddedDraftResponseTemplate.ts -var _TemplateCreateEmbeddedDraftResponseTemplate = class { +var TemplateCreateEmbeddedDraftResponseTemplate = class _TemplateCreateEmbeddedDraftResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "editUrl", + baseName: "edit_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateEmbeddedDraftResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23174,516 +24160,606 @@ var _TemplateCreateEmbeddedDraftResponseTemplate = class { ); } }; -var TemplateCreateEmbeddedDraftResponseTemplate = _TemplateCreateEmbeddedDraftResponseTemplate; -TemplateCreateEmbeddedDraftResponseTemplate.discriminator = void 0; -TemplateCreateEmbeddedDraftResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "editUrl", - baseName: "edit_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateRequest.ts -var _TemplateCreateRequest = class { +var TemplateCreateRequest = class _TemplateCreateRequest { constructor() { + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). + */ this["usePreexistingFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "mergeFields", + baseName: "merge_fields", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateRequest"); } }; -var TemplateCreateRequest = _TemplateCreateRequest; -TemplateCreateRequest.discriminator = void 0; -TemplateCreateRequest.attributeTypeMap = [ - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "mergeFields", - baseName: "merge_fields", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - } -]; // model/templateCreateResponse.ts -var _TemplateCreateResponse = class { +var TemplateCreateResponse = class _TemplateCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateCreateResponseTemplate" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateResponse"); } }; -var TemplateCreateResponse = _TemplateCreateResponse; -TemplateCreateResponse.discriminator = void 0; -TemplateCreateResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateCreateResponseTemplate" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateCreateResponseTemplate.ts -var _TemplateCreateResponseTemplate = class { +var TemplateCreateResponseTemplate = class _TemplateCreateResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateCreateResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateCreateResponseTemplate"); } }; -var TemplateCreateResponseTemplate = _TemplateCreateResponseTemplate; -TemplateCreateResponseTemplate.discriminator = void 0; -TemplateCreateResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - } -]; // model/templateEditResponse.ts -var _TemplateEditResponse = class { +var TemplateEditResponse = class _TemplateEditResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateEditResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateEditResponse"); } }; -var TemplateEditResponse = _TemplateEditResponse; -TemplateEditResponse.discriminator = void 0; -TemplateEditResponse.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - } -]; // model/templateGetResponse.ts -var _TemplateGetResponse = class { +var TemplateGetResponse = class _TemplateGetResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateGetResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateGetResponse"); } }; -var TemplateGetResponse = _TemplateGetResponse; -TemplateGetResponse.discriminator = void 0; -TemplateGetResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateListResponse.ts -var _TemplateListResponse = class { +var TemplateListResponse = class _TemplateListResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templates", + baseName: "templates", + type: "Array" + }, + { + name: "listInfo", + baseName: "list_info", + type: "ListInfoResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateListResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateListResponse"); } }; -var TemplateListResponse = _TemplateListResponse; -TemplateListResponse.discriminator = void 0; -TemplateListResponse.attributeTypeMap = [ - { - name: "templates", - baseName: "templates", - type: "Array" - }, - { - name: "listInfo", - baseName: "list_info", - type: "ListInfoResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/templateRemoveUserRequest.ts -var _TemplateRemoveUserRequest = class { - static getAttributeTypeMap() { +var TemplateRemoveUserRequest = class _TemplateRemoveUserRequest { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + } + ]; + } + static getAttributeTypeMap() { return _TemplateRemoveUserRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateRemoveUserRequest"); } }; -var TemplateRemoveUserRequest = _TemplateRemoveUserRequest; -TemplateRemoveUserRequest.discriminator = void 0; -TemplateRemoveUserRequest.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - } -]; // model/templateResponse.ts -var _TemplateResponse = class { +var TemplateResponse = class _TemplateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "updatedAt", + baseName: "updated_at", + type: "number" + }, + { + name: "isEmbedded", + baseName: "is_embedded", + type: "boolean" + }, + { + name: "isCreator", + baseName: "is_creator", + type: "boolean" + }, + { + name: "canEdit", + baseName: "can_edit", + type: "boolean" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "signerRoles", + baseName: "signer_roles", + type: "Array" + }, + { + name: "ccRoles", + baseName: "cc_roles", + type: "Array" + }, + { + name: "documents", + baseName: "documents", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "namedFormFields", + baseName: "named_form_fields", + type: "Array" + }, + { + name: "accounts", + baseName: "accounts", + type: "Array" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponse"); } }; -var TemplateResponse = _TemplateResponse; -TemplateResponse.discriminator = void 0; -TemplateResponse.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "updatedAt", - baseName: "updated_at", - type: "number" - }, - { - name: "isEmbedded", - baseName: "is_embedded", - type: "boolean" - }, - { - name: "isCreator", - baseName: "is_creator", - type: "boolean" - }, - { - name: "canEdit", - baseName: "can_edit", - type: "boolean" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "signerRoles", - baseName: "signer_roles", - type: "Array" - }, - { - name: "ccRoles", - baseName: "cc_roles", - type: "Array" - }, - { - name: "documents", - baseName: "documents", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "namedFormFields", - baseName: "named_form_fields", - type: "Array" - }, - { - name: "accounts", - baseName: "accounts", - type: "Array" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - } -]; // model/templateResponseAccount.ts -var _TemplateResponseAccount = class { +var TemplateResponseAccount = class _TemplateResponseAccount { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "accountId", + baseName: "account_id", + type: "string" + }, + { + name: "emailAddress", + baseName: "email_address", + type: "string" + }, + { + name: "isLocked", + baseName: "is_locked", + type: "boolean" + }, + { + name: "isPaidHs", + baseName: "is_paid_hs", + type: "boolean" + }, + { + name: "isPaidHf", + baseName: "is_paid_hf", + type: "boolean" + }, + { + name: "quotas", + baseName: "quotas", + type: "TemplateResponseAccountQuota" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseAccount.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseAccount"); } }; -var TemplateResponseAccount = _TemplateResponseAccount; -TemplateResponseAccount.discriminator = void 0; -TemplateResponseAccount.attributeTypeMap = [ - { - name: "accountId", - baseName: "account_id", - type: "string" - }, - { - name: "emailAddress", - baseName: "email_address", - type: "string" - }, - { - name: "isLocked", - baseName: "is_locked", - type: "boolean" - }, - { - name: "isPaidHs", - baseName: "is_paid_hs", - type: "boolean" - }, - { - name: "isPaidHf", - baseName: "is_paid_hf", - type: "boolean" - }, - { - name: "quotas", - baseName: "quotas", - type: "TemplateResponseAccountQuota" - } -]; // model/templateResponseAccountQuota.ts -var _TemplateResponseAccountQuota = class { +var TemplateResponseAccountQuota = class _TemplateResponseAccountQuota { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templatesLeft", + baseName: "templates_left", + type: "number" + }, + { + name: "apiSignatureRequestsLeft", + baseName: "api_signature_requests_left", + type: "number" + }, + { + name: "documentsLeft", + baseName: "documents_left", + type: "number" + }, + { + name: "smsVerificationsLeft", + baseName: "sms_verifications_left", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseAccountQuota.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseAccountQuota"); } }; -var TemplateResponseAccountQuota = _TemplateResponseAccountQuota; -TemplateResponseAccountQuota.discriminator = void 0; -TemplateResponseAccountQuota.attributeTypeMap = [ - { - name: "templatesLeft", - baseName: "templates_left", - type: "number" - }, - { - name: "apiSignatureRequestsLeft", - baseName: "api_signature_requests_left", - type: "number" - }, - { - name: "documentsLeft", - baseName: "documents_left", - type: "number" - }, - { - name: "smsVerificationsLeft", - baseName: "sms_verifications_left", - type: "number" - } -]; // model/templateResponseCCRole.ts -var _TemplateResponseCCRole = class { +var TemplateResponseCCRole = class _TemplateResponseCCRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseCCRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseCCRole"); } }; -var TemplateResponseCCRole = _TemplateResponseCCRole; -TemplateResponseCCRole.discriminator = void 0; -TemplateResponseCCRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - } -]; // model/templateResponseDocument.ts -var _TemplateResponseDocument = class { +var TemplateResponseDocument = class _TemplateResponseDocument { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "index", + baseName: "index", + type: "number" + }, + { + name: "fieldGroups", + baseName: "field_groups", + type: "Array" + }, + { + name: "formFields", + baseName: "form_fields", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "staticFields", + baseName: "static_fields", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocument.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseDocument"); } }; -var TemplateResponseDocument = _TemplateResponseDocument; -TemplateResponseDocument.discriminator = void 0; -TemplateResponseDocument.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "index", - baseName: "index", - type: "number" - }, - { - name: "fieldGroups", - baseName: "field_groups", - type: "Array" - }, - { - name: "formFields", - baseName: "form_fields", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "staticFields", - baseName: "static_fields", - type: "Array" - } -]; // model/templateResponseDocumentCustomFieldBase.ts -var _TemplateResponseDocumentCustomFieldBase = class { +var TemplateResponseDocumentCustomFieldBase = class _TemplateResponseDocumentCustomFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentCustomFieldBase.attributeTypeMap; } @@ -23700,70 +24776,32 @@ var _TemplateResponseDocumentCustomFieldBase = class { return null; } }; -var TemplateResponseDocumentCustomFieldBase = _TemplateResponseDocumentCustomFieldBase; -TemplateResponseDocumentCustomFieldBase.discriminator = "type"; -TemplateResponseDocumentCustomFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentCustomFieldCheckbox.ts -var _TemplateResponseDocumentCustomFieldCheckbox = class extends TemplateResponseDocumentCustomFieldBase { +var TemplateResponseDocumentCustomFieldCheckbox = class _TemplateResponseDocumentCustomFieldCheckbox extends TemplateResponseDocumentCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentCustomFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23771,25 +24809,52 @@ var _TemplateResponseDocumentCustomFieldCheckbox = class extends TemplateRespons ); } }; -var TemplateResponseDocumentCustomFieldCheckbox = _TemplateResponseDocumentCustomFieldCheckbox; -TemplateResponseDocumentCustomFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentCustomFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentCustomFieldText.ts -var _TemplateResponseDocumentCustomFieldText = class extends TemplateResponseDocumentCustomFieldBase { +var TemplateResponseDocumentCustomFieldText = class _TemplateResponseDocumentCustomFieldText extends TemplateResponseDocumentCustomFieldBase { constructor() { super(...arguments); + /** + * The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentCustomFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23797,41 +24862,30 @@ var _TemplateResponseDocumentCustomFieldText = class extends TemplateResponseDoc ); } }; -var TemplateResponseDocumentCustomFieldText = _TemplateResponseDocumentCustomFieldText; -TemplateResponseDocumentCustomFieldText.discriminator = void 0; -TemplateResponseDocumentCustomFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - } -]; // model/templateResponseDocumentFieldGroup.ts -var _TemplateResponseDocumentFieldGroup = class { +var TemplateResponseDocumentFieldGroup = class _TemplateResponseDocumentFieldGroup { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "rule", + baseName: "rule", + type: "TemplateResponseDocumentFieldGroupRule" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFieldGroup.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23839,26 +24893,30 @@ var _TemplateResponseDocumentFieldGroup = class { ); } }; -var TemplateResponseDocumentFieldGroup = _TemplateResponseDocumentFieldGroup; -TemplateResponseDocumentFieldGroup.discriminator = void 0; -TemplateResponseDocumentFieldGroup.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "rule", - baseName: "rule", - type: "TemplateResponseDocumentFieldGroupRule" - } -]; // model/templateResponseDocumentFieldGroupRule.ts -var _TemplateResponseDocumentFieldGroupRule = class { +var TemplateResponseDocumentFieldGroupRule = class _TemplateResponseDocumentFieldGroupRule { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "requirement", + baseName: "requirement", + type: "string" + }, + { + name: "groupLabel", + baseName: "groupLabel", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFieldGroupRule.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23866,23 +24924,61 @@ var _TemplateResponseDocumentFieldGroupRule = class { ); } }; -var TemplateResponseDocumentFieldGroupRule = _TemplateResponseDocumentFieldGroupRule; -TemplateResponseDocumentFieldGroupRule.discriminator = void 0; -TemplateResponseDocumentFieldGroupRule.attributeTypeMap = [ - { - name: "requirement", - baseName: "requirement", - type: "string" - }, - { - name: "groupLabel", - baseName: "groupLabel", - type: "string" - } -]; // model/templateResponseDocumentFormFieldBase.ts -var _TemplateResponseDocumentFormFieldBase = class { +var TemplateResponseDocumentFormFieldBase = class _TemplateResponseDocumentFormFieldBase { + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentFormFieldBase.attributeTypeMap; } @@ -23917,65 +25013,37 @@ var _TemplateResponseDocumentFormFieldBase = class { return null; } }; -var TemplateResponseDocumentFormFieldBase = _TemplateResponseDocumentFormFieldBase; -TemplateResponseDocumentFormFieldBase.discriminator = "type"; -TemplateResponseDocumentFormFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - } -]; // model/templateResponseDocumentFormFieldCheckbox.ts -var _TemplateResponseDocumentFormFieldCheckbox = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldCheckbox = class _TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -23983,30 +25051,37 @@ var _TemplateResponseDocumentFormFieldCheckbox = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldCheckbox = _TemplateResponseDocumentFormFieldCheckbox; -TemplateResponseDocumentFormFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentFormFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldDateSigned.ts -var _TemplateResponseDocumentFormFieldDateSigned = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldDateSigned = class _TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24014,30 +25089,37 @@ var _TemplateResponseDocumentFormFieldDateSigned = class extends TemplateRespons ); } }; -var TemplateResponseDocumentFormFieldDateSigned = _TemplateResponseDocumentFormFieldDateSigned; -TemplateResponseDocumentFormFieldDateSigned.discriminator = void 0; -TemplateResponseDocumentFormFieldDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldDropdown.ts -var _TemplateResponseDocumentFormFieldDropdown = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldDropdown = class _TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24045,30 +25127,57 @@ var _TemplateResponseDocumentFormFieldDropdown = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldDropdown = _TemplateResponseDocumentFormFieldDropdown; -TemplateResponseDocumentFormFieldDropdown.discriminator = void 0; -TemplateResponseDocumentFormFieldDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldHyperlink.ts -var _TemplateResponseDocumentFormFieldHyperlink = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldHyperlink = class _TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "hyperlink"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24076,50 +25185,37 @@ var _TemplateResponseDocumentFormFieldHyperlink = class extends TemplateResponse ); } }; -var TemplateResponseDocumentFormFieldHyperlink = _TemplateResponseDocumentFormFieldHyperlink; -TemplateResponseDocumentFormFieldHyperlink.discriminator = void 0; -TemplateResponseDocumentFormFieldHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldInitials.ts -var _TemplateResponseDocumentFormFieldInitials = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldInitials = class _TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24127,30 +25223,37 @@ var _TemplateResponseDocumentFormFieldInitials = class extends TemplateResponseD ); } }; -var TemplateResponseDocumentFormFieldInitials = _TemplateResponseDocumentFormFieldInitials; -TemplateResponseDocumentFormFieldInitials.discriminator = void 0; -TemplateResponseDocumentFormFieldInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldRadio.ts -var _TemplateResponseDocumentFormFieldRadio = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldRadio = class _TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24158,30 +25261,37 @@ var _TemplateResponseDocumentFormFieldRadio = class extends TemplateResponseDocu ); } }; -var TemplateResponseDocumentFormFieldRadio = _TemplateResponseDocumentFormFieldRadio; -TemplateResponseDocumentFormFieldRadio.discriminator = void 0; -TemplateResponseDocumentFormFieldRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldSignature.ts -var _TemplateResponseDocumentFormFieldSignature = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldSignature = class _TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24189,30 +25299,62 @@ var _TemplateResponseDocumentFormFieldSignature = class extends TemplateResponse ); } }; -var TemplateResponseDocumentFormFieldSignature = _TemplateResponseDocumentFormFieldSignature; -TemplateResponseDocumentFormFieldSignature.discriminator = void 0; -TemplateResponseDocumentFormFieldSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentFormFieldText.ts -var _TemplateResponseDocumentFormFieldText = class extends TemplateResponseDocumentFormFieldBase { +var TemplateResponseDocumentFormFieldText = class _TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { constructor() { super(...arguments); + /** + * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "avgTextLength", + baseName: "avg_text_length", + type: "TemplateResponseFieldAvgTextLength" + }, + { + name: "isMultiline", + baseName: "isMultiline", + type: "boolean" + }, + { + name: "originalFontSize", + baseName: "originalFontSize", + type: "number" + }, + { + name: "fontFamily", + baseName: "fontFamily", + type: "string" + }, + { + name: "validationType", + baseName: "validation_type", + type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentFormFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24220,45 +25362,6 @@ var _TemplateResponseDocumentFormFieldText = class extends TemplateResponseDocum ); } }; -var TemplateResponseDocumentFormFieldText = _TemplateResponseDocumentFormFieldText; -TemplateResponseDocumentFormFieldText.discriminator = void 0; -TemplateResponseDocumentFormFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "avgTextLength", - baseName: "avg_text_length", - type: "TemplateResponseFieldAvgTextLength" - }, - { - name: "isMultiline", - baseName: "isMultiline", - type: "boolean" - }, - { - name: "originalFontSize", - baseName: "originalFontSize", - type: "number" - }, - { - name: "fontFamily", - baseName: "fontFamily", - type: "string" - }, - { - name: "validationType", - baseName: "validation_type", - type: "TemplateResponseDocumentFormFieldText.ValidationTypeEnum" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; ((TemplateResponseDocumentFormFieldText2) => { let ValidationTypeEnum; ((ValidationTypeEnum2) => { @@ -24276,10 +25379,70 @@ TemplateResponseDocumentFormFieldText.attributeTypeMap = [ })(TemplateResponseDocumentFormFieldText || (TemplateResponseDocumentFormFieldText = {})); // model/templateResponseDocumentStaticFieldBase.ts -var _TemplateResponseDocumentStaticFieldBase = class { +var TemplateResponseDocumentStaticFieldBase = class _TemplateResponseDocumentStaticFieldBase { constructor() { + /** + * The signer of the Static Field. + */ this["signer"] = "me_now"; } + static { + this.discriminator = "type"; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + }, + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "signer", + baseName: "signer", + type: "string" + }, + { + name: "x", + baseName: "x", + type: "number" + }, + { + name: "y", + baseName: "y", + type: "number" + }, + { + name: "width", + baseName: "width", + type: "number" + }, + { + name: "height", + baseName: "height", + type: "number" + }, + { + name: "required", + baseName: "required", + type: "boolean" + }, + { + name: "group", + baseName: "group", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseDocumentStaticFieldBase.attributeTypeMap; } @@ -24314,70 +25477,32 @@ var _TemplateResponseDocumentStaticFieldBase = class { return null; } }; -var TemplateResponseDocumentStaticFieldBase = _TemplateResponseDocumentStaticFieldBase; -TemplateResponseDocumentStaticFieldBase.discriminator = "type"; -TemplateResponseDocumentStaticFieldBase.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - }, - { - name: "apiId", - baseName: "api_id", - type: "string" - }, - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "signer", - baseName: "signer", - type: "string" - }, - { - name: "x", - baseName: "x", - type: "number" - }, - { - name: "y", - baseName: "y", - type: "number" - }, - { - name: "width", - baseName: "width", - type: "number" - }, - { - name: "height", - baseName: "height", - type: "number" - }, - { - name: "required", - baseName: "required", - type: "boolean" - }, - { - name: "group", - baseName: "group", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldCheckbox.ts -var _TemplateResponseDocumentStaticFieldCheckbox = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldCheckbox = class _TemplateResponseDocumentStaticFieldCheckbox extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "checkbox"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldCheckbox.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24385,25 +25510,32 @@ var _TemplateResponseDocumentStaticFieldCheckbox = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldCheckbox = _TemplateResponseDocumentStaticFieldCheckbox; -TemplateResponseDocumentStaticFieldCheckbox.discriminator = void 0; -TemplateResponseDocumentStaticFieldCheckbox.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldDateSigned.ts -var _TemplateResponseDocumentStaticFieldDateSigned = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldDateSigned = class _TemplateResponseDocumentStaticFieldDateSigned extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "date_signed"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldDateSigned.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24411,25 +25543,32 @@ var _TemplateResponseDocumentStaticFieldDateSigned = class extends TemplateRespo ); } }; -var TemplateResponseDocumentStaticFieldDateSigned = _TemplateResponseDocumentStaticFieldDateSigned; -TemplateResponseDocumentStaticFieldDateSigned.discriminator = void 0; -TemplateResponseDocumentStaticFieldDateSigned.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldDropdown.ts -var _TemplateResponseDocumentStaticFieldDropdown = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldDropdown = class _TemplateResponseDocumentStaticFieldDropdown extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "dropdown"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldDropdown.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24437,25 +25576,32 @@ var _TemplateResponseDocumentStaticFieldDropdown = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldDropdown = _TemplateResponseDocumentStaticFieldDropdown; -TemplateResponseDocumentStaticFieldDropdown.discriminator = void 0; -TemplateResponseDocumentStaticFieldDropdown.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldHyperlink.ts -var _TemplateResponseDocumentStaticFieldHyperlink = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldHyperlink = class _TemplateResponseDocumentStaticFieldHyperlink extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "hyperlink"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldHyperlink.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24463,25 +25609,32 @@ var _TemplateResponseDocumentStaticFieldHyperlink = class extends TemplateRespon ); } }; -var TemplateResponseDocumentStaticFieldHyperlink = _TemplateResponseDocumentStaticFieldHyperlink; -TemplateResponseDocumentStaticFieldHyperlink.discriminator = void 0; -TemplateResponseDocumentStaticFieldHyperlink.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldInitials.ts -var _TemplateResponseDocumentStaticFieldInitials = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldInitials = class _TemplateResponseDocumentStaticFieldInitials extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "initials"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldInitials.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24489,25 +25642,32 @@ var _TemplateResponseDocumentStaticFieldInitials = class extends TemplateRespons ); } }; -var TemplateResponseDocumentStaticFieldInitials = _TemplateResponseDocumentStaticFieldInitials; -TemplateResponseDocumentStaticFieldInitials.discriminator = void 0; -TemplateResponseDocumentStaticFieldInitials.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldRadio.ts -var _TemplateResponseDocumentStaticFieldRadio = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldRadio = class _TemplateResponseDocumentStaticFieldRadio extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "radio"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldRadio.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24515,25 +25675,32 @@ var _TemplateResponseDocumentStaticFieldRadio = class extends TemplateResponseDo ); } }; -var TemplateResponseDocumentStaticFieldRadio = _TemplateResponseDocumentStaticFieldRadio; -TemplateResponseDocumentStaticFieldRadio.discriminator = void 0; -TemplateResponseDocumentStaticFieldRadio.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldSignature.ts -var _TemplateResponseDocumentStaticFieldSignature = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldSignature = class _TemplateResponseDocumentStaticFieldSignature extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "signature"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldSignature.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24541,25 +25708,32 @@ var _TemplateResponseDocumentStaticFieldSignature = class extends TemplateRespon ); } }; -var TemplateResponseDocumentStaticFieldSignature = _TemplateResponseDocumentStaticFieldSignature; -TemplateResponseDocumentStaticFieldSignature.discriminator = void 0; -TemplateResponseDocumentStaticFieldSignature.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseDocumentStaticFieldText.ts -var _TemplateResponseDocumentStaticFieldText = class extends TemplateResponseDocumentStaticFieldBase { +var TemplateResponseDocumentStaticFieldText = class _TemplateResponseDocumentStaticFieldText extends TemplateResponseDocumentStaticFieldBase { constructor() { super(...arguments); + /** + * The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials` + */ this["type"] = "text"; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "string" + } + ]; + } static getAttributeTypeMap() { return super.getAttributeTypeMap().concat(_TemplateResponseDocumentStaticFieldText.attributeTypeMap); } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24567,21 +25741,30 @@ var _TemplateResponseDocumentStaticFieldText = class extends TemplateResponseDoc ); } }; -var TemplateResponseDocumentStaticFieldText = _TemplateResponseDocumentStaticFieldText; -TemplateResponseDocumentStaticFieldText.discriminator = void 0; -TemplateResponseDocumentStaticFieldText.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "string" - } -]; // model/templateResponseFieldAvgTextLength.ts -var _TemplateResponseFieldAvgTextLength = class { +var TemplateResponseFieldAvgTextLength = class _TemplateResponseFieldAvgTextLength { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "numLines", + baseName: "num_lines", + type: "number" + }, + { + name: "numCharsPerLine", + baseName: "num_chars_per_line", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseFieldAvgTextLength.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24589,116 +25772,135 @@ var _TemplateResponseFieldAvgTextLength = class { ); } }; -var TemplateResponseFieldAvgTextLength = _TemplateResponseFieldAvgTextLength; -TemplateResponseFieldAvgTextLength.discriminator = void 0; -TemplateResponseFieldAvgTextLength.attributeTypeMap = [ - { - name: "numLines", - baseName: "num_lines", - type: "number" - }, - { - name: "numCharsPerLine", - baseName: "num_chars_per_line", - type: "number" - } -]; // model/templateResponseSignerRole.ts -var _TemplateResponseSignerRole = class { +var TemplateResponseSignerRole = class _TemplateResponseSignerRole { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "name", + baseName: "name", + type: "string" + }, + { + name: "order", + baseName: "order", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _TemplateResponseSignerRole.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateResponseSignerRole"); } }; -var TemplateResponseSignerRole = _TemplateResponseSignerRole; -TemplateResponseSignerRole.discriminator = void 0; -TemplateResponseSignerRole.attributeTypeMap = [ - { - name: "name", - baseName: "name", - type: "string" - }, - { - name: "order", - baseName: "order", - type: "number" - } -]; // model/templateUpdateFilesRequest.ts -var _TemplateUpdateFilesRequest = class { +var TemplateUpdateFilesRequest = class _TemplateUpdateFilesRequest { constructor() { + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateUpdateFilesRequest"); } }; -var TemplateUpdateFilesRequest = _TemplateUpdateFilesRequest; -TemplateUpdateFilesRequest.discriminator = void 0; -TemplateUpdateFilesRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/templateUpdateFilesResponse.ts -var _TemplateUpdateFilesResponse = class { +var TemplateUpdateFilesResponse = class _TemplateUpdateFilesResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "template", + baseName: "template", + type: "TemplateUpdateFilesResponseTemplate" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "TemplateUpdateFilesResponse"); } }; -var TemplateUpdateFilesResponse = _TemplateUpdateFilesResponse; -TemplateUpdateFilesResponse.discriminator = void 0; -TemplateUpdateFilesResponse.attributeTypeMap = [ - { - name: "template", - baseName: "template", - type: "TemplateUpdateFilesResponseTemplate" - } -]; // model/templateUpdateFilesResponseTemplate.ts -var _TemplateUpdateFilesResponseTemplate = class { +var TemplateUpdateFilesResponseTemplate = class _TemplateUpdateFilesResponseTemplate { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "templateId", + baseName: "template_id", + type: "string" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _TemplateUpdateFilesResponseTemplate.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24706,43 +25908,262 @@ var _TemplateUpdateFilesResponseTemplate = class { ); } }; -var TemplateUpdateFilesResponseTemplate = _TemplateUpdateFilesResponseTemplate; -TemplateUpdateFilesResponseTemplate.discriminator = void 0; -TemplateUpdateFilesResponseTemplate.attributeTypeMap = [ - { - name: "templateId", - baseName: "template_id", - type: "string" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/unclaimedDraftCreateEmbeddedRequest.ts -var _UnclaimedDraftCreateEmbeddedRequest = class { +var UnclaimedDraftCreateEmbeddedRequest = class _UnclaimedDraftCreateEmbeddedRequest { constructor() { + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + */ this["allowCcs"] = true; + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the signers. + */ this["forceSignerPage"] = false; + /** + * Provide users the ability to review/edit the subject and message. + */ this["forceSubjectMessage"] = false; + /** + * Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. + */ this["hideTextTags"] = false; + /** + * The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. + */ this["holdRequest"] = false; + /** + * The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. + */ this["isForEmbeddedSigning"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. + */ this["type"] = _UnclaimedDraftCreateEmbeddedRequest.TypeEnum.RequestSignature; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["usePreexistingFields"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["useTextTags"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "forceSignerPage", + baseName: "force_signer_page", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "holdRequest", + baseName: "hold_request", + type: "boolean" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "type", + baseName: "type", + type: "UnclaimedDraftCreateEmbeddedRequest.TypeEnum" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24750,190 +26171,6 @@ var _UnclaimedDraftCreateEmbeddedRequest = class { ); } }; -var UnclaimedDraftCreateEmbeddedRequest = _UnclaimedDraftCreateEmbeddedRequest; -UnclaimedDraftCreateEmbeddedRequest.discriminator = void 0; -UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "forceSignerPage", - baseName: "force_signer_page", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "holdRequest", - baseName: "hold_request", - type: "boolean" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "type", - baseName: "type", - type: "UnclaimedDraftCreateEmbeddedRequest.TypeEnum" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; ((UnclaimedDraftCreateEmbeddedRequest2) => { let TypeEnum; ((TypeEnum2) => { @@ -24943,25 +26180,222 @@ UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap = [ })(UnclaimedDraftCreateEmbeddedRequest || (UnclaimedDraftCreateEmbeddedRequest = {})); // model/unclaimedDraftCreateEmbeddedWithTemplateRequest.ts -var _UnclaimedDraftCreateEmbeddedWithTemplateRequest = class { +var UnclaimedDraftCreateEmbeddedWithTemplateRequest = class _UnclaimedDraftCreateEmbeddedWithTemplateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher. + */ this["allowReassign"] = false; + /** + * Provide users the ability to review/edit the template signer roles. + */ this["forceSignerRoles"] = false; + /** + * Provide users the ability to review/edit the template subject and message. + */ this["forceSubjectMessage"] = false; + /** + * The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. + */ this["holdRequest"] = false; + /** + * The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. + */ this["isForEmbeddedSigning"] = false; + /** + * This allows the requester to enable the preview experience (i.e. does not allow the requester\'s end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). + */ this["previewOnly"] = false; + /** + * This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. + */ this["showPreview"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. + */ this["skipMeNow"] = false; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer\'s information during signing. **NOTE:** Keep your signer\'s information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. + */ this["populateAutoFillFields"] = false; + /** + * This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. + */ this["allowCcs"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "templateIds", + baseName: "template_ids", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "allowReassign", + baseName: "allow_reassign", + type: "boolean" + }, + { + name: "ccs", + baseName: "ccs", + type: "Array" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "forceSignerRoles", + baseName: "force_signer_roles", + type: "boolean" + }, + { + name: "forceSubjectMessage", + baseName: "force_subject_message", + type: "boolean" + }, + { + name: "holdRequest", + baseName: "hold_request", + type: "boolean" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "previewOnly", + baseName: "preview_only", + type: "boolean" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showPreview", + baseName: "show_preview", + type: "boolean" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "skipMeNow", + baseName: "skip_me_now", + type: "boolean" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "title", + baseName: "title", + type: "string" + }, + { + name: "populateAutoFillFields", + baseName: "populate_auto_fill_fields", + type: "boolean" + }, + { + name: "allowCcs", + baseName: "allow_ccs", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -24969,302 +26403,170 @@ var _UnclaimedDraftCreateEmbeddedWithTemplateRequest = class { ); } }; -var UnclaimedDraftCreateEmbeddedWithTemplateRequest = _UnclaimedDraftCreateEmbeddedWithTemplateRequest; -UnclaimedDraftCreateEmbeddedWithTemplateRequest.discriminator = void 0; -UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "templateIds", - baseName: "template_ids", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "allowReassign", - baseName: "allow_reassign", - type: "boolean" - }, - { - name: "ccs", - baseName: "ccs", - type: "Array" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "forceSignerRoles", - baseName: "force_signer_roles", - type: "boolean" - }, - { - name: "forceSubjectMessage", - baseName: "force_subject_message", - type: "boolean" - }, - { - name: "holdRequest", - baseName: "hold_request", - type: "boolean" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "previewOnly", - baseName: "preview_only", - type: "boolean" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showPreview", - baseName: "show_preview", - type: "boolean" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "skipMeNow", - baseName: "skip_me_now", - type: "boolean" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "title", - baseName: "title", - type: "string" - }, - { - name: "populateAutoFillFields", - baseName: "populate_auto_fill_fields", - type: "boolean" - }, - { - name: "allowCcs", - baseName: "allow_ccs", - type: "boolean" - } -]; // model/unclaimedDraftCreateRequest.ts -var _UnclaimedDraftCreateRequest = class { +var UnclaimedDraftCreateRequest = class _UnclaimedDraftCreateRequest { constructor() { + /** + * Allows signers to decline to sign a document if `true`. Defaults to `false`. + */ this["allowDecline"] = false; + /** + * Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. + */ this["hideTextTags"] = false; + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["usePreexistingFields"] = false; + /** + * Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. + */ this["useTextTags"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "type", + baseName: "type", + type: "UnclaimedDraftCreateRequest.TypeEnum" + }, + { + name: "files", + baseName: "files", + type: "Array" + }, + { + name: "fileUrls", + baseName: "file_urls", + type: "Array" + }, + { + name: "allowDecline", + baseName: "allow_decline", + type: "boolean" + }, + { + name: "attachments", + baseName: "attachments", + type: "Array" + }, + { + name: "ccEmailAddresses", + baseName: "cc_email_addresses", + type: "Array" + }, + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "customFields", + baseName: "custom_fields", + type: "Array" + }, + { + name: "fieldOptions", + baseName: "field_options", + type: "SubFieldOptions" + }, + { + name: "formFieldGroups", + baseName: "form_field_groups", + type: "Array" + }, + { + name: "formFieldRules", + baseName: "form_field_rules", + type: "Array" + }, + { + name: "formFieldsPerDocument", + baseName: "form_fields_per_document", + type: "Array" + }, + { + name: "hideTextTags", + baseName: "hide_text_tags", + type: "boolean" + }, + { + name: "message", + baseName: "message", + type: "string" + }, + { + name: "metadata", + baseName: "metadata", + type: "{ [key: string]: any; }" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signers", + baseName: "signers", + type: "Array" + }, + { + name: "signingOptions", + baseName: "signing_options", + type: "SubSigningOptions" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "subject", + baseName: "subject", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + }, + { + name: "usePreexistingFields", + baseName: "use_preexisting_fields", + type: "boolean" + }, + { + name: "useTextTags", + baseName: "use_text_tags", + type: "boolean" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftCreateRequest"); } }; -var UnclaimedDraftCreateRequest = _UnclaimedDraftCreateRequest; -UnclaimedDraftCreateRequest.discriminator = void 0; -UnclaimedDraftCreateRequest.attributeTypeMap = [ - { - name: "type", - baseName: "type", - type: "UnclaimedDraftCreateRequest.TypeEnum" - }, - { - name: "files", - baseName: "files", - type: "Array" - }, - { - name: "fileUrls", - baseName: "file_urls", - type: "Array" - }, - { - name: "allowDecline", - baseName: "allow_decline", - type: "boolean" - }, - { - name: "attachments", - baseName: "attachments", - type: "Array" - }, - { - name: "ccEmailAddresses", - baseName: "cc_email_addresses", - type: "Array" - }, - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "customFields", - baseName: "custom_fields", - type: "Array" - }, - { - name: "fieldOptions", - baseName: "field_options", - type: "SubFieldOptions" - }, - { - name: "formFieldGroups", - baseName: "form_field_groups", - type: "Array" - }, - { - name: "formFieldRules", - baseName: "form_field_rules", - type: "Array" - }, - { - name: "formFieldsPerDocument", - baseName: "form_fields_per_document", - type: "Array" - }, - { - name: "hideTextTags", - baseName: "hide_text_tags", - type: "boolean" - }, - { - name: "message", - baseName: "message", - type: "string" - }, - { - name: "metadata", - baseName: "metadata", - type: "{ [key: string]: any; }" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signers", - baseName: "signers", - type: "Array" - }, - { - name: "signingOptions", - baseName: "signing_options", - type: "SubSigningOptions" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "subject", - baseName: "subject", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - }, - { - name: "usePreexistingFields", - baseName: "use_preexisting_fields", - type: "boolean" - }, - { - name: "useTextTags", - baseName: "use_text_tags", - type: "boolean" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - } -]; ((UnclaimedDraftCreateRequest2) => { let TypeEnum; ((TypeEnum2) => { @@ -25274,38 +26576,96 @@ UnclaimedDraftCreateRequest.attributeTypeMap = [ })(UnclaimedDraftCreateRequest || (UnclaimedDraftCreateRequest = {})); // model/unclaimedDraftCreateResponse.ts -var _UnclaimedDraftCreateResponse = class { +var UnclaimedDraftCreateResponse = class _UnclaimedDraftCreateResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "unclaimedDraft", + baseName: "unclaimed_draft", + type: "UnclaimedDraftResponse" + }, + { + name: "warnings", + baseName: "warnings", + type: "Array" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftCreateResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftCreateResponse"); } }; -var UnclaimedDraftCreateResponse = _UnclaimedDraftCreateResponse; -UnclaimedDraftCreateResponse.discriminator = void 0; -UnclaimedDraftCreateResponse.attributeTypeMap = [ - { - name: "unclaimedDraft", - baseName: "unclaimed_draft", - type: "UnclaimedDraftResponse" - }, - { - name: "warnings", - baseName: "warnings", - type: "Array" - } -]; // model/unclaimedDraftEditAndResendRequest.ts -var _UnclaimedDraftEditAndResendRequest = class { +var UnclaimedDraftEditAndResendRequest = class _UnclaimedDraftEditAndResendRequest { constructor() { + /** + * When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. + */ this["showProgressStepper"] = true; + /** + * Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. + */ this["testMode"] = false; } + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "clientId", + baseName: "client_id", + type: "string" + }, + { + name: "editorOptions", + baseName: "editor_options", + type: "SubEditorOptions" + }, + { + name: "isForEmbeddedSigning", + baseName: "is_for_embedded_signing", + type: "boolean" + }, + { + name: "requesterEmailAddress", + baseName: "requester_email_address", + type: "string" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "showProgressStepper", + baseName: "show_progress_stepper", + type: "boolean" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftEditAndResendRequest.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize( data, @@ -25313,118 +26673,82 @@ var _UnclaimedDraftEditAndResendRequest = class { ); } }; -var UnclaimedDraftEditAndResendRequest = _UnclaimedDraftEditAndResendRequest; -UnclaimedDraftEditAndResendRequest.discriminator = void 0; -UnclaimedDraftEditAndResendRequest.attributeTypeMap = [ - { - name: "clientId", - baseName: "client_id", - type: "string" - }, - { - name: "editorOptions", - baseName: "editor_options", - type: "SubEditorOptions" - }, - { - name: "isForEmbeddedSigning", - baseName: "is_for_embedded_signing", - type: "boolean" - }, - { - name: "requesterEmailAddress", - baseName: "requester_email_address", - type: "string" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "showProgressStepper", - baseName: "show_progress_stepper", - type: "boolean" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/unclaimedDraftResponse.ts -var _UnclaimedDraftResponse = class { +var UnclaimedDraftResponse = class _UnclaimedDraftResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "signatureRequestId", + baseName: "signature_request_id", + type: "string" + }, + { + name: "claimUrl", + baseName: "claim_url", + type: "string" + }, + { + name: "signingRedirectUrl", + baseName: "signing_redirect_url", + type: "string" + }, + { + name: "requestingRedirectUrl", + baseName: "requesting_redirect_url", + type: "string" + }, + { + name: "expiresAt", + baseName: "expires_at", + type: "number" + }, + { + name: "testMode", + baseName: "test_mode", + type: "boolean" + } + ]; + } static getAttributeTypeMap() { return _UnclaimedDraftResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "UnclaimedDraftResponse"); } }; -var UnclaimedDraftResponse = _UnclaimedDraftResponse; -UnclaimedDraftResponse.discriminator = void 0; -UnclaimedDraftResponse.attributeTypeMap = [ - { - name: "signatureRequestId", - baseName: "signature_request_id", - type: "string" - }, - { - name: "claimUrl", - baseName: "claim_url", - type: "string" - }, - { - name: "signingRedirectUrl", - baseName: "signing_redirect_url", - type: "string" - }, - { - name: "requestingRedirectUrl", - baseName: "requesting_redirect_url", - type: "string" - }, - { - name: "expiresAt", - baseName: "expires_at", - type: "number" - }, - { - name: "testMode", - baseName: "test_mode", - type: "boolean" - } -]; // model/warningResponse.ts -var _WarningResponse = class { +var WarningResponse = class _WarningResponse { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "warningMsg", + baseName: "warning_msg", + type: "string" + }, + { + name: "warningName", + baseName: "warning_name", + type: "string" + } + ]; + } static getAttributeTypeMap() { return _WarningResponse.attributeTypeMap; } + /** Attempt to instantiate and hydrate a new instance of this class */ static init(data) { return ObjectSerializer.deserialize(data, "WarningResponse"); } }; -var WarningResponse = _WarningResponse; -WarningResponse.discriminator = void 0; -WarningResponse.attributeTypeMap = [ - { - name: "warningMsg", - baseName: "warning_msg", - type: "string" - }, - { - name: "warningName", - baseName: "warning_name", - type: "string" - } -]; // model/index.ts var enumsMap = { @@ -25673,7 +26997,7 @@ var AccountApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -25699,190 +27023,98 @@ var AccountApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - accountCreate(_0) { - return __async(this, arguments, function* (accountCreateRequest, options = { headers: {} }) { - accountCreateRequest = deserializeIfNeeded( + /** + * Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + * @summary Create Account + * @param accountCreateRequest + * @param options + */ + async accountCreate(accountCreateRequest, options = { headers: {} }) { + accountCreateRequest = deserializeIfNeeded( + accountCreateRequest, + "AccountCreateRequest" + ); + const localVarPath = this.basePath + "/account/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountCreateRequest === null || accountCreateRequest === void 0) { + throw new Error( + "Required parameter accountCreateRequest was null or undefined when calling accountCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountCreateRequest, + AccountCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( accountCreateRequest, "AccountCreateRequest" ); - const localVarPath = this.basePath + "/account/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountCreateRequest === null || accountCreateRequest === void 0) { - throw new Error( - "Required parameter accountCreateRequest was null or undefined when calling accountCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountCreateRequest, - AccountCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountCreateRequest, - "AccountCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - accountGet(_0, _1) { - return __async(this, arguments, function* (accountId, emailAddress, options = { headers: {} }) { - const localVarPath = this.basePath + "/account"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (emailAddress !== void 0) { - localVarQueryParameters["email_address"] = ObjectSerializer.serialize( - emailAddress, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse( resolve, reject, response, - "AccountGetResponse" + "AccountCreateResponse" ); }, (error) => { @@ -25894,7 +27126,7 @@ var AccountApi = class { reject, error.response, 200, - "AccountGetResponse" + "AccountCreateResponse" )) { return; } @@ -25909,93 +27141,326 @@ var AccountApi = class { reject(error); } ); - }); + } + ); + }); + } + /** + * Returns the properties and settings of your Account. + * @summary Get Account + * @param accountId `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. + * @param emailAddress `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. + * @param options + */ + async accountGet(accountId, emailAddress, options = { headers: {} }) { + const localVarPath = this.basePath + "/account"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (emailAddress !== void 0) { + localVarQueryParameters["email_address"] = ObjectSerializer.serialize( + emailAddress, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - accountUpdate(_0) { - return __async(this, arguments, function* (accountUpdateRequest, options = { headers: {} }) { - accountUpdateRequest = deserializeIfNeeded( + /** + * Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * @summary Update Account + * @param accountUpdateRequest + * @param options + */ + async accountUpdate(accountUpdateRequest, options = { headers: {} }) { + accountUpdateRequest = deserializeIfNeeded( + accountUpdateRequest, + "AccountUpdateRequest" + ); + const localVarPath = this.basePath + "/account"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountUpdateRequest === null || accountUpdateRequest === void 0) { + throw new Error( + "Required parameter accountUpdateRequest was null or undefined when calling accountUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountUpdateRequest, + AccountUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( accountUpdateRequest, "AccountUpdateRequest" ); - const localVarPath = this.basePath + "/account"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountUpdateRequest === null || accountUpdateRequest === void 0) { - throw new Error( - "Required parameter accountUpdateRequest was null or undefined when calling accountUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountUpdateRequest, - AccountUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountUpdateRequest, - "AccountUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountGetResponse" + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse( + reject, + error.response, + 200, + "AccountGetResponse" + )) { + return; + } + if (handleErrorRangeResponse( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + }); + }); + } + /** + * Verifies whether an Dropbox Sign Account exists for the given email address. + * @summary Verify Account + * @param accountVerifyRequest + * @param options + */ + async accountVerify(accountVerifyRequest, options = { headers: {} }) { + accountVerifyRequest = deserializeIfNeeded( + accountVerifyRequest, + "AccountVerifyRequest" + ); + const localVarPath = this.basePath + "/account/verify"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountVerifyRequest === null || accountVerifyRequest === void 0) { + throw new Error( + "Required parameter accountVerifyRequest was null or undefined when calling accountVerify." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + accountVerifyRequest, + AccountVerifyRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + accountVerifyRequest, + "AccountVerifyRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse( + resolve, + reject, + response, + "AccountVerifyResponse" ); }, (error) => { @@ -26007,7 +27472,7 @@ var AccountApi = class { reject, error.response, 200, - "AccountGetResponse" + "AccountVerifyResponse" )) { return; } @@ -26022,123 +27487,8 @@ var AccountApi = class { reject(error); } ); - }); - }); - }); - } - accountVerify(_0) { - return __async(this, arguments, function* (accountVerifyRequest, options = { headers: {} }) { - accountVerifyRequest = deserializeIfNeeded( - accountVerifyRequest, - "AccountVerifyRequest" - ); - const localVarPath = this.basePath + "/account/verify"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountVerifyRequest === null || accountVerifyRequest === void 0) { - throw new Error( - "Required parameter accountVerifyRequest was null or undefined when calling accountVerify." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - accountVerifyRequest, - AccountVerifyRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - accountVerifyRequest, - "AccountVerifyRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse( - resolve, - reject, - response, - "AccountVerifyResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse( - reject, - error.response, - 200, - "AccountVerifyResponse" - )) { - return; - } - if (handleErrorRangeResponse( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } }; @@ -26202,7 +27552,7 @@ var ApiAppApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26228,513 +27578,541 @@ var ApiAppApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - apiAppCreate(_0) { - return __async(this, arguments, function* (apiAppCreateRequest, options = { headers: {} }) { - apiAppCreateRequest = deserializeIfNeeded2( + /** + * Creates a new API App. + * @summary Create API App + * @param apiAppCreateRequest + * @param options + */ + async apiAppCreate(apiAppCreateRequest, options = { headers: {} }) { + apiAppCreateRequest = deserializeIfNeeded2( + apiAppCreateRequest, + "ApiAppCreateRequest" + ); + const localVarPath = this.basePath + "/api_app"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (apiAppCreateRequest === null || apiAppCreateRequest === void 0) { + throw new Error( + "Required parameter apiAppCreateRequest was null or undefined when calling apiAppCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + apiAppCreateRequest, + ApiAppCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( apiAppCreateRequest, "ApiAppCreateRequest" ); - const localVarPath = this.basePath + "/api_app"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (apiAppCreateRequest === null || apiAppCreateRequest === void 0) { - throw new Error( - "Required parameter apiAppCreateRequest was null or undefined when calling apiAppCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - apiAppCreateRequest, - ApiAppCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - apiAppCreateRequest, - "ApiAppCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 201, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 201, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppDelete(_0) { - return __async(this, arguments, function* (clientId, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Deletes an API App. Can only be invoked for apps you own. + * @summary Delete API App + * @param clientId The client id of the API App to delete. + * @param options + */ + async apiAppDelete(clientId, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2(resolve, reject, response); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppGet(_0) { - return __async(this, arguments, function* (clientId, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns an object with information about an API App. + * @summary Get API App + * @param clientId The client id of the API App to retrieve. + * @param options + */ + async apiAppGet(clientId, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/api_app/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + * @summary List API Apps + * @param page Which page number of the API App List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async apiAppList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/api_app/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppListResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppListResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - apiAppUpdate(_0, _1) { - return __async(this, arguments, function* (clientId, apiAppUpdateRequest, options = { headers: {} }) { - apiAppUpdateRequest = deserializeIfNeeded2( + /** + * Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + * @summary Update API App + * @param clientId The client id of the API App to update. + * @param apiAppUpdateRequest + * @param options + */ + async apiAppUpdate(clientId, apiAppUpdateRequest, options = { headers: {} }) { + apiAppUpdateRequest = deserializeIfNeeded2( + apiAppUpdateRequest, + "ApiAppUpdateRequest" + ); + const localVarPath = this.basePath + "/api_app/{client_id}".replace( + "{client_id}", + encodeURIComponent(String(clientId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (clientId === null || clientId === void 0) { + throw new Error( + "Required parameter clientId was null or undefined when calling apiAppUpdate." + ); + } + if (apiAppUpdateRequest === null || apiAppUpdateRequest === void 0) { + throw new Error( + "Required parameter apiAppUpdateRequest was null or undefined when calling apiAppUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + apiAppUpdateRequest, + ApiAppUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( apiAppUpdateRequest, "ApiAppUpdateRequest" ); - const localVarPath = this.basePath + "/api_app/{client_id}".replace( - "{client_id}", - encodeURIComponent(String(clientId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (clientId === null || clientId === void 0) { - throw new Error( - "Required parameter clientId was null or undefined when calling apiAppUpdate." - ); - } - if (apiAppUpdateRequest === null || apiAppUpdateRequest === void 0) { - throw new Error( - "Required parameter apiAppUpdateRequest was null or undefined when calling apiAppUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - apiAppUpdateRequest, - ApiAppUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - apiAppUpdateRequest, - "ApiAppUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse2( - resolve, - reject, - response, - "ApiAppGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse2( - reject, - error.response, - 200, - "ApiAppGetResponse" - )) { - return; - } - if (handleErrorRangeResponse2( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse2( + resolve, + reject, + response, + "ApiAppGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse2( + reject, + error.response, + 200, + "ApiAppGetResponse" + )) { + return; + } + if (handleErrorRangeResponse2( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -26799,7 +28177,7 @@ var BulkSendJobApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -26825,214 +28203,225 @@ var BulkSendJobApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - bulkSendJobGet(_0, _1, _2) { - return __async(this, arguments, function* (bulkSendJobId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/bulk_send_job/{bulk_send_job_id}".replace( - "{bulk_send_job_id}", - encodeURIComponent(String(bulkSendJobId)) + /** + * Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + * @summary Get Bulk Send Job + * @param bulkSendJobId The id of the BulkSendJob to retrieve. + * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + * @param options + */ + async bulkSendJobGet(bulkSendJobId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/bulk_send_job/{bulk_send_job_id}".replace( + "{bulk_send_job_id}", + encodeURIComponent(String(bulkSendJobId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (bulkSendJobId === null || bulkSendJobId === void 0) { + throw new Error( + "Required parameter bulkSendJobId was null or undefined when calling bulkSendJobGet." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (bulkSendJobId === null || bulkSendJobId === void 0) { - throw new Error( - "Required parameter bulkSendJobId was null or undefined when calling bulkSendJobGet." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse3( - resolve, - reject, - response, - "BulkSendJobGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse3( - reject, - error.response, - 200, - "BulkSendJobGetResponse" - )) { - return; - } - if (handleErrorRangeResponse3( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse3( + resolve, + reject, + response, + "BulkSendJobGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse3( + reject, + error.response, + 200, + "BulkSendJobGetResponse" + )) { + return; + } + if (handleErrorRangeResponse3( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - bulkSendJobList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/bulk_send_job/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns a list of BulkSendJob that you can access. + * @summary List Bulk Send Jobs + * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. + * @param options + */ + async bulkSendJobList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/bulk_send_job/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse3( - resolve, - reject, - response, - "BulkSendJobListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse3( - reject, - error.response, - 200, - "BulkSendJobListResponse" - )) { - return; - } - if (handleErrorRangeResponse3( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse3( + resolve, + reject, + response, + "BulkSendJobListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse3( + reject, + error.response, + 200, + "BulkSendJobListResponse" + )) { + return; + } + if (handleErrorRangeResponse3( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -27090,7 +28479,7 @@ var EmbeddedApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -27116,224 +28505,236 @@ var EmbeddedApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - embeddedEditUrl(_0, _1) { - return __async(this, arguments, function* (templateId, embeddedEditUrlRequest, options = { headers: {} }) { - embeddedEditUrlRequest = deserializeIfNeeded3( - embeddedEditUrlRequest, - "EmbeddedEditUrlRequest" + /** + * Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + * @summary Get Embedded Template Edit URL + * @param templateId The id of the template to edit. + * @param embeddedEditUrlRequest + * @param options + */ + async embeddedEditUrl(templateId, embeddedEditUrlRequest, options = { headers: {} }) { + embeddedEditUrlRequest = deserializeIfNeeded3( + embeddedEditUrlRequest, + "EmbeddedEditUrlRequest" + ); + const localVarPath = this.basePath + "/embedded/edit_url/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling embeddedEditUrl." ); - const localVarPath = this.basePath + "/embedded/edit_url/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (embeddedEditUrlRequest === null || embeddedEditUrlRequest === void 0) { + throw new Error( + "Required parameter embeddedEditUrlRequest was null or undefined when calling embeddedEditUrl." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling embeddedEditUrl." - ); - } - if (embeddedEditUrlRequest === null || embeddedEditUrlRequest === void 0) { - throw new Error( - "Required parameter embeddedEditUrlRequest was null or undefined when calling embeddedEditUrl." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - embeddedEditUrlRequest, - EmbeddedEditUrlRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - embeddedEditUrlRequest, - "EmbeddedEditUrlRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + embeddedEditUrlRequest, + EmbeddedEditUrlRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + embeddedEditUrlRequest, + "EmbeddedEditUrlRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse4( - resolve, - reject, - response, - "EmbeddedEditUrlResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse4( - reject, - error.response, - 200, - "EmbeddedEditUrlResponse" - )) { - return; - } - if (handleErrorRangeResponse4( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse4( + resolve, + reject, + response, + "EmbeddedEditUrlResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse4( + reject, + error.response, + 200, + "EmbeddedEditUrlResponse" + )) { + return; + } + if (handleErrorRangeResponse4( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - embeddedSignUrl(_0) { - return __async(this, arguments, function* (signatureId, options = { headers: {} }) { - const localVarPath = this.basePath + "/embedded/sign_url/{signature_id}".replace( - "{signature_id}", - encodeURIComponent(String(signatureId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + * @summary Get Embedded Sign URL + * @param signatureId The id of the signature to get a signature url for. + * @param options + */ + async embeddedSignUrl(signatureId, options = { headers: {} }) { + const localVarPath = this.basePath + "/embedded/sign_url/{signature_id}".replace( + "{signature_id}", + encodeURIComponent(String(signatureId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureId === null || signatureId === void 0) { + throw new Error( + "Required parameter signatureId was null or undefined when calling embeddedSignUrl." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureId === null || signatureId === void 0) { - throw new Error( - "Required parameter signatureId was null or undefined when calling embeddedSignUrl." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse4( - resolve, - reject, - response, - "EmbeddedSignUrlResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse4( - reject, - error.response, - 200, - "EmbeddedSignUrlResponse" - )) { - return; - } - if (handleErrorRangeResponse4( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse4( + resolve, + reject, + response, + "EmbeddedSignUrlResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse4( + reject, + error.response, + 200, + "EmbeddedSignUrlResponse" + )) { + return; + } + if (handleErrorRangeResponse4( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -27397,7 +28798,7 @@ var FaxApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -27423,456 +28824,480 @@ var FaxApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxDelete(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) + /** + * Deletes the specified Fax from the system + * @summary Delete Fax + * @param faxId Fax ID + * @param options + */ + async faxDelete(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Downloads files associated with a Fax + * @summary Download Fax Files + * @param faxId Fax ID + * @param options + */ + async faxFiles(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/files/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxFiles." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "Buffer" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxFiles(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/files/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/pdf", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxFiles." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns information about a Fax + * @summary Get Fax + * @param faxId Fax ID + * @param options + */ + async faxGet(faxId, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/{fax_id}".replace( + "{fax_id}", + encodeURIComponent(String(faxId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxId === null || faxId === void 0) { + throw new Error( + "Required parameter faxId was null or undefined when calling faxGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "Buffer" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "RequestFile" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxGetResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxGet(_0) { - return __async(this, arguments, function* (faxId, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/{fax_id}".replace( - "{fax_id}", - encodeURIComponent(String(faxId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxId === null || faxId === void 0) { - throw new Error( - "Required parameter faxId was null or undefined when calling faxGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns properties of multiple Faxes + * @summary Lists Faxes + * @param page Which page number of the Fax List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async faxList(page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxGetResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxListResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); - }); - }); - } - faxList(_0, _1) { - return __async(this, arguments, function* (page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxListResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxListResponse" + )) { + return; } - ); - }); + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxSend(_0) { - return __async(this, arguments, function* (faxSendRequest, options = { headers: {} }) { - faxSendRequest = deserializeIfNeeded4(faxSendRequest, "FaxSendRequest"); - const localVarPath = this.basePath + "/fax/send"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxSendRequest === null || faxSendRequest === void 0) { - throw new Error( - "Required parameter faxSendRequest was null or undefined when calling faxSend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxSendRequest, - FaxSendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + /** + * Creates and sends a new Fax with the submitted file(s) + * @summary Send Fax + * @param faxSendRequest + * @param options + */ + async faxSend(faxSendRequest, options = { headers: {} }) { + faxSendRequest = deserializeIfNeeded4(faxSendRequest, "FaxSendRequest"); + const localVarPath = this.basePath + "/fax/send"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxSendRequest === null || faxSendRequest === void 0) { + throw new Error( + "Required parameter faxSendRequest was null or undefined when calling faxSend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxSendRequest, + FaxSendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(faxSendRequest, "FaxSendRequest"); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse5( - resolve, - reject, - response, - "FaxGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse5( - reject, - error.response, - 200, - "FaxGetResponse" - )) { - return; - } - if (handleErrorRangeResponse5( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse5( + resolve, + reject, + response, + "FaxGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse5( + reject, + error.response, + 200, + "FaxGetResponse" + )) { + return; + } + if (handleErrorRangeResponse5( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -27937,7 +29362,7 @@ var FaxLineApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -27963,84 +29388,211 @@ var FaxLineApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - faxLineAddUser(_0) { - return __async(this, arguments, function* (faxLineAddUserRequest, options = { headers: {} }) { - faxLineAddUserRequest = deserializeIfNeeded5( + /** + * Grants a user access to the specified Fax Line. + * @summary Add Fax Line User + * @param faxLineAddUserRequest + * @param options + */ + async faxLineAddUser(faxLineAddUserRequest, options = { headers: {} }) { + faxLineAddUserRequest = deserializeIfNeeded5( + faxLineAddUserRequest, + "FaxLineAddUserRequest" + ); + const localVarPath = this.basePath + "/fax_line/add_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { + throw new Error( + "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineAddUserRequest, + FaxLineAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineAddUserRequest, "FaxLineAddUserRequest" ); - const localVarPath = this.basePath + "/fax_line/add_user"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineAddUserRequest === null || faxLineAddUserRequest === void 0) { - throw new Error( - "Required parameter faxLineAddUserRequest was null or undefined when calling faxLineAddUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineAddUserRequest, - FaxLineAddUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineAddUserRequest, - "FaxLineAddUserRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Returns a list of available area codes for a given state/province and city + * @summary Get Available Fax Line Area Codes + * @param country Filter area codes by country + * @param state Filter area codes by state + * @param province Filter area codes by province + * @param city Filter area codes by city + * @param options + */ + async faxLineAreaCodeGet(country, state, province, city, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/area_codes"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (country === null || country === void 0) { + throw new Error( + "Required parameter country was null or undefined when calling faxLineAreaCodeGet." + ); + } + if (country !== void 0) { + localVarQueryParameters["country"] = ObjectSerializer.serialize( + country, + "'CA' | 'US' | 'UK'" + ); + } + if (state !== void 0) { + localVarQueryParameters["state"] = ObjectSerializer.serialize( + state, + "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" + ); + } + if (province !== void 0) { + localVarQueryParameters["province"] = ObjectSerializer.serialize( + province, + "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" + ); + } + if (city !== void 0) { + localVarQueryParameters["city"] = ObjectSerializer.serialize( + city, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse6( resolve, reject, response, - "FaxLineResponse" + "FaxLineAreaCodeGetResponse" ); }, (error) => { @@ -28052,7 +29604,7 @@ var FaxLineApi = class { reject, error.response, 200, - "FaxLineResponse" + "FaxLineAreaCodeGetResponse" )) { return; } @@ -28067,389 +29619,409 @@ var FaxLineApi = class { reject(error); } ); - }); - }); + } + ); }); } - faxLineAreaCodeGet(_0, _1, _2, _3) { - return __async(this, arguments, function* (country, state, province, city, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/area_codes"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (country === null || country === void 0) { - throw new Error( - "Required parameter country was null or undefined when calling faxLineAreaCodeGet." - ); - } - if (country !== void 0) { - localVarQueryParameters["country"] = ObjectSerializer.serialize( - country, - "'CA' | 'US' | 'UK'" - ); - } - if (state !== void 0) { - localVarQueryParameters["state"] = ObjectSerializer.serialize( - state, - "'AK' | 'AL' | 'AR' | 'AZ' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'IA' | 'ID' | 'IL' | 'IN' | 'KS' | 'KY' | 'LA' | 'MA' | 'MD' | 'ME' | 'MI' | 'MN' | 'MO' | 'MS' | 'MT' | 'NC' | 'ND' | 'NE' | 'NH' | 'NJ' | 'NM' | 'NV' | 'NY' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VA' | 'VT' | 'WA' | 'WI' | 'WV' | 'WY'" - ); - } - if (province !== void 0) { - localVarQueryParameters["province"] = ObjectSerializer.serialize( - province, - "'AB' | 'BC' | 'MB' | 'NB' | 'NL' | 'NT' | 'NS' | 'NU' | 'ON' | 'PE' | 'QC' | 'SK' | 'YT'" - ); - } - if (city !== void 0) { - localVarQueryParameters["city"] = ObjectSerializer.serialize( - city, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + /** + * Purchases a new Fax Line + * @summary Purchase Fax Line + * @param faxLineCreateRequest + * @param options + */ + async faxLineCreate(faxLineCreateRequest, options = { headers: {} }) { + faxLineCreateRequest = deserializeIfNeeded5( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + const localVarPath = this.basePath + "/fax_line/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { + throw new Error( + "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineCreateRequest, + FaxLineCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + faxLineCreateRequest, + "FaxLineCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineAreaCodeGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineAreaCodeGetResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - faxLineCreate(_0) { - return __async(this, arguments, function* (faxLineCreateRequest, options = { headers: {} }) { - faxLineCreateRequest = deserializeIfNeeded5( - faxLineCreateRequest, - "FaxLineCreateRequest" - ); - const localVarPath = this.basePath + "/fax_line/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Deletes the specified Fax Line from the subscription. + * @summary Delete Fax Line + * @param faxLineDeleteRequest + * @param options + */ + async faxLineDelete(faxLineDeleteRequest, options = { headers: {} }) { + faxLineDeleteRequest = deserializeIfNeeded5( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { + throw new Error( + "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineCreateRequest === null || faxLineCreateRequest === void 0) { - throw new Error( - "Required parameter faxLineCreateRequest was null or undefined when calling faxLineCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineCreateRequest, - FaxLineCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineCreateRequest, - "FaxLineCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineDeleteRequest, + FaxLineDeleteRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + faxLineDeleteRequest, + "FaxLineDeleteRequest" + ); + } + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6(resolve, reject, response); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxLineDelete(_0) { - return __async(this, arguments, function* (faxLineDeleteRequest, options = { headers: {} }) { - faxLineDeleteRequest = deserializeIfNeeded5( - faxLineDeleteRequest, - "FaxLineDeleteRequest" - ); - const localVarPath = this.basePath + "/fax_line"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineDeleteRequest === null || faxLineDeleteRequest === void 0) { - throw new Error( - "Required parameter faxLineDeleteRequest was null or undefined when calling faxLineDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineDeleteRequest, - FaxLineDeleteRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineDeleteRequest, - "FaxLineDeleteRequest" - ); - } - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns the properties and settings of a Fax Line. + * @summary Get Fax Line + * @param number The Fax Line number + * @param options + */ + async faxLineGet(number, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (number === null || number === void 0) { + throw new Error( + "Required parameter number was null or undefined when calling faxLineGet." + ); + } + if (number !== void 0) { + localVarQueryParameters["number"] = ObjectSerializer.serialize( + number, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - faxLineGet(_0) { - return __async(this, arguments, function* (number, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (number === null || number === void 0) { - throw new Error( - "Required parameter number was null or undefined when calling faxLineGet." - ); - } - if (number !== void 0) { - localVarQueryParameters["number"] = ObjectSerializer.serialize( - number, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + /** + * Returns the properties and settings of multiple Fax Lines. + * @summary List Fax Lines + * @param accountId Account ID + * @param page Which page number of the Fax Line List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param showTeamLines Include Fax Lines belonging to team members in the list + * @param options + */ + async faxLineList(accountId, page, pageSize, showTeamLines, options = { headers: {} }) { + const localVarPath = this.basePath + "/fax_line/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (showTeamLines !== void 0) { + localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( + showTeamLines, + "boolean" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse6( resolve, reject, response, - "FaxLineResponse" + "FaxLineListResponse" ); }, (error) => { @@ -28461,7 +30033,7 @@ var FaxLineApi = class { reject, error.response, 200, - "FaxLineResponse" + "FaxLineListResponse" )) { return; } @@ -28476,223 +30048,122 @@ var FaxLineApi = class { reject(error); } ); - }); - }); - }); - } - faxLineList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, showTeamLines, options = { headers: {} }) { - const localVarPath = this.basePath + "/fax_line/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (showTeamLines !== void 0) { - localVarQueryParameters["show_team_lines"] = ObjectSerializer.serialize( - showTeamLines, - "boolean" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineListResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } - faxLineRemoveUser(_0) { - return __async(this, arguments, function* (faxLineRemoveUserRequest, options = { headers: {} }) { - faxLineRemoveUserRequest = deserializeIfNeeded5( + /** + * Removes a user\'s access to the specified Fax Line + * @summary Remove Fax Line Access + * @param faxLineRemoveUserRequest + * @param options + */ + async faxLineRemoveUser(faxLineRemoveUserRequest, options = { headers: {} }) { + faxLineRemoveUserRequest = deserializeIfNeeded5( + faxLineRemoveUserRequest, + "FaxLineRemoveUserRequest" + ); + const localVarPath = this.basePath + "/fax_line/remove_user"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { + throw new Error( + "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + faxLineRemoveUserRequest, + FaxLineRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( faxLineRemoveUserRequest, "FaxLineRemoveUserRequest" ); - const localVarPath = this.basePath + "/fax_line/remove_user"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (faxLineRemoveUserRequest === null || faxLineRemoveUserRequest === void 0) { - throw new Error( - "Required parameter faxLineRemoveUserRequest was null or undefined when calling faxLineRemoveUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - faxLineRemoveUserRequest, - FaxLineRemoveUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - faxLineRemoveUserRequest, - "FaxLineRemoveUserRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse6( - resolve, - reject, - response, - "FaxLineResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse6( - reject, - error.response, - 200, - "FaxLineResponse" - )) { - return; - } - if (handleErrorRangeResponse6( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse6( + resolve, + reject, + response, + "FaxLineResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse6( + reject, + error.response, + 200, + "FaxLineResponse" + )) { + return; + } + if (handleErrorRangeResponse6( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -28757,7 +30228,7 @@ var OAuthApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -28783,209 +30254,223 @@ var OAuthApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - oauthTokenGenerate(_0) { - return __async(this, arguments, function* (oAuthTokenGenerateRequest, options = { headers: {} }) { - oAuthTokenGenerateRequest = deserializeIfNeeded6( + /** + * Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + * @summary OAuth Token Generate + * @param oAuthTokenGenerateRequest + * @param options + */ + async oauthTokenGenerate(oAuthTokenGenerateRequest, options = { headers: {} }) { + oAuthTokenGenerateRequest = deserializeIfNeeded6( + oAuthTokenGenerateRequest, + "OAuthTokenGenerateRequest" + ); + const localVarPath = this.basePath + "/oauth/token"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenGenerateRequest, + OAuthTokenGenerateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( oAuthTokenGenerateRequest, "OAuthTokenGenerateRequest" ); - const localVarPath = this.basePath + "/oauth/token"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (oAuthTokenGenerateRequest === null || oAuthTokenGenerateRequest === void 0) { - throw new Error( - "Required parameter oAuthTokenGenerateRequest was null or undefined when calling oauthTokenGenerate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenGenerateRequest, - OAuthTokenGenerateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenGenerateRequest, - "OAuthTokenGenerateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse7( - resolve, - reject, - response, - "OAuthTokenResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse7( - reject, - error.response, - 200, - "OAuthTokenResponse" - )) { - return; - } - if (handleErrorRangeResponse7( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse7( + resolve, + reject, + response, + "OAuthTokenResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - oauthTokenRefresh(_0) { - return __async(this, arguments, function* (oAuthTokenRefreshRequest, options = { headers: {} }) { - oAuthTokenRefreshRequest = deserializeIfNeeded6( - oAuthTokenRefreshRequest, - "OAuthTokenRefreshRequest" - ); - const localVarPath = this.basePath + "/oauth/token?refresh"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + * @summary OAuth Token Refresh + * @param oAuthTokenRefreshRequest + * @param options + */ + async oauthTokenRefresh(oAuthTokenRefreshRequest, options = { headers: {} }) { + oAuthTokenRefreshRequest = deserializeIfNeeded6( + oAuthTokenRefreshRequest, + "OAuthTokenRefreshRequest" + ); + const localVarPath = this.basePath + "/oauth/token?refresh"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { + throw new Error( + "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (oAuthTokenRefreshRequest === null || oAuthTokenRefreshRequest === void 0) { - throw new Error( - "Required parameter oAuthTokenRefreshRequest was null or undefined when calling oauthTokenRefresh." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - oAuthTokenRefreshRequest, - OAuthTokenRefreshRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - oAuthTokenRefreshRequest, - "OAuthTokenRefreshRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + oAuthTokenRefreshRequest, + OAuthTokenRefreshRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } else { + data = ObjectSerializer.serialize( + oAuthTokenRefreshRequest, + "OAuthTokenRefreshRequest" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse7( - resolve, - reject, - response, - "OAuthTokenResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse7( - reject, - error.response, - 200, - "OAuthTokenResponse" - )) { - return; - } - if (handleErrorRangeResponse7( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse7( + resolve, + reject, + response, + "OAuthTokenResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - }); + if (handleErrorCodeResponse7( + reject, + error.response, + 200, + "OAuthTokenResponse" + )) { + return; + } + if (handleErrorRangeResponse7( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } @@ -29050,7 +30535,7 @@ var ReportApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -29076,114 +30561,121 @@ var ReportApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - reportCreate(_0) { - return __async(this, arguments, function* (reportCreateRequest, options = { headers: {} }) { - reportCreateRequest = deserializeIfNeeded7( + /** + * Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + * @summary Create Report + * @param reportCreateRequest + * @param options + */ + async reportCreate(reportCreateRequest, options = { headers: {} }) { + reportCreateRequest = deserializeIfNeeded7( + reportCreateRequest, + "ReportCreateRequest" + ); + const localVarPath = this.basePath + "/report/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (reportCreateRequest === null || reportCreateRequest === void 0) { + throw new Error( + "Required parameter reportCreateRequest was null or undefined when calling reportCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + reportCreateRequest, + ReportCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( reportCreateRequest, "ReportCreateRequest" ); - const localVarPath = this.basePath + "/report/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (reportCreateRequest === null || reportCreateRequest === void 0) { - throw new Error( - "Required parameter reportCreateRequest was null or undefined when calling reportCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - reportCreateRequest, - ReportCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - reportCreateRequest, - "ReportCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse8( - resolve, - reject, - response, - "ReportCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse8( - reject, - error.response, - 200, - "ReportCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse8( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse8( + resolve, + reject, + response, + "ReportCreateResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse8( + reject, + error.response, + 200, + "ReportCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse8( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } }; @@ -29247,7 +30739,7 @@ var SignatureRequestApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -29273,298 +30765,230 @@ var SignatureRequestApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - signatureRequestBulkCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + /** + * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. **NOTE:** Only available for Standard plan and higher. + * @summary Embedded Bulk Send with Template + * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestBulkCreateEmbeddedWithTemplate(signatureRequestBulkCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestBulkCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/bulk_create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestBulkCreateEmbeddedWithTemplateRequest === null || signatureRequestBulkCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestBulkCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestBulkCreateEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestBulkCreateEmbeddedWithTemplateRequest, + SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( signatureRequestBulkCreateEmbeddedWithTemplateRequest, "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" ); - const localVarPath = this.basePath + "/signature_request/bulk_create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestBulkCreateEmbeddedWithTemplateRequest === null || signatureRequestBulkCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestBulkCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestBulkCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestBulkCreateEmbeddedWithTemplateRequest, - "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "BulkSendJobSendResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "BulkSendJobSendResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "BulkSendJobSendResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "BulkSendJobSendResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestBulkSendWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( - signatureRequestBulkSendWithTemplateRequest, - "SignatureRequestBulkSendWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/bulk_send_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. **NOTE:** Only available for Standard plan and higher. + * @summary Bulk Send with Template + * @param signatureRequestBulkSendWithTemplateRequest + * @param options + */ + async signatureRequestBulkSendWithTemplate(signatureRequestBulkSendWithTemplateRequest, options = { headers: {} }) { + signatureRequestBulkSendWithTemplateRequest = deserializeIfNeeded8( + signatureRequestBulkSendWithTemplateRequest, + "SignatureRequestBulkSendWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/bulk_send_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestBulkSendWithTemplateRequest === null || signatureRequestBulkSendWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestBulkSendWithTemplateRequest was null or undefined when calling signatureRequestBulkSendWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestBulkSendWithTemplateRequest === null || signatureRequestBulkSendWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestBulkSendWithTemplateRequest was null or undefined when calling signatureRequestBulkSendWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestBulkSendWithTemplateRequest, - SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestBulkSendWithTemplateRequest, - "SignatureRequestBulkSendWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestBulkSendWithTemplateRequest, + SignatureRequestBulkSendWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "BulkSendJobSendResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "BulkSendJobSendResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestCancel(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/cancel/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestBulkSendWithTemplateRequest, + "SignatureRequestBulkSendWithTemplateRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestCancel." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "BulkSendJobSendResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "BulkSendJobSendResponse" + )) { + return; + } if (handleErrorRangeResponse9( reject, error.response, @@ -29576,803 +31000,572 @@ var SignatureRequestApi = class { reject(error); } ); - }); + } + ); + }); + } + /** + * Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + * @summary Cancel Incomplete Signature Request + * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. + * @param options + */ + async signatureRequestCancel(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/cancel/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestCancel." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); }); }); } - signatureRequestCreateEmbedded(_0) { - return __async(this, arguments, function* (signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( + /** + * Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Create Embedded Signature Request + * @param signatureRequestCreateEmbeddedRequest + * @param options + */ + async signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest, options = { headers: {} }) { + signatureRequestCreateEmbeddedRequest = deserializeIfNeeded8( + signatureRequestCreateEmbeddedRequest, + "SignatureRequestCreateEmbeddedRequest" + ); + const localVarPath = this.basePath + "/signature_request/create_embedded"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestCreateEmbeddedRequest === null || signatureRequestCreateEmbeddedRequest === void 0) { + throw new Error( + "Required parameter signatureRequestCreateEmbeddedRequest was null or undefined when calling signatureRequestCreateEmbedded." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestCreateEmbeddedRequest, + SignatureRequestCreateEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( signatureRequestCreateEmbeddedRequest, "SignatureRequestCreateEmbeddedRequest" ); - const localVarPath = this.basePath + "/signature_request/create_embedded"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestCreateEmbeddedRequest === null || signatureRequestCreateEmbeddedRequest === void 0) { - throw new Error( - "Required parameter signatureRequestCreateEmbeddedRequest was null or undefined when calling signatureRequestCreateEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestCreateEmbeddedRequest, - SignatureRequestCreateEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestCreateEmbeddedRequest, - "SignatureRequestCreateEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + /** + * Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Create Embedded Signature Request with Template + * @param signatureRequestCreateEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestCreateEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestCreateEmbeddedWithTemplateRequest, + "SignatureRequestCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestCreateEmbeddedWithTemplateRequest === null || signatureRequestCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestCreateEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestCreateEmbeddedWithTemplateRequest, + SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( signatureRequestCreateEmbeddedWithTemplateRequest, "SignatureRequestCreateEmbeddedWithTemplateRequest" ); - const localVarPath = this.basePath + "/signature_request/create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestCreateEmbeddedWithTemplateRequest === null || signatureRequestCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestCreateEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestCreateEmbeddedWithTemplateRequest, - SignatureRequestCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestCreateEmbeddedWithTemplateRequest, - "SignatureRequestCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestEdit(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestEditRequest, options = { headers: {} }) { - signatureRequestEditRequest = deserializeIfNeeded8( + /** + * Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditRequest + * @param options + */ + async signatureRequestEdit(signatureRequestId, signatureRequestEditRequest, options = { headers: {} }) { + signatureRequestEditRequest = deserializeIfNeeded8( + signatureRequestEditRequest, + "SignatureRequestEditRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEdit." + ); + } + if (signatureRequestEditRequest === null || signatureRequestEditRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditRequest was null or undefined when calling signatureRequestEdit." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditRequest, + SignatureRequestEditRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( signatureRequestEditRequest, "SignatureRequestEditRequest" ); - const localVarPath = this.basePath + "/signature_request/edit/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestEdit." - ); - } - if (signatureRequestEditRequest === null || signatureRequestEditRequest === void 0) { - throw new Error( - "Required parameter signatureRequestEditRequest was null or undefined when calling signatureRequestEdit." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestEditRequest, - SignatureRequestEditRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestEditRequest, - "SignatureRequestEditRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); - }); - } - signatureRequestEditEmbedded(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestEditEmbeddedRequest, options = { headers: {} }) { - signatureRequestEditEmbeddedRequest = deserializeIfNeeded8( - signatureRequestEditEmbeddedRequest, - "SignatureRequestEditEmbeddedRequest" - ); - const localVarPath = this.basePath + "/signature_request/edit_embedded/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbedded." - ); - } - if (signatureRequestEditEmbeddedRequest === null || signatureRequestEditEmbeddedRequest === void 0) { - throw new Error( - "Required parameter signatureRequestEditEmbeddedRequest was null or undefined when calling signatureRequestEditEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestEditEmbeddedRequest, - SignatureRequestEditEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestEditEmbeddedRequest, - "SignatureRequestEditEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; } - ); - } - ); - }); - }); - } - signatureRequestEditEmbeddedWithTemplate(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest, options = { headers: {} }) { - signatureRequestEditEmbeddedWithTemplateRequest = deserializeIfNeeded8( - signatureRequestEditEmbeddedWithTemplateRequest, - "SignatureRequestEditEmbeddedWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/edit_embedded_with_template/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." - ); - } - if (signatureRequestEditEmbeddedWithTemplateRequest === null || signatureRequestEditEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestEditEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestEditEmbeddedWithTemplateRequest, - SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestEditEmbeddedWithTemplateRequest, - "SignatureRequestEditEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; } - ); - } - ); - }); + reject(error); + } + ); + } + ); }); } - signatureRequestEditWithTemplate(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestEditWithTemplateRequest, options = { headers: {} }) { - signatureRequestEditWithTemplateRequest = deserializeIfNeeded8( - signatureRequestEditWithTemplateRequest, - "SignatureRequestEditWithTemplateRequest" - ); - const localVarPath = this.basePath + "/signature_request/edit_with_template/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedRequest + * @param options + */ + async signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest, options = { headers: {} }) { + signatureRequestEditEmbeddedRequest = deserializeIfNeeded8( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_embedded/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbedded." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditEmbeddedRequest === null || signatureRequestEditEmbeddedRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedRequest was null or undefined when calling signatureRequestEditEmbedded." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditWithTemplate." - ); - } - if (signatureRequestEditWithTemplateRequest === null || signatureRequestEditWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestEditWithTemplateRequest was null or undefined when calling signatureRequestEditWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestEditWithTemplateRequest, - SignatureRequestEditWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestEditWithTemplateRequest, - "SignatureRequestEditWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditEmbeddedRequest, + SignatureRequestEditEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestFiles(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, fileType, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedRequest, + "SignatureRequestEditEmbeddedRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/zip", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFiles." - ); - } - if (fileType !== void 0) { - localVarQueryParameters["file_type"] = ObjectSerializer.serialize( - fileType, - "'pdf' | 'zip'" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse9( resolve, reject, response, - "Buffer" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30384,7 +31577,7 @@ var SignatureRequestApi = class { reject, error.response, 200, - "RequestFile" + "SignatureRequestGetResponse" )) { return; } @@ -30399,178 +31592,111 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestFilesAsDataUri(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files_as_data_uri/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + * @summary Edit Embedded Signature Request with Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditEmbeddedWithTemplateRequest + * @param options + */ + async signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest, options = { headers: {} }) { + signatureRequestEditEmbeddedWithTemplateRequest = deserializeIfNeeded8( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_embedded_with_template/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditEmbeddedWithTemplateRequest === null || signatureRequestEditEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditEmbeddedWithTemplateRequest was null or undefined when calling signatureRequestEditEmbeddedWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsDataUri." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditEmbeddedWithTemplateRequest, + SignatureRequestEditEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "FileResponseDataUri" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "FileResponseDataUri" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestFilesAsFileUrl(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, forceDownload, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/files_as_file_url/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } else { + data = ObjectSerializer.serialize( + signatureRequestEditEmbeddedWithTemplateRequest, + "SignatureRequestEditEmbeddedWithTemplateRequest" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsFileUrl." - ); - } - if (forceDownload !== void 0) { - localVarQueryParameters["force_download"] = ObjectSerializer.serialize( - forceDownload, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { handleSuccessfulResponse9( resolve, reject, response, - "FileResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -30582,7 +31708,7 @@ var SignatureRequestApi = class { reject, error.response, 200, - "FileResponse" + "SignatureRequestGetResponse" )) { return; } @@ -30597,502 +31723,540 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestGet(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + /** + * Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not deduct your signature request quota. + * @summary Edit Signature Request With Template + * @param signatureRequestId The id of the SignatureRequest to edit. + * @param signatureRequestEditWithTemplateRequest + * @param options + */ + async signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest, options = { headers: {} }) { + signatureRequestEditWithTemplateRequest = deserializeIfNeeded8( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/edit_with_template/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestEditWithTemplate." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (signatureRequestEditWithTemplateRequest === null || signatureRequestEditWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestEditWithTemplateRequest was null or undefined when calling signatureRequestEditWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestEditWithTemplateRequest, + SignatureRequestEditWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestEditWithTemplateRequest, + "SignatureRequestEditWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, query, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (query !== void 0) { - localVarQueryParameters["query"] = ObjectSerializer.serialize( - query, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + * @param options + */ + async signatureRequestFiles(signatureRequestId, fileType, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/zip", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFiles." + ); + } + if (fileType !== void 0) { + localVarQueryParameters["file_type"] = ObjectSerializer.serialize( + fileType, + "'pdf' | 'zip'" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestListResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "Buffer" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - signatureRequestReleaseHold(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/release_hold/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files as Data Uri + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param options + */ + async signatureRequestFilesAsDataUri(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files_as_data_uri/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsDataUri." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestReleaseHold." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "FileResponseDataUri" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "FileResponseDataUri" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - signatureRequestRemind(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { - signatureRequestRemindRequest = deserializeIfNeeded8( - signatureRequestRemindRequest, - "SignatureRequestRemindRequest" - ); - const localVarPath = this.basePath + "/signature_request/remind/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. + * @summary Download Files as File Url + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + * @param options + */ + async signatureRequestFilesAsFileUrl(signatureRequestId, forceDownload, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/files_as_file_url/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestFilesAsFileUrl." + ); + } + if (forceDownload !== void 0) { + localVarQueryParameters["force_download"] = ObjectSerializer.serialize( + forceDownload, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemind." - ); - } - if (signatureRequestRemindRequest === null || signatureRequestRemindRequest === void 0) { - throw new Error( - "Required parameter signatureRequestRemindRequest was null or undefined when calling signatureRequestRemind." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestRemindRequest, - SignatureRequestRemindRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestRemindRequest, - "SignatureRequestRemindRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "FileResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "FileResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - signatureRequestRemove(_0) { - return __async(this, arguments, function* (signatureRequestId, options = { headers: {} }) { - const localVarPath = this.basePath + "/signature_request/remove/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + * @summary Get Signature Request + * @param signatureRequestId The id of the SignatureRequest to retrieve. + * @param options + */ + async signatureRequestGet(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemove." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse9(resolve, reject, response); + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } if (handleErrorRangeResponse9( reject, error.response, @@ -31104,539 +32268,100 @@ var SignatureRequestApi = class { reject(error); } ); - }); - }); + } + ); }); } - signatureRequestSend(_0) { - return __async(this, arguments, function* (signatureRequestSendRequest, options = { headers: {} }) { - signatureRequestSendRequest = deserializeIfNeeded8( - signatureRequestSendRequest, - "SignatureRequestSendRequest" + /** + * Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + * @summary List Signature Requests + * @param accountId Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + * @param page Which page number of the SignatureRequest List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param query String that includes search terms and/or fields to be used to filter the SignatureRequest objects. + * @param options + */ + async signatureRequestList(accountId, page, pageSize, query, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" ); - const localVarPath = this.basePath + "/signature_request/send"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestSendRequest === null || signatureRequestSendRequest === void 0) { - throw new Error( - "Required parameter signatureRequestSendRequest was null or undefined when calling signatureRequestSend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestSendRequest, - SignatureRequestSendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestSendRequest, - "SignatureRequestSendRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestSendWithTemplate(_0) { - return __async(this, arguments, function* (signatureRequestSendWithTemplateRequest, options = { headers: {} }) { - signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( - signatureRequestSendWithTemplateRequest, - "SignatureRequestSendWithTemplateRequest" + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" ); - const localVarPath = this.basePath + "/signature_request/send_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (query !== void 0) { + localVarQueryParameters["query"] = ObjectSerializer.serialize( + query, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestSendWithTemplateRequest === null || signatureRequestSendWithTemplateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestSendWithTemplateRequest was null or undefined when calling signatureRequestSendWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestSendWithTemplateRequest, - SignatureRequestSendWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestSendWithTemplateRequest, - "SignatureRequestSendWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - signatureRequestUpdate(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { - signatureRequestUpdateRequest = deserializeIfNeeded8( - signatureRequestUpdateRequest, - "SignatureRequestUpdateRequest" - ); - const localVarPath = this.basePath + "/signature_request/update/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling signatureRequestUpdate." - ); - } - if (signatureRequestUpdateRequest === null || signatureRequestUpdateRequest === void 0) { - throw new Error( - "Required parameter signatureRequestUpdateRequest was null or undefined when calling signatureRequestUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - signatureRequestUpdateRequest, - SignatureRequestUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - signatureRequestUpdateRequest, - "SignatureRequestUpdateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse9( - resolve, - reject, - response, - "SignatureRequestGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse9( - reject, - error.response, - 200, - "SignatureRequestGetResponse" - )) { - return; - } - if (handleErrorRangeResponse9( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } -}; -function deserializeIfNeeded8(obj, classname) { - if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { - return ObjectSerializer.deserialize(obj, classname); - } - return obj; -} -function handleSuccessfulResponse9(resolve, reject, response, returnType) { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { - if (returnType) { - body = ObjectSerializer.deserialize(body, returnType); - } - resolve({ response, body }); - } else { - reject(new HttpError(response, body, response.status)); - } -} -function handleErrorCodeResponse9(reject, response, code, returnType) { - if (response.status !== code) { - return false; - } - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; -} -function handleErrorRangeResponse9(reject, response, code, returnType) { - let rangeCodeLeft = Number(code[0] + "00"); - let rangeCodeRight = Number(code[0] + "99"); - if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { - const body = ObjectSerializer.deserialize(response.data, returnType); - reject(new HttpError(response, body, response.status)); - return true; - } - return false; -} - -// api/teamApi.ts -var defaultBasePath10 = "https://api.hellosign.com/v3"; -var TeamApi = class { - constructor(basePath) { - this._basePath = defaultBasePath10; - this._defaultHeaders = { "User-Agent": USER_AGENT }; - this._useQuerystring = false; - this.authentications = { - default: new VoidAuth(), - api_key: new HttpBasicAuth(), - oauth2: new HttpBearerAuth() - }; - this.interceptors = []; - if (basePath) { - this.basePath = basePath; } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key) { - this.authentications.api_key.username = key; - } - set username(username) { - this.authentications.api_key.username = username; - } - set password(password) { - this.authentications.api_key.password = password; - } - set accessToken(accessToken) { - this.authentications.oauth2.accessToken = accessToken; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - teamAddMember(_0, _1) { - return __async(this, arguments, function* (teamAddMemberRequest, teamId, options = { headers: {} }) { - teamAddMemberRequest = deserializeIfNeeded9( - teamAddMemberRequest, - "TeamAddMemberRequest" - ); - const localVarPath = this.basePath + "/team/add_member"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamAddMemberRequest === null || teamAddMemberRequest === void 0) { - throw new Error( - "Required parameter teamAddMemberRequest was null or undefined when calling teamAddMember." - ); - } - if (teamId !== void 0) { - localVarQueryParameters["team_id"] = ObjectSerializer.serialize( - teamId, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamAddMemberRequest, - TeamAddMemberRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - teamAddMemberRequest, - "TeamAddMemberRequest" - ); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestListResponse" ); }, (error) => { @@ -31644,15 +32369,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestListResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31663,90 +32388,81 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamCreate(_0) { - return __async(this, arguments, function* (teamCreateRequest, options = { headers: {} }) { - teamCreateRequest = deserializeIfNeeded9( - teamCreateRequest, - "TeamCreateRequest" - ); - const localVarPath = this.basePath + "/team/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamCreateRequest === null || teamCreateRequest === void 0) { - throw new Error( - "Required parameter teamCreateRequest was null or undefined when calling teamCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamCreateRequest, - TeamCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(teamCreateRequest, "TeamCreateRequest"); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + * @summary Release On-Hold Signature Request + * @param signatureRequestId The id of the SignatureRequest to release. + * @param options + */ + async signatureRequestReleaseHold(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/release_hold/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestReleaseHold." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -31754,15 +32470,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31773,141 +32489,111 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamDelete() { - return __async(this, arguments, function* (options = { headers: {} }) { - const localVarPath = this.basePath + "/team/destroy"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "DELETE", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + /** + * Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. **NOTE:** This action can **not** be used with embedded signature requests. + * @summary Send Request Reminder + * @param signatureRequestId The id of the SignatureRequest to send a reminder for. + * @param signatureRequestRemindRequest + * @param options + */ + async signatureRequestRemind(signatureRequestId, signatureRequestRemindRequest, options = { headers: {} }) { + signatureRequestRemindRequest = deserializeIfNeeded8( + signatureRequestRemindRequest, + "SignatureRequestRemindRequest" + ); + const localVarPath = this.basePath + "/signature_request/remind/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemind." ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10(resolve, reject, response); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - }); - }); - }); - } - teamGet() { - return __async(this, arguments, function* (options = { headers: {} }) { - const localVarPath = this.basePath + "/team"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + if (signatureRequestRemindRequest === null || signatureRequestRemindRequest === void 0) { + throw new Error( + "Required parameter signatureRequestRemindRequest was null or undefined when calling signatureRequestRemind." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestRemindRequest, + SignatureRequestRemindRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestRemindRequest, + "SignatureRequestRemindRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -31915,15 +32601,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -31934,392 +32620,183 @@ var TeamApi = class { reject(error); } ); - }); - }); - }); - } - teamInfo(_0) { - return __async(this, arguments, function* (teamId, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/info"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId !== void 0) { - localVarQueryParameters["team_id"] = ObjectSerializer.serialize( - teamId, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamGetInfoResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamGetInfoResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); }); } - teamInvites(_0) { - return __async(this, arguments, function* (emailAddress, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/invites"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (emailAddress !== void 0) { - localVarQueryParameters["email_address"] = ObjectSerializer.serialize( - emailAddress, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + /** + * Removes your access to a completed signature request. This action is **not reversible**. The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + * @summary Remove Signature Request Access + * @param signatureRequestId The id of the SignatureRequest to remove. + * @param options + */ + async signatureRequestRemove(signatureRequestId, options = { headers: {} }) { + const localVarPath = this.basePath + "/signature_request/remove/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestRemove." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamInvitesResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamInvitesResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - teamMembers(_0, _1, _2) { - return __async(this, arguments, function* (teamId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/members/{team_id}".replace( - "{team_id}", - encodeURIComponent(String(teamId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + * @summary Send Signature Request + * @param signatureRequestSendRequest + * @param options + */ + async signatureRequestSend(signatureRequestSendRequest, options = { headers: {} }) { + signatureRequestSendRequest = deserializeIfNeeded8( + signatureRequestSendRequest, + "SignatureRequestSendRequest" + ); + const localVarPath = this.basePath + "/signature_request/send"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestSendRequest === null || signatureRequestSendRequest === void 0) { + throw new Error( + "Required parameter signatureRequestSendRequest was null or undefined when calling signatureRequestSend." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId === null || teamId === void 0) { - throw new Error( - "Required parameter teamId was null or undefined when calling teamMembers." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestSendRequest, + SignatureRequestSendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) - ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamMembersResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamMembersResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - teamRemoveMember(_0) { - return __async(this, arguments, function* (teamRemoveMemberRequest, options = { headers: {} }) { - teamRemoveMemberRequest = deserializeIfNeeded9( - teamRemoveMemberRequest, - "TeamRemoveMemberRequest" + } else { + data = ObjectSerializer.serialize( + signatureRequestSendRequest, + "SignatureRequestSendRequest" ); - const localVarPath = this.basePath + "/team/remove_member"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamRemoveMemberRequest === null || teamRemoveMemberRequest === void 0) { - throw new Error( - "Required parameter teamRemoveMemberRequest was null or undefined when calling teamRemoveMember." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamRemoveMemberRequest, - TeamRemoveMemberRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - teamRemoveMemberRequest, - "TeamRemoveMemberRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -32327,15 +32804,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, - 201, - "TeamGetResponse" + 200, + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -32346,199 +32823,102 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } - teamSubTeams(_0, _1, _2) { - return __async(this, arguments, function* (teamId, page, pageSize, options = { headers: {} }) { - const localVarPath = this.basePath + "/team/sub_teams/{team_id}".replace( - "{team_id}", - encodeURIComponent(String(teamId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + * @summary Send with Template + * @param signatureRequestSendWithTemplateRequest + * @param options + */ + async signatureRequestSendWithTemplate(signatureRequestSendWithTemplateRequest, options = { headers: {} }) { + signatureRequestSendWithTemplateRequest = deserializeIfNeeded8( + signatureRequestSendWithTemplateRequest, + "SignatureRequestSendWithTemplateRequest" + ); + const localVarPath = this.basePath + "/signature_request/send_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestSendWithTemplateRequest === null || signatureRequestSendWithTemplateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestSendWithTemplateRequest was null or undefined when calling signatureRequestSendWithTemplate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamId === null || teamId === void 0) { - throw new Error( - "Required parameter teamId was null or undefined when calling teamSubTeams." - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestSendWithTemplateRequest, + SignatureRequestSendWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + signatureRequestSendWithTemplateRequest, + "SignatureRequestSendWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse10( - resolve, - reject, - response, - "TeamSubTeamsResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse10( - reject, - error.response, - 200, - "TeamSubTeamsResponse" - )) { - return; - } - if (handleErrorRangeResponse10( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - teamUpdate(_0) { - return __async(this, arguments, function* (teamUpdateRequest, options = { headers: {} }) { - teamUpdateRequest = deserializeIfNeeded9( - teamUpdateRequest, - "TeamUpdateRequest" - ); - const localVarPath = this.basePath + "/team"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (teamUpdateRequest === null || teamUpdateRequest === void 0) { - throw new Error( - "Required parameter teamUpdateRequest was null or undefined when calling teamUpdate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - teamUpdateRequest, - TeamUpdateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize(teamUpdateRequest, "TeamUpdateRequest"); - } - let localVarRequestOptions = { - method: "PUT", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse10( + handleSuccessfulResponse9( resolve, reject, response, - "TeamGetResponse" + "SignatureRequestGetResponse" ); }, (error) => { @@ -32546,15 +32926,15 @@ var TeamApi = class { reject(error); return; } - if (handleErrorCodeResponse10( + if (handleErrorCodeResponse9( reject, error.response, 200, - "TeamGetResponse" + "SignatureRequestGetResponse" )) { return; } - if (handleErrorRangeResponse10( + if (handleErrorRangeResponse9( reject, error.response, "4XX", @@ -32565,20 +32945,151 @@ var TeamApi = class { reject(error); } ); - }); - }); + } + ); }); } -}; -function deserializeIfNeeded9(obj, classname) { - if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { - return ObjectSerializer.deserialize(obj, classname); - } - return obj; -} -function handleSuccessfulResponse10(resolve, reject, response, returnType) { - let body = response.data; - if (response.status && response.status >= 200 && response.status <= 299) { + /** + * Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. Updating the email address of a signer will generate a new `signature_id` value. **NOTE:** This action cannot be performed on a signature request with an appended signature page. + * @summary Update Signature Request + * @param signatureRequestId The id of the SignatureRequest to update. + * @param signatureRequestUpdateRequest + * @param options + */ + async signatureRequestUpdate(signatureRequestId, signatureRequestUpdateRequest, options = { headers: {} }) { + signatureRequestUpdateRequest = deserializeIfNeeded8( + signatureRequestUpdateRequest, + "SignatureRequestUpdateRequest" + ); + const localVarPath = this.basePath + "/signature_request/update/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling signatureRequestUpdate." + ); + } + if (signatureRequestUpdateRequest === null || signatureRequestUpdateRequest === void 0) { + throw new Error( + "Required parameter signatureRequestUpdateRequest was null or undefined when calling signatureRequestUpdate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + signatureRequestUpdateRequest, + SignatureRequestUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + signatureRequestUpdateRequest, + "SignatureRequestUpdateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse9( + resolve, + reject, + response, + "SignatureRequestGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse9( + reject, + error.response, + 200, + "SignatureRequestGetResponse" + )) { + return; + } + if (handleErrorRangeResponse9( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } +}; +function deserializeIfNeeded8(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse9(resolve, reject, response, returnType) { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { body = ObjectSerializer.deserialize(body, returnType); } @@ -32587,7 +33098,7 @@ function handleSuccessfulResponse10(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse10(reject, response, code, returnType) { +function handleErrorCodeResponse9(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -32595,7 +33106,7 @@ function handleErrorCodeResponse10(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse10(reject, response, code, returnType) { +function handleErrorRangeResponse9(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -32606,11 +33117,11 @@ function handleErrorRangeResponse10(reject, response, code, returnType) { return false; } -// api/templateApi.ts -var defaultBasePath11 = "https://api.hellosign.com/v3"; -var TemplateApi = class { +// api/teamApi.ts +var defaultBasePath10 = "https://api.hellosign.com/v3"; +var TeamApi = class { constructor(basePath) { - this._basePath = defaultBasePath11; + this._basePath = defaultBasePath10; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -32630,7 +33141,7 @@ var TemplateApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -32656,427 +33167,502 @@ var TemplateApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - templateAddUser(_0, _1) { - return __async(this, arguments, function* (templateId, templateAddUserRequest, options = { headers: {} }) { - templateAddUserRequest = deserializeIfNeeded10( - templateAddUserRequest, - "TemplateAddUserRequest" - ); - const localVarPath = this.basePath + "/template/add_user/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + /** + * Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + * @summary Add User to Team + * @param teamAddMemberRequest + * @param teamId The id of the team. + * @param options + */ + async teamAddMember(teamAddMemberRequest, teamId, options = { headers: {} }) { + teamAddMemberRequest = deserializeIfNeeded9( + teamAddMemberRequest, + "TeamAddMemberRequest" + ); + const localVarPath = this.basePath + "/team/add_member"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamAddMemberRequest === null || teamAddMemberRequest === void 0) { + throw new Error( + "Required parameter teamAddMemberRequest was null or undefined when calling teamAddMember." ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateAddUser." - ); - } - if (templateAddUserRequest === null || templateAddUserRequest === void 0) { - throw new Error( - "Required parameter templateAddUserRequest was null or undefined when calling templateAddUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateAddUserRequest, - TemplateAddUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateAddUserRequest, - "TemplateAddUserRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamAddMemberRequest, + TeamAddMemberRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + teamAddMemberRequest, + "TeamAddMemberRequest" + ); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - templateCreate(_0) { - return __async(this, arguments, function* (templateCreateRequest, options = { headers: {} }) { - templateCreateRequest = deserializeIfNeeded10( - templateCreateRequest, - "TemplateCreateRequest" - ); - const localVarPath = this.basePath + "/template/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + * @summary Create Team + * @param teamCreateRequest + * @param options + */ + async teamCreate(teamCreateRequest, options = { headers: {} }) { + teamCreateRequest = deserializeIfNeeded9( + teamCreateRequest, + "TeamCreateRequest" + ); + const localVarPath = this.basePath + "/team/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamCreateRequest === null || teamCreateRequest === void 0) { + throw new Error( + "Required parameter teamCreateRequest was null or undefined when calling teamCreate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateCreateRequest === null || templateCreateRequest === void 0) { - throw new Error( - "Required parameter templateCreateRequest was null or undefined when calling templateCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateCreateRequest, - TemplateCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateCreateRequest, - "TemplateCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamCreateRequest, + TeamCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(teamCreateRequest, "TeamCreateRequest"); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - templateCreateEmbeddedDraft(_0) { - return __async(this, arguments, function* (templateCreateEmbeddedDraftRequest, options = { headers: {} }) { - templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( - templateCreateEmbeddedDraftRequest, - "TemplateCreateEmbeddedDraftRequest" + /** + * Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + * @summary Delete Team + * @param options + */ + async teamDelete(options = { headers: {} }) { + const localVarPath = this.basePath + "/team/destroy"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "DELETE", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const localVarPath = this.basePath + "/template/create_embedded_draft"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateCreateEmbeddedDraftRequest === null || templateCreateEmbeddedDraftRequest === void 0) { - throw new Error( - "Required parameter templateCreateEmbeddedDraftRequest was null or undefined when calling templateCreateEmbeddedDraft." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateCreateEmbeddedDraftRequest, - TemplateCreateEmbeddedDraftRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateCreateEmbeddedDraftRequest, - "TemplateCreateEmbeddedDraftRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. + * @summary Get Team + * @param options + */ + async teamGet(options = { headers: {} }) { + const localVarPath = this.basePath + "/team"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateCreateEmbeddedDraftResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateCreateEmbeddedDraftResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - templateDelete(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/delete/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Provides information about a team. + * @summary Get Team Info + * @param teamId The id of the team. + * @param options + */ + async teamInfo(teamId, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/info"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId !== void 0) { + localVarQueryParameters["team_id"] = ObjectSerializer.serialize( + teamId, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateDelete." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { - axios_default.request(localVarRequestOptions).then( + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11(resolve, reject, response); + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetInfoResponse" + ); }, (error) => { if (error.response == null) { reject(error); return; } - if (handleErrorRangeResponse11( + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetInfoResponse" + )) { + return; + } + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -33087,81 +33673,79 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateFiles(_0, _1) { - return __async(this, arguments, function* (templateId, fileType, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Provides a list of team invites (and their roles). + * @summary List Team Invites + * @param emailAddress The email address for which to display the team invites. + * @param options + */ + async teamInvites(emailAddress, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/invites"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (emailAddress !== void 0) { + localVarQueryParameters["email_address"] = ObjectSerializer.serialize( + emailAddress, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/pdf", "application/zip", "application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFiles." - ); - } - if (fileType !== void 0) { - localVarQueryParameters["file_type"] = ObjectSerializer.serialize( - fileType, - "'pdf' | 'zip'" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "arraybuffer" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse10( resolve, reject, response, - "Buffer" + "TeamInvitesResponse" ); }, (error) => { @@ -33169,15 +33753,15 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse10( reject, error.response, 200, - "RequestFile" + "TeamInvitesResponse" )) { return; } - if (handleErrorRangeResponse11( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -33188,178 +33772,95 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateFilesAsDataUri(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files_as_data_uri/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Provides a paginated list of members (and their roles) that belong to a given team. + * @summary List Team Members + * @param teamId The id of the team that a member list is being requested from. + * @param page Which page number of the team member list to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async teamMembers(teamId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/members/{team_id}".replace( + "{team_id}", + encodeURIComponent(String(teamId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId === null || teamId === void 0) { + throw new Error( + "Required parameter teamId was null or undefined when calling teamMembers." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFilesAsDataUri." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } - authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "FileResponseDataUri" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "FileResponseDataUri" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateFilesAsFileUrl(_0, _1) { - return __async(this, arguments, function* (templateId, forceDownload, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/files_as_file_url/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateFilesAsFileUrl." - ); - } - if (forceDownload !== void 0) { - localVarQueryParameters["force_download"] = ObjectSerializer.serialize( - forceDownload, - "number" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise((resolve, reject) => { + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { axios_default.request(localVarRequestOptions).then( (response) => { - handleSuccessfulResponse11( + handleSuccessfulResponse10( resolve, reject, response, - "FileResponse" + "TeamMembersResponse" ); }, (error) => { @@ -33367,15 +33868,15 @@ var TemplateApi = class { reject(error); return; } - if (handleErrorCodeResponse11( + if (handleErrorCodeResponse10( reject, error.response, 200, - "FileResponse" + "TeamMembersResponse" )) { return; } - if (handleErrorRangeResponse11( + if (handleErrorRangeResponse10( reject, error.response, "4XX", @@ -33386,474 +33887,370 @@ var TemplateApi = class { reject(error); } ); - }); - }); + } + ); }); } - templateGet(_0) { - return __async(this, arguments, function* (templateId, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + * @summary Remove User from Team + * @param teamRemoveMemberRequest + * @param options + */ + async teamRemoveMember(teamRemoveMemberRequest, options = { headers: {} }) { + teamRemoveMemberRequest = deserializeIfNeeded9( + teamRemoveMemberRequest, + "TeamRemoveMemberRequest" + ); + const localVarPath = this.basePath + "/team/remove_member"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamRemoveMemberRequest === null || teamRemoveMemberRequest === void 0) { + throw new Error( + "Required parameter teamRemoveMemberRequest was null or undefined when calling teamRemoveMember." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateGet." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamRemoveMemberRequest, + TeamRemoveMemberRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + teamRemoveMemberRequest, + "TeamRemoveMemberRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - templateList(_0, _1, _2, _3) { - return __async(this, arguments, function* (accountId, page, pageSize, query, options = { headers: {} }) { - const localVarPath = this.basePath + "/template/list"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (accountId !== void 0) { - localVarQueryParameters["account_id"] = ObjectSerializer.serialize( - accountId, - "string" - ); - } - if (page !== void 0) { - localVarQueryParameters["page"] = ObjectSerializer.serialize( - page, - "number" - ); - } - if (pageSize !== void 0) { - localVarQueryParameters["page_size"] = ObjectSerializer.serialize( - pageSize, - "number" - ); - } - if (query !== void 0) { - localVarQueryParameters["query"] = ObjectSerializer.serialize( - query, - "string" - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: "GET", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json" - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateListResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateListResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 201, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } - templateRemoveUser(_0, _1) { - return __async(this, arguments, function* (templateId, templateRemoveUserRequest, options = { headers: {} }) { - templateRemoveUserRequest = deserializeIfNeeded10( - templateRemoveUserRequest, - "TemplateRemoveUserRequest" + /** + * Provides a paginated list of sub teams that belong to a given team. + * @summary List Sub Teams + * @param teamId The id of the parent Team. + * @param page Which page number of the SubTeam List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param options + */ + async teamSubTeams(teamId, page, pageSize, options = { headers: {} }) { + const localVarPath = this.basePath + "/team/sub_teams/{team_id}".replace( + "{team_id}", + encodeURIComponent(String(teamId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamId === null || teamId === void 0) { + throw new Error( + "Required parameter teamId was null or undefined when calling teamSubTeams." ); - const localVarPath = this.basePath + "/template/remove_user/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateRemoveUser." - ); - } - if (templateRemoveUserRequest === null || templateRemoveUserRequest === void 0) { - throw new Error( - "Required parameter templateRemoveUserRequest was null or undefined when calling templateRemoveUser." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateRemoveUserRequest, - TemplateRemoveUserRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateRemoveUserRequest, - "TemplateRemoveUserRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateGetResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateGetResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamSubTeamsResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamSubTeamsResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - templateUpdateFiles(_0, _1) { - return __async(this, arguments, function* (templateId, templateUpdateFilesRequest, options = { headers: {} }) { - templateUpdateFilesRequest = deserializeIfNeeded10( - templateUpdateFilesRequest, - "TemplateUpdateFilesRequest" + /** + * Updates the name of your Team. + * @summary Update Team + * @param teamUpdateRequest + * @param options + */ + async teamUpdate(teamUpdateRequest, options = { headers: {} }) { + teamUpdateRequest = deserializeIfNeeded9( + teamUpdateRequest, + "TeamUpdateRequest" + ); + const localVarPath = this.basePath + "/team"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (teamUpdateRequest === null || teamUpdateRequest === void 0) { + throw new Error( + "Required parameter teamUpdateRequest was null or undefined when calling teamUpdate." ); - const localVarPath = this.basePath + "/template/update_files/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders - ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (templateId === null || templateId === void 0) { - throw new Error( - "Required parameter templateId was null or undefined when calling templateUpdateFiles." - ); - } - if (templateUpdateFilesRequest === null || templateUpdateFilesRequest === void 0) { - throw new Error( - "Required parameter templateUpdateFilesRequest was null or undefined when calling templateUpdateFiles." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - templateUpdateFilesRequest, - TemplateUpdateFilesRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - templateUpdateFilesRequest, - "TemplateUpdateFilesRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + teamUpdateRequest, + TeamUpdateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize(teamUpdateRequest, "TeamUpdateRequest"); + } + let localVarRequestOptions = { + method: "PUT", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse11( - resolve, - reject, - response, - "TemplateUpdateFilesResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse11( - reject, - error.response, - 200, - "TemplateUpdateFilesResponse" - )) { - return; - } - if (handleErrorRangeResponse11( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse10( + resolve, + reject, + response, + "TeamGetResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse10( + reject, + error.response, + 200, + "TeamGetResponse" + )) { + return; + } + if (handleErrorRangeResponse10( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } }; -function deserializeIfNeeded10(obj, classname) { +function deserializeIfNeeded9(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { return ObjectSerializer.deserialize(obj, classname); } return obj; } -function handleSuccessfulResponse11(resolve, reject, response, returnType) { +function handleSuccessfulResponse10(resolve, reject, response, returnType) { let body = response.data; if (response.status && response.status >= 200 && response.status <= 299) { if (returnType) { @@ -33864,7 +34261,7 @@ function handleSuccessfulResponse11(resolve, reject, response, returnType) { reject(new HttpError(response, body, response.status)); } } -function handleErrorCodeResponse11(reject, response, code, returnType) { +function handleErrorCodeResponse10(reject, response, code, returnType) { if (response.status !== code) { return false; } @@ -33872,7 +34269,7 @@ function handleErrorCodeResponse11(reject, response, code, returnType) { reject(new HttpError(response, body, response.status)); return true; } -function handleErrorRangeResponse11(reject, response, code, returnType) { +function handleErrorRangeResponse10(reject, response, code, returnType) { let rangeCodeLeft = Number(code[0] + "00"); let rangeCodeRight = Number(code[0] + "99"); if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { @@ -33883,11 +34280,11 @@ function handleErrorRangeResponse11(reject, response, code, returnType) { return false; } -// api/unclaimedDraftApi.ts -var defaultBasePath12 = "https://api.hellosign.com/v3"; -var UnclaimedDraftApi = class { +// api/templateApi.ts +var defaultBasePath11 = "https://api.hellosign.com/v3"; +var TemplateApi = class { constructor(basePath) { - this._basePath = defaultBasePath12; + this._basePath = defaultBasePath11; this._defaultHeaders = { "User-Agent": USER_AGENT }; this._useQuerystring = false; this.authentications = { @@ -33907,7 +34304,7 @@ var UnclaimedDraftApi = class { this._basePath = basePath; } set defaultHeaders(defaultHeaders) { - this._defaultHeaders = __spreadProps(__spreadValues({}, defaultHeaders), { "User-Agent": USER_AGENT }); + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; } get defaultHeaders() { return this._defaultHeaders; @@ -33933,474 +34330,1847 @@ var UnclaimedDraftApi = class { addInterceptor(interceptor) { this.interceptors.push(interceptor); } - unclaimedDraftCreate(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateRequest, options = { headers: {} }) { - unclaimedDraftCreateRequest = deserializeIfNeeded11( - unclaimedDraftCreateRequest, - "UnclaimedDraftCreateRequest" + /** + * Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + * @summary Add User to Template + * @param templateId The id of the Template to give the Account access to. + * @param templateAddUserRequest + * @param options + */ + async templateAddUser(templateId, templateAddUserRequest, options = { headers: {} }) { + templateAddUserRequest = deserializeIfNeeded10( + templateAddUserRequest, + "TemplateAddUserRequest" + ); + const localVarPath = this.basePath + "/template/add_user/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateAddUser." ); - const localVarPath = this.basePath + "/unclaimed_draft/create"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + if (templateAddUserRequest === null || templateAddUserRequest === void 0) { + throw new Error( + "Required parameter templateAddUserRequest was null or undefined when calling templateAddUser." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateRequest === null || unclaimedDraftCreateRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateRequest was null or undefined when calling unclaimedDraftCreate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateRequest, - UnclaimedDraftCreateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateRequest, - "UnclaimedDraftCreateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateAddUserRequest, + TemplateAddUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + templateAddUserRequest, + "TemplateAddUserRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - unclaimedDraftCreateEmbedded(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( - unclaimedDraftCreateEmbeddedRequest, - "UnclaimedDraftCreateEmbeddedRequest" - ); - const localVarPath = this.basePath + "/unclaimed_draft/create_embedded"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * Creates a template that can then be used. + * @summary Create Template + * @param templateCreateRequest + * @param options + */ + async templateCreate(templateCreateRequest, options = { headers: {} }) { + templateCreateRequest = deserializeIfNeeded10( + templateCreateRequest, + "TemplateCreateRequest" + ); + const localVarPath = this.basePath + "/template/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateCreateRequest === null || templateCreateRequest === void 0) { + throw new Error( + "Required parameter templateCreateRequest was null or undefined when calling templateCreate." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateEmbeddedRequest === null || unclaimedDraftCreateEmbeddedRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateEmbeddedRequest was null or undefined when calling unclaimedDraftCreateEmbedded." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateEmbeddedRequest, - UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateEmbeddedRequest, - "UnclaimedDraftCreateEmbeddedRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateCreateRequest, + TemplateCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + templateCreateRequest, + "TemplateCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateCreateResponse" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; } - ); - } - ); - }); + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); }); } - unclaimedDraftCreateEmbeddedWithTemplate(_0) { - return __async(this, arguments, function* (unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { - unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - "UnclaimedDraftCreateEmbeddedWithTemplateRequest" - ); - const localVarPath = this.basePath + "/unclaimed_draft/create_embedded_with_template"; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + /** + * The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template \'edit\' stage. + * @summary Create Embedded Template Draft + * @param templateCreateEmbeddedDraftRequest + * @param options + */ + async templateCreateEmbeddedDraft(templateCreateEmbeddedDraftRequest, options = { headers: {} }) { + templateCreateEmbeddedDraftRequest = deserializeIfNeeded10( + templateCreateEmbeddedDraftRequest, + "TemplateCreateEmbeddedDraftRequest" + ); + const localVarPath = this.basePath + "/template/create_embedded_draft"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateCreateEmbeddedDraftRequest === null || templateCreateEmbeddedDraftRequest === void 0) { + throw new Error( + "Required parameter templateCreateEmbeddedDraftRequest was null or undefined when calling templateCreateEmbeddedDraft." ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (unclaimedDraftCreateEmbeddedWithTemplateRequest === null || unclaimedDraftCreateEmbeddedWithTemplateRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftCreateEmbeddedWithTemplateRequest was null or undefined when calling unclaimedDraftCreateEmbeddedWithTemplate." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftCreateEmbeddedWithTemplateRequest, - "UnclaimedDraftCreateEmbeddedWithTemplateRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateCreateEmbeddedDraftRequest, + TemplateCreateEmbeddedDraftRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) - ); - } + } else { + data = ObjectSerializer.serialize( + templateCreateEmbeddedDraftRequest, + "TemplateCreateEmbeddedDraftRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) - ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } - reject(error); - } - ); - } - ); - }); - }); - } - unclaimedDraftEditAndResend(_0, _1) { - return __async(this, arguments, function* (signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { - unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( - unclaimedDraftEditAndResendRequest, - "UnclaimedDraftEditAndResendRequest" + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - const localVarPath = this.basePath + "/unclaimed_draft/edit_and_resend/{signature_request_id}".replace( - "{signature_request_id}", - encodeURIComponent(String(signatureRequestId)) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) ); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign( - {}, - this._defaultHeaders + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateCreateEmbeddedDraftResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateCreateEmbeddedDraftResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } ); - const produces = ["application/json"]; - if (produces.indexOf("application/json") >= 0) { - localVarHeaderParams["content-type"] = "application/json"; - } else { - localVarHeaderParams["content-type"] = produces.join(","); - } - let localVarFormParams = {}; - let localVarBodyParams = void 0; - if (signatureRequestId === null || signatureRequestId === void 0) { - throw new Error( - "Required parameter signatureRequestId was null or undefined when calling unclaimedDraftEditAndResend." - ); - } - if (unclaimedDraftEditAndResendRequest === null || unclaimedDraftEditAndResendRequest === void 0) { - throw new Error( - "Required parameter unclaimedDraftEditAndResendRequest was null or undefined when calling unclaimedDraftEditAndResend." - ); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - const result = generateFormData( - unclaimedDraftEditAndResendRequest, - UnclaimedDraftEditAndResendRequest.attributeTypeMap - ); - localVarUseFormData = result.localVarUseFormData; - let data = {}; - if (localVarUseFormData) { - const formData2 = toFormData3(result.data); - data = formData2; - localVarHeaderParams = __spreadValues(__spreadValues({}, localVarHeaderParams), formData2.getHeaders()); - } else { - data = ObjectSerializer.serialize( - unclaimedDraftEditAndResendRequest, - "UnclaimedDraftEditAndResendRequest" - ); - } - let localVarRequestOptions = { - method: "POST", - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: "json", - data - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.api_key.username) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.api_key.applyToRequest(localVarRequestOptions) - ); - } - if (this.authentications.oauth2.accessToken) { - authenticationPromise = authenticationPromise.then( - () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + }); + } + /** + * Completely deletes the template specified from the account. + * @summary Delete Template + * @param templateId The id of the Template to delete. + * @param options + */ + async templateDelete(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/delete/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateDelete." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11(resolve, reject, response); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } + }); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files + * @param templateId The id of the template files to retrieve. + * @param fileType Set to `pdf` for a single merged document or `zip` for a collection of individual documents. + * @param options + */ + async templateFiles(templateId, fileType, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/pdf", "application/zip", "application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFiles." + ); + } + if (fileType !== void 0) { + localVarQueryParameters["file_type"] = ObjectSerializer.serialize( + fileType, + "'pdf' | 'zip'" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "arraybuffer" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { authenticationPromise = authenticationPromise.then( - () => this.authentications.default.applyToRequest(localVarRequestOptions) + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) ); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then( - () => interceptor(localVarRequestOptions) + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "Buffer" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "RequestFile" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } ); - } - return interceptorPromise.then(() => { - return new Promise( - (resolve, reject) => { - axios_default.request(localVarRequestOptions).then( - (response) => { - handleSuccessfulResponse12( - resolve, - reject, - response, - "UnclaimedDraftCreateResponse" - ); - }, - (error) => { - if (error.response == null) { - reject(error); - return; - } - if (handleErrorCodeResponse12( - reject, - error.response, - 200, - "UnclaimedDraftCreateResponse" - )) { - return; - } - if (handleErrorRangeResponse12( - reject, - error.response, - "4XX", - "ErrorResponse" - )) { - return; - } + }); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files as Data Uri + * @param templateId The id of the template files to retrieve. + * @param options + */ + async templateFilesAsDataUri(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files_as_data_uri/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFilesAsDataUri." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "FileResponseDataUri" + ); + }, + (error) => { + if (error.response == null) { reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "FileResponseDataUri" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; } + reject(error); + } + ); + } + ); + }); + } + /** + * Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + * @summary Get Template Files as File Url + * @param templateId The id of the template files to retrieve. + * @param forceDownload By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. + * @param options + */ + async templateFilesAsFileUrl(templateId, forceDownload, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/files_as_file_url/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateFilesAsFileUrl." + ); + } + if (forceDownload !== void 0) { + localVarQueryParameters["force_download"] = ObjectSerializer.serialize( + forceDownload, + "number" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise((resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "FileResponse" ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "FileResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); } ); }); }); } + /** + * Returns the Template specified by the `template_id` parameter. + * @summary Get Template + * @param templateId The id of the Template to retrieve. + * @param options + */ + async templateGet(templateId, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateGet." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Returns a list of the Templates that are accessible by you. Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + * @summary List Templates + * @param accountId Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. + * @param page Which page number of the Template List to return. Defaults to `1`. + * @param pageSize Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. + * @param query String that includes search terms and/or fields to be used to filter the Template objects. + * @param options + */ + async templateList(accountId, page, pageSize, query, options = { headers: {} }) { + const localVarPath = this.basePath + "/template/list"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (accountId !== void 0) { + localVarQueryParameters["account_id"] = ObjectSerializer.serialize( + accountId, + "string" + ); + } + if (page !== void 0) { + localVarQueryParameters["page"] = ObjectSerializer.serialize( + page, + "number" + ); + } + if (pageSize !== void 0) { + localVarQueryParameters["page_size"] = ObjectSerializer.serialize( + pageSize, + "number" + ); + } + if (query !== void 0) { + localVarQueryParameters["query"] = ObjectSerializer.serialize( + query, + "string" + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + let localVarRequestOptions = { + method: "GET", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json" + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateListResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateListResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Removes the specified Account\'s access to the specified Template. + * @summary Remove User from Template + * @param templateId The id of the Template to remove the Account\'s access to. + * @param templateRemoveUserRequest + * @param options + */ + async templateRemoveUser(templateId, templateRemoveUserRequest, options = { headers: {} }) { + templateRemoveUserRequest = deserializeIfNeeded10( + templateRemoveUserRequest, + "TemplateRemoveUserRequest" + ); + const localVarPath = this.basePath + "/template/remove_user/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateRemoveUser." + ); + } + if (templateRemoveUserRequest === null || templateRemoveUserRequest === void 0) { + throw new Error( + "Required parameter templateRemoveUserRequest was null or undefined when calling templateRemoveUser." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateRemoveUserRequest, + TemplateRemoveUserRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateRemoveUserRequest, + "TemplateRemoveUserRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateGetResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateGetResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Overlays a new file with the overlay of an existing template. The new file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) being replaced. This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + * @summary Update Template Files + * @param templateId The ID of the template whose files to update. + * @param templateUpdateFilesRequest + * @param options + */ + async templateUpdateFiles(templateId, templateUpdateFilesRequest, options = { headers: {} }) { + templateUpdateFilesRequest = deserializeIfNeeded10( + templateUpdateFilesRequest, + "TemplateUpdateFilesRequest" + ); + const localVarPath = this.basePath + "/template/update_files/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (templateId === null || templateId === void 0) { + throw new Error( + "Required parameter templateId was null or undefined when calling templateUpdateFiles." + ); + } + if (templateUpdateFilesRequest === null || templateUpdateFilesRequest === void 0) { + throw new Error( + "Required parameter templateUpdateFilesRequest was null or undefined when calling templateUpdateFiles." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + templateUpdateFilesRequest, + TemplateUpdateFilesRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + templateUpdateFilesRequest, + "TemplateUpdateFilesRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse11( + resolve, + reject, + response, + "TemplateUpdateFilesResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse11( + reject, + error.response, + 200, + "TemplateUpdateFilesResponse" + )) { + return; + } + if (handleErrorRangeResponse11( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } +}; +function deserializeIfNeeded10(obj, classname) { + if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { + return ObjectSerializer.deserialize(obj, classname); + } + return obj; +} +function handleSuccessfulResponse11(resolve, reject, response, returnType) { + let body = response.data; + if (response.status && response.status >= 200 && response.status <= 299) { + if (returnType) { + body = ObjectSerializer.deserialize(body, returnType); + } + resolve({ response, body }); + } else { + reject(new HttpError(response, body, response.status)); + } +} +function handleErrorCodeResponse11(reject, response, code, returnType) { + if (response.status !== code) { + return false; + } + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; +} +function handleErrorRangeResponse11(reject, response, code, returnType) { + let rangeCodeLeft = Number(code[0] + "00"); + let rangeCodeRight = Number(code[0] + "99"); + if (response.status >= rangeCodeLeft && response.status <= rangeCodeRight) { + const body = ObjectSerializer.deserialize(response.data, returnType); + reject(new HttpError(response, body, response.status)); + return true; + } + return false; +} + +// api/unclaimedDraftApi.ts +var defaultBasePath12 = "https://api.hellosign.com/v3"; +var UnclaimedDraftApi = class { + constructor(basePath) { + this._basePath = defaultBasePath12; + this._defaultHeaders = { "User-Agent": USER_AGENT }; + this._useQuerystring = false; + this.authentications = { + default: new VoidAuth(), + api_key: new HttpBasicAuth(), + oauth2: new HttpBearerAuth() + }; + this.interceptors = []; + if (basePath) { + this.basePath = basePath; + } + } + set useQuerystring(value) { + this._useQuerystring = value; + } + set basePath(basePath) { + this._basePath = basePath; + } + set defaultHeaders(defaultHeaders) { + this._defaultHeaders = { ...defaultHeaders, "User-Agent": USER_AGENT }; + } + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { + return this._basePath; + } + setDefaultAuthentication(auth) { + this.authentications.default = auth; + } + setApiKey(key) { + this.authentications.api_key.username = key; + } + set username(username) { + this.authentications.api_key.username = username; + } + set password(password) { + this.authentications.api_key.password = password; + } + set accessToken(accessToken) { + this.authentications.oauth2.accessToken = accessToken; + } + addInterceptor(interceptor) { + this.interceptors.push(interceptor); + } + /** + * Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the \"Sign and send\" or the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + * @summary Create Unclaimed Draft + * @param unclaimedDraftCreateRequest + * @param options + */ + async unclaimedDraftCreate(unclaimedDraftCreateRequest, options = { headers: {} }) { + unclaimedDraftCreateRequest = deserializeIfNeeded11( + unclaimedDraftCreateRequest, + "UnclaimedDraftCreateRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateRequest === null || unclaimedDraftCreateRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateRequest was null or undefined when calling unclaimedDraftCreate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateRequest, + UnclaimedDraftCreateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateRequest, + "UnclaimedDraftCreateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Create Embedded Unclaimed Draft + * @param unclaimedDraftCreateEmbeddedRequest + * @param options + */ + async unclaimedDraftCreateEmbedded(unclaimedDraftCreateEmbeddedRequest, options = { headers: {} }) { + unclaimedDraftCreateEmbeddedRequest = deserializeIfNeeded11( + unclaimedDraftCreateEmbeddedRequest, + "UnclaimedDraftCreateEmbeddedRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create_embedded"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateEmbeddedRequest === null || unclaimedDraftCreateEmbeddedRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateEmbeddedRequest was null or undefined when calling unclaimedDraftCreateEmbedded." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateEmbeddedRequest, + UnclaimedDraftCreateEmbeddedRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateEmbeddedRequest, + "UnclaimedDraftCreateEmbeddedRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the \"Request signature\" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Create Embedded Unclaimed Draft with Template + * @param unclaimedDraftCreateEmbeddedWithTemplateRequest + * @param options + */ + async unclaimedDraftCreateEmbeddedWithTemplate(unclaimedDraftCreateEmbeddedWithTemplateRequest, options = { headers: {} }) { + unclaimedDraftCreateEmbeddedWithTemplateRequest = deserializeIfNeeded11( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/create_embedded_with_template"; + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (unclaimedDraftCreateEmbeddedWithTemplateRequest === null || unclaimedDraftCreateEmbeddedWithTemplateRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftCreateEmbeddedWithTemplateRequest was null or undefined when calling unclaimedDraftCreateEmbeddedWithTemplate." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + UnclaimedDraftCreateEmbeddedWithTemplateRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftCreateEmbeddedWithTemplateRequest, + "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } + /** + * Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester\'s email address will remain unchanged if `requester_email_address` parameter is not set. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + * @summary Edit and Resend Unclaimed Draft + * @param signatureRequestId The ID of the signature request to edit and resend. + * @param unclaimedDraftEditAndResendRequest + * @param options + */ + async unclaimedDraftEditAndResend(signatureRequestId, unclaimedDraftEditAndResendRequest, options = { headers: {} }) { + unclaimedDraftEditAndResendRequest = deserializeIfNeeded11( + unclaimedDraftEditAndResendRequest, + "UnclaimedDraftEditAndResendRequest" + ); + const localVarPath = this.basePath + "/unclaimed_draft/edit_and_resend/{signature_request_id}".replace( + "{signature_request_id}", + encodeURIComponent(String(signatureRequestId)) + ); + let localVarQueryParameters = {}; + let localVarHeaderParams = Object.assign( + {}, + this._defaultHeaders + ); + const produces = ["application/json"]; + if (produces.indexOf("application/json") >= 0) { + localVarHeaderParams["content-type"] = "application/json"; + } else { + localVarHeaderParams["content-type"] = produces.join(","); + } + let localVarFormParams = {}; + let localVarBodyParams = void 0; + if (signatureRequestId === null || signatureRequestId === void 0) { + throw new Error( + "Required parameter signatureRequestId was null or undefined when calling unclaimedDraftEditAndResend." + ); + } + if (unclaimedDraftEditAndResendRequest === null || unclaimedDraftEditAndResendRequest === void 0) { + throw new Error( + "Required parameter unclaimedDraftEditAndResendRequest was null or undefined when calling unclaimedDraftEditAndResend." + ); + } + Object.assign(localVarHeaderParams, options.headers); + let localVarUseFormData = false; + const result = generateFormData( + unclaimedDraftEditAndResendRequest, + UnclaimedDraftEditAndResendRequest.attributeTypeMap + ); + localVarUseFormData = result.localVarUseFormData; + let data = {}; + if (localVarUseFormData) { + const formData2 = toFormData3(result.data); + data = formData2; + localVarHeaderParams = { + ...localVarHeaderParams, + ...formData2.getHeaders() + }; + } else { + data = ObjectSerializer.serialize( + unclaimedDraftEditAndResendRequest, + "UnclaimedDraftEditAndResendRequest" + ); + } + let localVarRequestOptions = { + method: "POST", + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + paramsSerializer: this._useQuerystring ? queryParamsSerializer : void 0, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: "json", + data + }; + let authenticationPromise = Promise.resolve(); + if (this.authentications.api_key.username) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.api_key.applyToRequest(localVarRequestOptions) + ); + } + if (this.authentications.oauth2.accessToken) { + authenticationPromise = authenticationPromise.then( + () => this.authentications.oauth2.applyToRequest(localVarRequestOptions) + ); + } + authenticationPromise = authenticationPromise.then( + () => this.authentications.default.applyToRequest(localVarRequestOptions) + ); + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then( + () => interceptor(localVarRequestOptions) + ); + } + return interceptorPromise.then(() => { + return new Promise( + (resolve, reject) => { + axios_default.request(localVarRequestOptions).then( + (response) => { + handleSuccessfulResponse12( + resolve, + reject, + response, + "UnclaimedDraftCreateResponse" + ); + }, + (error) => { + if (error.response == null) { + reject(error); + return; + } + if (handleErrorCodeResponse12( + reject, + error.response, + 200, + "UnclaimedDraftCreateResponse" + )) { + return; + } + if (handleErrorRangeResponse12( + reject, + error.response, + "4XX", + "ErrorResponse" + )) { + return; + } + reject(error); + } + ); + } + ); + }); + } }; function deserializeIfNeeded11(obj, classname) { if (obj !== null && obj !== void 0 && obj.constructor.name !== classname) { @@ -34506,8 +36276,7 @@ var toFormData3 = (obj) => { return form; }; function isBufferDetailedFile(obj) { - var _a, _b; - return obj.value !== void 0 && Buffer.isBuffer(obj.value) && obj.options !== void 0 && ((_a = obj.options) == null ? void 0 : _a.filename) !== void 0 && ((_b = obj.options) == null ? void 0 : _b.contentType) !== void 0; + return obj.value !== void 0 && Buffer.isBuffer(obj.value) && obj.options !== void 0 && obj.options?.filename !== void 0 && obj.options?.contentType !== void 0; } var shouldJsonify = (val) => val === Object(val); @@ -34748,15 +36517,21 @@ var APIS = [ toFormData, typeMap }); -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ +/*! Bundled license information: + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) +*/ diff --git a/sdks/node/package-lock.json b/sdks/node/package-lock.json index 858c48267..329130a43 100644 --- a/sdks/node/package-lock.json +++ b/sdks/node/package-lock.json @@ -8,7 +8,7 @@ "name": "@dropbox/sign", "version": "1.8.1-dev", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -20,7 +20,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", @@ -44,12 +44,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -180,18 +181,18 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -207,111 +208,25 @@ } }, "node_modules/@babel/helpers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", - "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.4.tgz", - "integrity": "sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, "dependencies": { - "@babel/types": "^7.25.4" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -543,14 +458,14 @@ } }, "node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -575,14 +490,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", - "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -616,6 +530,406 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", + "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", + "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", + "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", + "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", + "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", + "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", + "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", + "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", + "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", + "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", + "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", + "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", + "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", + "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", + "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", + "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", + "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", + "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", + "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", + "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", + "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", + "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", + "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", + "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", + "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1250,9 +1564,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1704,9 +2018,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -1989,71 +2303,43 @@ } }, "node_modules/esbuild": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", - "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", + "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/linux-loong64": "0.14.54", - "esbuild-android-64": "0.14.54", - "esbuild-android-arm64": "0.14.54", - "esbuild-darwin-64": "0.14.54", - "esbuild-darwin-arm64": "0.14.54", - "esbuild-freebsd-64": "0.14.54", - "esbuild-freebsd-arm64": "0.14.54", - "esbuild-linux-32": "0.14.54", - "esbuild-linux-64": "0.14.54", - "esbuild-linux-arm": "0.14.54", - "esbuild-linux-arm64": "0.14.54", - "esbuild-linux-mips64le": "0.14.54", - "esbuild-linux-ppc64le": "0.14.54", - "esbuild-linux-riscv64": "0.14.54", - "esbuild-linux-s390x": "0.14.54", - "esbuild-netbsd-64": "0.14.54", - "esbuild-openbsd-64": "0.14.54", - "esbuild-sunos-64": "0.14.54", - "esbuild-windows-32": "0.14.54", - "esbuild-windows-64": "0.14.54", - "esbuild-windows-arm64": "0.14.54" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", - "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", - "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" + "@esbuild/aix-ppc64": "0.25.1", + "@esbuild/android-arm": "0.25.1", + "@esbuild/android-arm64": "0.25.1", + "@esbuild/android-x64": "0.25.1", + "@esbuild/darwin-arm64": "0.25.1", + "@esbuild/darwin-x64": "0.25.1", + "@esbuild/freebsd-arm64": "0.25.1", + "@esbuild/freebsd-x64": "0.25.1", + "@esbuild/linux-arm": "0.25.1", + "@esbuild/linux-arm64": "0.25.1", + "@esbuild/linux-ia32": "0.25.1", + "@esbuild/linux-loong64": "0.25.1", + "@esbuild/linux-mips64el": "0.25.1", + "@esbuild/linux-ppc64": "0.25.1", + "@esbuild/linux-riscv64": "0.25.1", + "@esbuild/linux-s390x": "0.25.1", + "@esbuild/linux-x64": "0.25.1", + "@esbuild/netbsd-arm64": "0.25.1", + "@esbuild/netbsd-x64": "0.25.1", + "@esbuild/openbsd-arm64": "0.25.1", + "@esbuild/openbsd-x64": "0.25.1", + "@esbuild/sunos-x64": "0.25.1", + "@esbuild/win32-arm64": "0.25.1", + "@esbuild/win32-ia32": "0.25.1", + "@esbuild/win32-x64": "0.25.1" } }, "node_modules/escalade": { @@ -4193,15 +4479,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/sdks/node/package.json b/sdks/node/package.json index c6b26b114..3c0531c93 100644 --- a/sdks/node/package.json +++ b/sdks/node/package.json @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -30,7 +30,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1", diff --git a/sdks/node/templates/package.mustache b/sdks/node/templates/package.mustache index ea815e46f..7b289f620 100644 --- a/sdks/node/templates/package.mustache +++ b/sdks/node/templates/package.mustache @@ -18,7 +18,7 @@ }, "author": "Dropbox Sign", "dependencies": { - "axios": "^1.7.0", + "axios": "^1.8.2", "bluebird": "^3.7.2", "form-data": "^4.0.0", "qs": "^6.10.3" @@ -30,7 +30,7 @@ "@types/node": "^20.8.10", "@types/qs": "^6.9.15", "axios-mock-adapter": "^1.20.0", - "esbuild": "^0.14.54", + "esbuild": "^0.25.1", "jest": "^29.7.0", "json-diff": "^0.7.1", "prettier": "2.5.1",