@createiq/backend 1.0.63 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,826 @@
1
- // client/sdk.gen.ts
2
- import { formDataBodySerializer } from "@hey-api/client-fetch";
1
+ // client/core/bodySerializer.gen.ts
2
+ var serializeFormDataPair = (data, key, value) => {
3
+ if (typeof value === "string" || value instanceof Blob) {
4
+ data.append(key, value);
5
+ } else if (value instanceof Date) {
6
+ data.append(key, value.toISOString());
7
+ } else {
8
+ data.append(key, JSON.stringify(value));
9
+ }
10
+ };
11
+ var formDataBodySerializer = {
12
+ bodySerializer: (body) => {
13
+ const data = new FormData();
14
+ Object.entries(body).forEach(([key, value]) => {
15
+ if (value === void 0 || value === null) {
16
+ return;
17
+ }
18
+ if (Array.isArray(value)) {
19
+ value.forEach((v) => serializeFormDataPair(data, key, v));
20
+ } else {
21
+ serializeFormDataPair(data, key, value);
22
+ }
23
+ });
24
+ return data;
25
+ }
26
+ };
27
+ var jsonBodySerializer = {
28
+ bodySerializer: (body) => JSON.stringify(
29
+ body,
30
+ (_key, value) => typeof value === "bigint" ? value.toString() : value
31
+ )
32
+ };
33
+
34
+ // client/core/params.gen.ts
35
+ var extraPrefixesMap = {
36
+ $body_: "body",
37
+ $headers_: "headers",
38
+ $path_: "path",
39
+ $query_: "query"
40
+ };
41
+ var extraPrefixes = Object.entries(extraPrefixesMap);
42
+
43
+ // client/core/serverSentEvents.gen.ts
44
+ var createSseClient = ({
45
+ onRequest,
46
+ onSseError,
47
+ onSseEvent,
48
+ responseTransformer,
49
+ responseValidator,
50
+ sseDefaultRetryDelay,
51
+ sseMaxRetryAttempts,
52
+ sseMaxRetryDelay,
53
+ sseSleepFn,
54
+ url,
55
+ ...options
56
+ }) => {
57
+ let lastEventId;
58
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
59
+ const createStream = async function* () {
60
+ let retryDelay = sseDefaultRetryDelay ?? 3e3;
61
+ let attempt = 0;
62
+ const signal = options.signal ?? new AbortController().signal;
63
+ while (true) {
64
+ if (signal.aborted) break;
65
+ attempt++;
66
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
67
+ if (lastEventId !== void 0) {
68
+ headers.set("Last-Event-ID", lastEventId);
69
+ }
70
+ try {
71
+ const requestInit = {
72
+ redirect: "follow",
73
+ ...options,
74
+ body: options.serializedBody,
75
+ headers,
76
+ signal
77
+ };
78
+ let request = new Request(url, requestInit);
79
+ if (onRequest) {
80
+ request = await onRequest(url, requestInit);
81
+ }
82
+ const _fetch = options.fetch ?? globalThis.fetch;
83
+ const response = await _fetch(request);
84
+ if (!response.ok)
85
+ throw new Error(
86
+ `SSE failed: ${response.status} ${response.statusText}`
87
+ );
88
+ if (!response.body) throw new Error("No body in SSE response");
89
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
90
+ let buffer = "";
91
+ const abortHandler = () => {
92
+ try {
93
+ reader.cancel();
94
+ } catch {
95
+ }
96
+ };
97
+ signal.addEventListener("abort", abortHandler);
98
+ try {
99
+ while (true) {
100
+ const { done, value } = await reader.read();
101
+ if (done) break;
102
+ buffer += value;
103
+ const chunks = buffer.split("\n\n");
104
+ buffer = chunks.pop() ?? "";
105
+ for (const chunk of chunks) {
106
+ const lines = chunk.split("\n");
107
+ const dataLines = [];
108
+ let eventName;
109
+ for (const line of lines) {
110
+ if (line.startsWith("data:")) {
111
+ dataLines.push(line.replace(/^data:\s*/, ""));
112
+ } else if (line.startsWith("event:")) {
113
+ eventName = line.replace(/^event:\s*/, "");
114
+ } else if (line.startsWith("id:")) {
115
+ lastEventId = line.replace(/^id:\s*/, "");
116
+ } else if (line.startsWith("retry:")) {
117
+ const parsed = Number.parseInt(
118
+ line.replace(/^retry:\s*/, ""),
119
+ 10
120
+ );
121
+ if (!Number.isNaN(parsed)) {
122
+ retryDelay = parsed;
123
+ }
124
+ }
125
+ }
126
+ let data;
127
+ let parsedJson = false;
128
+ if (dataLines.length) {
129
+ const rawData = dataLines.join("\n");
130
+ try {
131
+ data = JSON.parse(rawData);
132
+ parsedJson = true;
133
+ } catch {
134
+ data = rawData;
135
+ }
136
+ }
137
+ if (parsedJson) {
138
+ if (responseValidator) {
139
+ await responseValidator(data);
140
+ }
141
+ if (responseTransformer) {
142
+ data = await responseTransformer(data);
143
+ }
144
+ }
145
+ onSseEvent?.({
146
+ data,
147
+ event: eventName,
148
+ id: lastEventId,
149
+ retry: retryDelay
150
+ });
151
+ if (dataLines.length) {
152
+ yield data;
153
+ }
154
+ }
155
+ }
156
+ } finally {
157
+ signal.removeEventListener("abort", abortHandler);
158
+ reader.releaseLock();
159
+ }
160
+ break;
161
+ } catch (error) {
162
+ onSseError?.(error);
163
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
164
+ break;
165
+ }
166
+ const backoff = Math.min(
167
+ retryDelay * 2 ** (attempt - 1),
168
+ sseMaxRetryDelay ?? 3e4
169
+ );
170
+ await sleep(backoff);
171
+ }
172
+ }
173
+ };
174
+ const stream = createStream();
175
+ return { stream };
176
+ };
177
+
178
+ // client/core/pathSerializer.gen.ts
179
+ var separatorArrayExplode = (style) => {
180
+ switch (style) {
181
+ case "label":
182
+ return ".";
183
+ case "matrix":
184
+ return ";";
185
+ case "simple":
186
+ return ",";
187
+ default:
188
+ return "&";
189
+ }
190
+ };
191
+ var separatorArrayNoExplode = (style) => {
192
+ switch (style) {
193
+ case "form":
194
+ return ",";
195
+ case "pipeDelimited":
196
+ return "|";
197
+ case "spaceDelimited":
198
+ return "%20";
199
+ default:
200
+ return ",";
201
+ }
202
+ };
203
+ var separatorObjectExplode = (style) => {
204
+ switch (style) {
205
+ case "label":
206
+ return ".";
207
+ case "matrix":
208
+ return ";";
209
+ case "simple":
210
+ return ",";
211
+ default:
212
+ return "&";
213
+ }
214
+ };
215
+ var serializeArrayParam = ({
216
+ allowReserved,
217
+ explode,
218
+ name,
219
+ style,
220
+ value
221
+ }) => {
222
+ if (!explode) {
223
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
224
+ switch (style) {
225
+ case "label":
226
+ return `.${joinedValues2}`;
227
+ case "matrix":
228
+ return `;${name}=${joinedValues2}`;
229
+ case "simple":
230
+ return joinedValues2;
231
+ default:
232
+ return `${name}=${joinedValues2}`;
233
+ }
234
+ }
235
+ const separator = separatorArrayExplode(style);
236
+ const joinedValues = value.map((v) => {
237
+ if (style === "label" || style === "simple") {
238
+ return allowReserved ? v : encodeURIComponent(v);
239
+ }
240
+ return serializePrimitiveParam({
241
+ allowReserved,
242
+ name,
243
+ value: v
244
+ });
245
+ }).join(separator);
246
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
247
+ };
248
+ var serializePrimitiveParam = ({
249
+ allowReserved,
250
+ name,
251
+ value
252
+ }) => {
253
+ if (value === void 0 || value === null) {
254
+ return "";
255
+ }
256
+ if (typeof value === "object") {
257
+ throw new Error(
258
+ "Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
259
+ );
260
+ }
261
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
262
+ };
263
+ var serializeObjectParam = ({
264
+ allowReserved,
265
+ explode,
266
+ name,
267
+ style,
268
+ value,
269
+ valueOnly
270
+ }) => {
271
+ if (value instanceof Date) {
272
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
273
+ }
274
+ if (style !== "deepObject" && !explode) {
275
+ let values = [];
276
+ Object.entries(value).forEach(([key, v]) => {
277
+ values = [
278
+ ...values,
279
+ key,
280
+ allowReserved ? v : encodeURIComponent(v)
281
+ ];
282
+ });
283
+ const joinedValues2 = values.join(",");
284
+ switch (style) {
285
+ case "form":
286
+ return `${name}=${joinedValues2}`;
287
+ case "label":
288
+ return `.${joinedValues2}`;
289
+ case "matrix":
290
+ return `;${name}=${joinedValues2}`;
291
+ default:
292
+ return joinedValues2;
293
+ }
294
+ }
295
+ const separator = separatorObjectExplode(style);
296
+ const joinedValues = Object.entries(value).map(
297
+ ([key, v]) => serializePrimitiveParam({
298
+ allowReserved,
299
+ name: style === "deepObject" ? `${name}[${key}]` : key,
300
+ value: v
301
+ })
302
+ ).join(separator);
303
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
304
+ };
305
+
306
+ // client/core/utils.gen.ts
307
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
308
+ var defaultPathSerializer = ({ path, url: _url }) => {
309
+ let url = _url;
310
+ const matches = _url.match(PATH_PARAM_RE);
311
+ if (matches) {
312
+ for (const match of matches) {
313
+ let explode = false;
314
+ let name = match.substring(1, match.length - 1);
315
+ let style = "simple";
316
+ if (name.endsWith("*")) {
317
+ explode = true;
318
+ name = name.substring(0, name.length - 1);
319
+ }
320
+ if (name.startsWith(".")) {
321
+ name = name.substring(1);
322
+ style = "label";
323
+ } else if (name.startsWith(";")) {
324
+ name = name.substring(1);
325
+ style = "matrix";
326
+ }
327
+ const value = path[name];
328
+ if (value === void 0 || value === null) {
329
+ continue;
330
+ }
331
+ if (Array.isArray(value)) {
332
+ url = url.replace(
333
+ match,
334
+ serializeArrayParam({ explode, name, style, value })
335
+ );
336
+ continue;
337
+ }
338
+ if (typeof value === "object") {
339
+ url = url.replace(
340
+ match,
341
+ serializeObjectParam({
342
+ explode,
343
+ name,
344
+ style,
345
+ value,
346
+ valueOnly: true
347
+ })
348
+ );
349
+ continue;
350
+ }
351
+ if (style === "matrix") {
352
+ url = url.replace(
353
+ match,
354
+ `;${serializePrimitiveParam({
355
+ name,
356
+ value
357
+ })}`
358
+ );
359
+ continue;
360
+ }
361
+ const replaceValue = encodeURIComponent(
362
+ style === "label" ? `.${value}` : value
363
+ );
364
+ url = url.replace(match, replaceValue);
365
+ }
366
+ }
367
+ return url;
368
+ };
369
+ var getUrl = ({
370
+ baseUrl,
371
+ path,
372
+ query,
373
+ querySerializer,
374
+ url: _url
375
+ }) => {
376
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
377
+ let url = (baseUrl ?? "") + pathUrl;
378
+ if (path) {
379
+ url = defaultPathSerializer({ path, url });
380
+ }
381
+ let search = query ? querySerializer(query) : "";
382
+ if (search.startsWith("?")) {
383
+ search = search.substring(1);
384
+ }
385
+ if (search) {
386
+ url += `?${search}`;
387
+ }
388
+ return url;
389
+ };
390
+ function getValidRequestBody(options) {
391
+ const hasBody = options.body !== void 0;
392
+ const isSerializedBody = hasBody && options.bodySerializer;
393
+ if (isSerializedBody) {
394
+ if ("serializedBody" in options) {
395
+ const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
396
+ return hasSerializedBody ? options.serializedBody : null;
397
+ }
398
+ return options.body !== "" ? options.body : null;
399
+ }
400
+ if (hasBody) {
401
+ return options.body;
402
+ }
403
+ return void 0;
404
+ }
405
+
406
+ // client/core/auth.gen.ts
407
+ var getAuthToken = async (auth, callback) => {
408
+ const token = typeof callback === "function" ? await callback(auth) : callback;
409
+ if (!token) {
410
+ return;
411
+ }
412
+ if (auth.scheme === "bearer") {
413
+ return `Bearer ${token}`;
414
+ }
415
+ if (auth.scheme === "basic") {
416
+ return `Basic ${btoa(token)}`;
417
+ }
418
+ return token;
419
+ };
420
+
421
+ // client/client/utils.gen.ts
422
+ var createQuerySerializer = ({
423
+ parameters = {},
424
+ ...args
425
+ } = {}) => {
426
+ const querySerializer = (queryParams) => {
427
+ const search = [];
428
+ if (queryParams && typeof queryParams === "object") {
429
+ for (const name in queryParams) {
430
+ const value = queryParams[name];
431
+ if (value === void 0 || value === null) {
432
+ continue;
433
+ }
434
+ const options = parameters[name] || args;
435
+ if (Array.isArray(value)) {
436
+ const serializedArray = serializeArrayParam({
437
+ allowReserved: options.allowReserved,
438
+ explode: true,
439
+ name,
440
+ style: "form",
441
+ value,
442
+ ...options.array
443
+ });
444
+ if (serializedArray) search.push(serializedArray);
445
+ } else if (typeof value === "object") {
446
+ const serializedObject = serializeObjectParam({
447
+ allowReserved: options.allowReserved,
448
+ explode: true,
449
+ name,
450
+ style: "deepObject",
451
+ value,
452
+ ...options.object
453
+ });
454
+ if (serializedObject) search.push(serializedObject);
455
+ } else {
456
+ const serializedPrimitive = serializePrimitiveParam({
457
+ allowReserved: options.allowReserved,
458
+ name,
459
+ value
460
+ });
461
+ if (serializedPrimitive) search.push(serializedPrimitive);
462
+ }
463
+ }
464
+ }
465
+ return search.join("&");
466
+ };
467
+ return querySerializer;
468
+ };
469
+ var getParseAs = (contentType) => {
470
+ if (!contentType) {
471
+ return "stream";
472
+ }
473
+ const cleanContent = contentType.split(";")[0]?.trim();
474
+ if (!cleanContent) {
475
+ return;
476
+ }
477
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
478
+ return "json";
479
+ }
480
+ if (cleanContent === "multipart/form-data") {
481
+ return "formData";
482
+ }
483
+ if (["application/", "audio/", "image/", "video/"].some(
484
+ (type) => cleanContent.startsWith(type)
485
+ )) {
486
+ return "blob";
487
+ }
488
+ if (cleanContent.startsWith("text/")) {
489
+ return "text";
490
+ }
491
+ return;
492
+ };
493
+ var checkForExistence = (options, name) => {
494
+ if (!name) {
495
+ return false;
496
+ }
497
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
498
+ return true;
499
+ }
500
+ return false;
501
+ };
502
+ var setAuthParams = async ({
503
+ security,
504
+ ...options
505
+ }) => {
506
+ for (const auth of security) {
507
+ if (checkForExistence(options, auth.name)) {
508
+ continue;
509
+ }
510
+ const token = await getAuthToken(auth, options.auth);
511
+ if (!token) {
512
+ continue;
513
+ }
514
+ const name = auth.name ?? "Authorization";
515
+ switch (auth.in) {
516
+ case "query":
517
+ if (!options.query) {
518
+ options.query = {};
519
+ }
520
+ options.query[name] = token;
521
+ break;
522
+ case "cookie":
523
+ options.headers.append("Cookie", `${name}=${token}`);
524
+ break;
525
+ case "header":
526
+ default:
527
+ options.headers.set(name, token);
528
+ break;
529
+ }
530
+ }
531
+ };
532
+ var buildUrl = (options) => getUrl({
533
+ baseUrl: options.baseUrl,
534
+ path: options.path,
535
+ query: options.query,
536
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
537
+ url: options.url
538
+ });
539
+ var mergeConfigs = (a, b) => {
540
+ const config = { ...a, ...b };
541
+ if (config.baseUrl?.endsWith("/")) {
542
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
543
+ }
544
+ config.headers = mergeHeaders(a.headers, b.headers);
545
+ return config;
546
+ };
547
+ var headersEntries = (headers) => {
548
+ const entries = [];
549
+ headers.forEach((value, key) => {
550
+ entries.push([key, value]);
551
+ });
552
+ return entries;
553
+ };
554
+ var mergeHeaders = (...headers) => {
555
+ const mergedHeaders = new Headers();
556
+ for (const header of headers) {
557
+ if (!header) {
558
+ continue;
559
+ }
560
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
561
+ for (const [key, value] of iterator) {
562
+ if (value === null) {
563
+ mergedHeaders.delete(key);
564
+ } else if (Array.isArray(value)) {
565
+ for (const v of value) {
566
+ mergedHeaders.append(key, v);
567
+ }
568
+ } else if (value !== void 0) {
569
+ mergedHeaders.set(
570
+ key,
571
+ typeof value === "object" ? JSON.stringify(value) : value
572
+ );
573
+ }
574
+ }
575
+ }
576
+ return mergedHeaders;
577
+ };
578
+ var Interceptors = class {
579
+ fns = [];
580
+ clear() {
581
+ this.fns = [];
582
+ }
583
+ eject(id) {
584
+ const index = this.getInterceptorIndex(id);
585
+ if (this.fns[index]) {
586
+ this.fns[index] = null;
587
+ }
588
+ }
589
+ exists(id) {
590
+ const index = this.getInterceptorIndex(id);
591
+ return Boolean(this.fns[index]);
592
+ }
593
+ getInterceptorIndex(id) {
594
+ if (typeof id === "number") {
595
+ return this.fns[id] ? id : -1;
596
+ }
597
+ return this.fns.indexOf(id);
598
+ }
599
+ update(id, fn) {
600
+ const index = this.getInterceptorIndex(id);
601
+ if (this.fns[index]) {
602
+ this.fns[index] = fn;
603
+ return id;
604
+ }
605
+ return false;
606
+ }
607
+ use(fn) {
608
+ this.fns.push(fn);
609
+ return this.fns.length - 1;
610
+ }
611
+ };
612
+ var createInterceptors = () => ({
613
+ error: new Interceptors(),
614
+ request: new Interceptors(),
615
+ response: new Interceptors()
616
+ });
617
+ var defaultQuerySerializer = createQuerySerializer({
618
+ allowReserved: false,
619
+ array: {
620
+ explode: true,
621
+ style: "form"
622
+ },
623
+ object: {
624
+ explode: true,
625
+ style: "deepObject"
626
+ }
627
+ });
628
+ var defaultHeaders = {
629
+ "Content-Type": "application/json"
630
+ };
631
+ var createConfig = (override = {}) => ({
632
+ ...jsonBodySerializer,
633
+ headers: defaultHeaders,
634
+ parseAs: "auto",
635
+ querySerializer: defaultQuerySerializer,
636
+ ...override
637
+ });
638
+
639
+ // client/client/client.gen.ts
640
+ var createClient = (config = {}) => {
641
+ let _config = mergeConfigs(createConfig(), config);
642
+ const getConfig = () => ({ ..._config });
643
+ const setConfig = (config2) => {
644
+ _config = mergeConfigs(_config, config2);
645
+ return getConfig();
646
+ };
647
+ const interceptors = createInterceptors();
648
+ const beforeRequest = async (options) => {
649
+ const opts = {
650
+ ..._config,
651
+ ...options,
652
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
653
+ headers: mergeHeaders(_config.headers, options.headers),
654
+ serializedBody: void 0
655
+ };
656
+ if (opts.security) {
657
+ await setAuthParams({
658
+ ...opts,
659
+ security: opts.security
660
+ });
661
+ }
662
+ if (opts.requestValidator) {
663
+ await opts.requestValidator(opts);
664
+ }
665
+ if (opts.body !== void 0 && opts.bodySerializer) {
666
+ opts.serializedBody = opts.bodySerializer(opts.body);
667
+ }
668
+ if (opts.body === void 0 || opts.serializedBody === "") {
669
+ opts.headers.delete("Content-Type");
670
+ }
671
+ const url = buildUrl(opts);
672
+ return { opts, url };
673
+ };
674
+ const request = async (options) => {
675
+ const { opts, url } = await beforeRequest(options);
676
+ const requestInit = {
677
+ redirect: "follow",
678
+ ...opts,
679
+ body: getValidRequestBody(opts)
680
+ };
681
+ let request2 = new Request(url, requestInit);
682
+ for (const fn of interceptors.request.fns) {
683
+ if (fn) {
684
+ request2 = await fn(request2, opts);
685
+ }
686
+ }
687
+ const _fetch = opts.fetch;
688
+ let response = await _fetch(request2);
689
+ for (const fn of interceptors.response.fns) {
690
+ if (fn) {
691
+ response = await fn(response, request2, opts);
692
+ }
693
+ }
694
+ const result = {
695
+ request: request2,
696
+ response
697
+ };
698
+ if (response.ok) {
699
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
700
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
701
+ let emptyData;
702
+ switch (parseAs) {
703
+ case "arrayBuffer":
704
+ case "blob":
705
+ case "text":
706
+ emptyData = await response[parseAs]();
707
+ break;
708
+ case "formData":
709
+ emptyData = new FormData();
710
+ break;
711
+ case "stream":
712
+ emptyData = response.body;
713
+ break;
714
+ case "json":
715
+ default:
716
+ emptyData = {};
717
+ break;
718
+ }
719
+ return opts.responseStyle === "data" ? emptyData : {
720
+ data: emptyData,
721
+ ...result
722
+ };
723
+ }
724
+ let data;
725
+ switch (parseAs) {
726
+ case "arrayBuffer":
727
+ case "blob":
728
+ case "formData":
729
+ case "json":
730
+ case "text":
731
+ data = await response[parseAs]();
732
+ break;
733
+ case "stream":
734
+ return opts.responseStyle === "data" ? response.body : {
735
+ data: response.body,
736
+ ...result
737
+ };
738
+ }
739
+ if (parseAs === "json") {
740
+ if (opts.responseValidator) {
741
+ await opts.responseValidator(data);
742
+ }
743
+ if (opts.responseTransformer) {
744
+ data = await opts.responseTransformer(data);
745
+ }
746
+ }
747
+ return opts.responseStyle === "data" ? data : {
748
+ data,
749
+ ...result
750
+ };
751
+ }
752
+ const textError = await response.text();
753
+ let jsonError;
754
+ try {
755
+ jsonError = JSON.parse(textError);
756
+ } catch {
757
+ }
758
+ const error = jsonError ?? textError;
759
+ let finalError = error;
760
+ for (const fn of interceptors.error.fns) {
761
+ if (fn) {
762
+ finalError = await fn(error, response, request2, opts);
763
+ }
764
+ }
765
+ finalError = finalError || {};
766
+ if (opts.throwOnError) {
767
+ throw finalError;
768
+ }
769
+ return opts.responseStyle === "data" ? void 0 : {
770
+ error: finalError,
771
+ ...result
772
+ };
773
+ };
774
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
775
+ const makeSseFn = (method) => async (options) => {
776
+ const { opts, url } = await beforeRequest(options);
777
+ return createSseClient({
778
+ ...opts,
779
+ body: opts.body,
780
+ headers: opts.headers,
781
+ method,
782
+ onRequest: async (url2, init) => {
783
+ let request2 = new Request(url2, init);
784
+ for (const fn of interceptors.request.fns) {
785
+ if (fn) {
786
+ request2 = await fn(request2, opts);
787
+ }
788
+ }
789
+ return request2;
790
+ },
791
+ url
792
+ });
793
+ };
794
+ return {
795
+ buildUrl,
796
+ connect: makeMethodFn("CONNECT"),
797
+ delete: makeMethodFn("DELETE"),
798
+ get: makeMethodFn("GET"),
799
+ getConfig,
800
+ head: makeMethodFn("HEAD"),
801
+ interceptors,
802
+ options: makeMethodFn("OPTIONS"),
803
+ patch: makeMethodFn("PATCH"),
804
+ post: makeMethodFn("POST"),
805
+ put: makeMethodFn("PUT"),
806
+ request,
807
+ setConfig,
808
+ sse: {
809
+ connect: makeSseFn("CONNECT"),
810
+ delete: makeSseFn("DELETE"),
811
+ get: makeSseFn("GET"),
812
+ head: makeSseFn("HEAD"),
813
+ options: makeSseFn("OPTIONS"),
814
+ patch: makeSseFn("PATCH"),
815
+ post: makeSseFn("POST"),
816
+ put: makeSseFn("PUT"),
817
+ trace: makeSseFn("TRACE")
818
+ },
819
+ trace: makeMethodFn("TRACE")
820
+ };
821
+ };
3
822
 
4
823
  // client/client.gen.ts
5
- import { createClient, createConfig } from "@hey-api/client-fetch";
6
824
  var client = createClient(createConfig());
7
825
 
8
826
  // client/sdk.gen.ts
@@ -18,7 +836,7 @@ var getNegotiationDeltas = (options) => {
18
836
  ...options,
19
837
  headers: {
20
838
  "Content-Type": "application/json",
21
- ...options?.headers
839
+ ...options.headers
22
840
  }
23
841
  });
24
842
  };
@@ -130,7 +948,7 @@ var addWatchers = (options) => {
130
948
  ...options,
131
949
  headers: {
132
950
  "Content-Type": "application/json",
133
- ...options?.headers
951
+ ...options.headers
134
952
  }
135
953
  });
136
954
  };
@@ -158,7 +976,7 @@ var revertToAmending = (options) => {
158
976
  ...options,
159
977
  headers: {
160
978
  "Content-Type": "application/json",
161
- ...options?.headers
979
+ ...options.headers
162
980
  }
163
981
  });
164
982
  };
@@ -174,7 +992,7 @@ var setReceiverEntity = (options) => {
174
992
  ...options,
175
993
  headers: {
176
994
  "Content-Type": "application/json",
177
- ...options?.headers
995
+ ...options.headers
178
996
  }
179
997
  });
180
998
  };
@@ -190,7 +1008,7 @@ var markCommentEventsAsViewed = (options) => {
190
1008
  ...options,
191
1009
  headers: {
192
1010
  "Content-Type": "application/json",
193
- ...options?.headers
1011
+ ...options.headers
194
1012
  }
195
1013
  });
196
1014
  };
@@ -206,7 +1024,7 @@ var presetSetFinalApproval = (options) => {
206
1024
  ...options,
207
1025
  headers: {
208
1026
  "Content-Type": "application/json",
209
- ...options?.headers
1027
+ ...options.headers
210
1028
  }
211
1029
  });
212
1030
  };
@@ -240,7 +1058,7 @@ var createPreset = (options) => {
240
1058
  ...options,
241
1059
  headers: {
242
1060
  "Content-Type": "application/json",
243
- ...options?.headers
1061
+ ...options.headers
244
1062
  }
245
1063
  });
246
1064
  };
@@ -256,7 +1074,7 @@ var presetGetMultipleNestedAnswers = (options) => {
256
1074
  ...options,
257
1075
  headers: {
258
1076
  "Content-Type": "application/json",
259
- ...options?.headers
1077
+ ...options.headers
260
1078
  }
261
1079
  });
262
1080
  };
@@ -272,7 +1090,7 @@ var presetSetMultipleNestedAnswers = (options) => {
272
1090
  ...options,
273
1091
  headers: {
274
1092
  "Content-Type": "application/json",
275
- ...options?.headers
1093
+ ...options.headers
276
1094
  }
277
1095
  });
278
1096
  };
@@ -300,7 +1118,7 @@ var updateCommentReaction = (options) => {
300
1118
  ...options,
301
1119
  headers: {
302
1120
  "Content-Type": "application/json",
303
- ...options?.headers
1121
+ ...options.headers
304
1122
  }
305
1123
  });
306
1124
  };
@@ -316,7 +1134,7 @@ var overrideApproveFinalDocument = (options) => {
316
1134
  ...options,
317
1135
  headers: {
318
1136
  "Content-Type": "application/json",
319
- ...options?.headers
1137
+ ...options.headers
320
1138
  }
321
1139
  });
322
1140
  };
@@ -356,7 +1174,7 @@ var updateSelectedElections = (options) => {
356
1174
  ...options,
357
1175
  headers: {
358
1176
  "Content-Type": "application/json",
359
- ...options?.headers
1177
+ ...options.headers
360
1178
  }
361
1179
  });
362
1180
  };
@@ -384,7 +1202,7 @@ var presetEditAnswers = (options) => {
384
1202
  ...options,
385
1203
  headers: {
386
1204
  "Content-Type": "application/json",
387
- ...options?.headers
1205
+ ...options.headers
388
1206
  }
389
1207
  });
390
1208
  };
@@ -400,7 +1218,7 @@ var deleteComment = (options) => {
400
1218
  ...options,
401
1219
  headers: {
402
1220
  "Content-Type": "application/json",
403
- ...options?.headers
1221
+ ...options.headers
404
1222
  }
405
1223
  });
406
1224
  };
@@ -416,7 +1234,7 @@ var updateComment = (options) => {
416
1234
  ...options,
417
1235
  headers: {
418
1236
  "Content-Type": "application/json",
419
- ...options?.headers
1237
+ ...options.headers
420
1238
  }
421
1239
  });
422
1240
  };
@@ -444,7 +1262,7 @@ var setGeneralCoverNote = (options) => {
444
1262
  ...options,
445
1263
  headers: {
446
1264
  "Content-Type": "application/json",
447
- ...options?.headers
1265
+ ...options.headers
448
1266
  }
449
1267
  });
450
1268
  };
@@ -472,7 +1290,7 @@ var validateEntities = (options) => {
472
1290
  ...options,
473
1291
  headers: {
474
1292
  "Content-Type": "application/json",
475
- ...options?.headers
1293
+ ...options.headers
476
1294
  }
477
1295
  });
478
1296
  };
@@ -512,7 +1330,7 @@ var unsubscribe = (options) => {
512
1330
  ...options,
513
1331
  headers: {
514
1332
  "Content-Type": "application/json",
515
- ...options?.headers
1333
+ ...options.headers
516
1334
  }
517
1335
  });
518
1336
  };
@@ -528,7 +1346,7 @@ var overrideRejectFinalDocument = (options) => {
528
1346
  ...options,
529
1347
  headers: {
530
1348
  "Content-Type": "application/json",
531
- ...options?.headers
1349
+ ...options.headers
532
1350
  }
533
1351
  });
534
1352
  };
@@ -556,7 +1374,7 @@ var updateExtractionFeedback = (options) => {
556
1374
  ...options,
557
1375
  headers: {
558
1376
  "Content-Type": "application/json",
559
- ...options?.headers
1377
+ ...options.headers
560
1378
  }
561
1379
  });
562
1380
  };
@@ -596,7 +1414,7 @@ var addElectionRejection = (options) => {
596
1414
  ...options,
597
1415
  headers: {
598
1416
  "Content-Type": "application/json",
599
- ...options?.headers
1417
+ ...options.headers
600
1418
  }
601
1419
  });
602
1420
  };
@@ -660,7 +1478,7 @@ var moveEntity = (options) => {
660
1478
  ...options,
661
1479
  headers: {
662
1480
  "Content-Type": "application/json",
663
- ...options?.headers
1481
+ ...options.headers
664
1482
  }
665
1483
  });
666
1484
  };
@@ -688,7 +1506,7 @@ var shareSubAccount = (options) => {
688
1506
  ...options,
689
1507
  headers: {
690
1508
  "Content-Type": "application/json",
691
- ...options?.headers
1509
+ ...options.headers
692
1510
  }
693
1511
  });
694
1512
  };
@@ -704,7 +1522,7 @@ var assignEntity = (options) => {
704
1522
  ...options,
705
1523
  headers: {
706
1524
  "Content-Type": "application/json",
707
- ...options?.headers
1525
+ ...options.headers
708
1526
  }
709
1527
  });
710
1528
  };
@@ -720,7 +1538,7 @@ var setFinalApproval = (options) => {
720
1538
  ...options,
721
1539
  headers: {
722
1540
  "Content-Type": "application/json",
723
- ...options?.headers
1541
+ ...options.headers
724
1542
  }
725
1543
  });
726
1544
  };
@@ -736,7 +1554,7 @@ var setElectionApproval = (options) => {
736
1554
  ...options,
737
1555
  headers: {
738
1556
  "Content-Type": "application/json",
739
- ...options?.headers
1557
+ ...options.headers
740
1558
  }
741
1559
  });
742
1560
  };
@@ -776,7 +1594,7 @@ var editApprovalComment = (options) => {
776
1594
  ...options,
777
1595
  headers: {
778
1596
  "Content-Type": "application/json",
779
- ...options?.headers
1597
+ ...options.headers
780
1598
  }
781
1599
  });
782
1600
  };
@@ -876,7 +1694,7 @@ var updateGroupName = (options) => {
876
1694
  ...options,
877
1695
  headers: {
878
1696
  "Content-Type": "application/json",
879
- ...options?.headers
1697
+ ...options.headers
880
1698
  }
881
1699
  });
882
1700
  };
@@ -892,7 +1710,7 @@ var changeSigningMode = (options) => {
892
1710
  ...options,
893
1711
  headers: {
894
1712
  "Content-Type": "application/json",
895
- ...options?.headers
1713
+ ...options.headers
896
1714
  }
897
1715
  });
898
1716
  };
@@ -908,7 +1726,7 @@ var sendToCounterparty = (options) => {
908
1726
  ...options,
909
1727
  headers: {
910
1728
  "Content-Type": "application/json",
911
- ...options?.headers
1729
+ ...options.headers
912
1730
  }
913
1731
  });
914
1732
  };
@@ -960,7 +1778,7 @@ var shareNegotiation = (options) => {
960
1778
  ...options,
961
1779
  headers: {
962
1780
  "Content-Type": "application/json",
963
- ...options?.headers
1781
+ ...options.headers
964
1782
  }
965
1783
  });
966
1784
  };
@@ -977,7 +1795,7 @@ var setBulkSetAttachments = (options) => {
977
1795
  ...options,
978
1796
  headers: {
979
1797
  "Content-Type": null,
980
- ...options?.headers
1798
+ ...options.headers
981
1799
  }
982
1800
  });
983
1801
  };
@@ -993,7 +1811,7 @@ var addElectionApproval = (options) => {
993
1811
  ...options,
994
1812
  headers: {
995
1813
  "Content-Type": "application/json",
996
- ...options?.headers
1814
+ ...options.headers
997
1815
  }
998
1816
  });
999
1817
  };
@@ -1021,7 +1839,7 @@ var rejectFinalDocument = (options) => {
1021
1839
  ...options,
1022
1840
  headers: {
1023
1841
  "Content-Type": "application/json",
1024
- ...options?.headers
1842
+ ...options.headers
1025
1843
  }
1026
1844
  });
1027
1845
  };
@@ -1073,7 +1891,7 @@ var updateNegotiationsToMatch = (options) => {
1073
1891
  ...options,
1074
1892
  headers: {
1075
1893
  "Content-Type": "application/json",
1076
- ...options?.headers
1894
+ ...options.headers
1077
1895
  }
1078
1896
  });
1079
1897
  };
@@ -1113,7 +1931,7 @@ var editDefaultAnswers = (options) => {
1113
1931
  ...options,
1114
1932
  headers: {
1115
1933
  "Content-Type": "application/json",
1116
- ...options?.headers
1934
+ ...options.headers
1117
1935
  }
1118
1936
  });
1119
1937
  };
@@ -1141,7 +1959,7 @@ var fixApprovalRules = (options) => {
1141
1959
  ...options,
1142
1960
  headers: {
1143
1961
  "Content-Type": "application/json",
1144
- ...options?.headers
1962
+ ...options.headers
1145
1963
  }
1146
1964
  });
1147
1965
  };
@@ -1169,7 +1987,7 @@ var sendGroupToCounterparty = (options) => {
1169
1987
  ...options,
1170
1988
  headers: {
1171
1989
  "Content-Type": "application/json",
1172
- ...options?.headers
1990
+ ...options.headers
1173
1991
  }
1174
1992
  });
1175
1993
  };
@@ -1209,7 +2027,7 @@ var overrideElectionRejection = (options) => {
1209
2027
  ...options,
1210
2028
  headers: {
1211
2029
  "Content-Type": "application/json",
1212
- ...options?.headers
2030
+ ...options.headers
1213
2031
  }
1214
2032
  });
1215
2033
  };
@@ -1225,7 +2043,7 @@ var overrideElectionApproval = (options) => {
1225
2043
  ...options,
1226
2044
  headers: {
1227
2045
  "Content-Type": "application/json",
1228
- ...options?.headers
2046
+ ...options.headers
1229
2047
  }
1230
2048
  });
1231
2049
  };
@@ -1253,7 +2071,7 @@ var listPotentialPresetAdvisors = (options) => {
1253
2071
  ...options
1254
2072
  });
1255
2073
  };
1256
- var getAsCdm = (options) => {
2074
+ var getAsCDM = (options) => {
1257
2075
  return (options.client ?? client).get({
1258
2076
  security: [
1259
2077
  {
@@ -1301,7 +2119,7 @@ var revokePresetsAccess = (options) => {
1301
2119
  ...options,
1302
2120
  headers: {
1303
2121
  "Content-Type": "application/json",
1304
- ...options?.headers
2122
+ ...options.headers
1305
2123
  }
1306
2124
  });
1307
2125
  };
@@ -1317,7 +2135,7 @@ var grantPresetsAccess = (options) => {
1317
2135
  ...options,
1318
2136
  headers: {
1319
2137
  "Content-Type": "application/json",
1320
- ...options?.headers
2138
+ ...options.headers
1321
2139
  }
1322
2140
  });
1323
2141
  };
@@ -1345,7 +2163,7 @@ var removeWatchers = (options) => {
1345
2163
  ...options,
1346
2164
  headers: {
1347
2165
  "Content-Type": "application/json",
1348
- ...options?.headers
2166
+ ...options.headers
1349
2167
  }
1350
2168
  });
1351
2169
  };
@@ -1373,7 +2191,7 @@ var updateMetadata = (options) => {
1373
2191
  ...options,
1374
2192
  headers: {
1375
2193
  "Content-Type": "application/json",
1376
- ...options?.headers
2194
+ ...options.headers
1377
2195
  }
1378
2196
  });
1379
2197
  };
@@ -1401,7 +2219,7 @@ var generateExecutedNegotiationsReportAsExcel = (options) => {
1401
2219
  ...options,
1402
2220
  headers: {
1403
2221
  "Content-Type": "application/json",
1404
- ...options?.headers
2222
+ ...options.headers
1405
2223
  }
1406
2224
  });
1407
2225
  };
@@ -1429,7 +2247,7 @@ var setSignedSignaturePageForParty = (options) => {
1429
2247
  ...options,
1430
2248
  headers: {
1431
2249
  "Content-Type": "application/pdf",
1432
- ...options?.headers
2250
+ ...options.headers
1433
2251
  }
1434
2252
  });
1435
2253
  };
@@ -1457,7 +2275,7 @@ var markActivityEventsAsViewed = (options) => {
1457
2275
  ...options,
1458
2276
  headers: {
1459
2277
  "Content-Type": "application/json",
1460
- ...options?.headers
2278
+ ...options.headers
1461
2279
  }
1462
2280
  });
1463
2281
  };
@@ -1485,7 +2303,7 @@ var patchAnswers = (options) => {
1485
2303
  ...options,
1486
2304
  headers: {
1487
2305
  "Content-Type": "application/json-patch+json",
1488
- ...options?.headers
2306
+ ...options.headers
1489
2307
  }
1490
2308
  });
1491
2309
  };
@@ -1501,7 +2319,7 @@ var editAnswers = (options) => {
1501
2319
  ...options,
1502
2320
  headers: {
1503
2321
  "Content-Type": "application/json",
1504
- ...options?.headers
2322
+ ...options.headers
1505
2323
  }
1506
2324
  });
1507
2325
  };
@@ -1613,7 +2431,7 @@ var createGroup = (options) => {
1613
2431
  ...options,
1614
2432
  headers: {
1615
2433
  "Content-Type": "application/json",
1616
- ...options?.headers
2434
+ ...options.headers
1617
2435
  }
1618
2436
  });
1619
2437
  };
@@ -1713,7 +2531,7 @@ var approveFinalDocument = (options) => {
1713
2531
  ...options,
1714
2532
  headers: {
1715
2533
  "Content-Type": "application/json",
1716
- ...options?.headers
2534
+ ...options.headers
1717
2535
  }
1718
2536
  });
1719
2537
  };
@@ -1741,7 +2559,7 @@ var resetUserAnswers = (options) => {
1741
2559
  ...options,
1742
2560
  headers: {
1743
2561
  "Content-Type": "application/json",
1744
- ...options?.headers
2562
+ ...options.headers
1745
2563
  }
1746
2564
  });
1747
2565
  };
@@ -1757,7 +2575,7 @@ var updateUserAnswers = (options) => {
1757
2575
  ...options,
1758
2576
  headers: {
1759
2577
  "Content-Type": "application/json",
1760
- ...options?.headers
2578
+ ...options.headers
1761
2579
  }
1762
2580
  });
1763
2581
  };
@@ -1821,11 +2639,11 @@ var updateGroupMembers = (options) => {
1821
2639
  ...options,
1822
2640
  headers: {
1823
2641
  "Content-Type": "application/json",
1824
- ...options?.headers
2642
+ ...options.headers
1825
2643
  }
1826
2644
  });
1827
2645
  };
1828
- var getSignedSignaturePagePdf = (options) => {
2646
+ var getSignedSignaturePagePDF = (options) => {
1829
2647
  return (options.client ?? client).get({
1830
2648
  security: [
1831
2649
  {
@@ -1885,7 +2703,7 @@ var markAsOffline = (options) => {
1885
2703
  ...options
1886
2704
  });
1887
2705
  };
1888
- var checkSignedSignaturePagePdf = (options) => {
2706
+ var checkSignedSignaturePagePDF = (options) => {
1889
2707
  return (options.client ?? client).get({
1890
2708
  security: [
1891
2709
  {
@@ -1945,7 +2763,7 @@ var setAuxiliaryDocument = (options) => {
1945
2763
  ...options,
1946
2764
  headers: {
1947
2765
  "Content-Type": "application/pdf",
1948
- ...options?.headers
2766
+ ...options.headers
1949
2767
  }
1950
2768
  });
1951
2769
  };
@@ -1973,7 +2791,7 @@ var cancel = (options) => {
1973
2791
  ...options,
1974
2792
  headers: {
1975
2793
  "Content-Type": "application/json",
1976
- ...options?.headers
2794
+ ...options.headers
1977
2795
  }
1978
2796
  });
1979
2797
  };
@@ -1989,7 +2807,7 @@ var revokeNegotiationsAccess = (options) => {
1989
2807
  ...options,
1990
2808
  headers: {
1991
2809
  "Content-Type": "application/json",
1992
- ...options?.headers
2810
+ ...options.headers
1993
2811
  }
1994
2812
  });
1995
2813
  };
@@ -2005,7 +2823,7 @@ var grantNegotiationsAccess = (options) => {
2005
2823
  ...options,
2006
2824
  headers: {
2007
2825
  "Content-Type": "application/json",
2008
- ...options?.headers
2826
+ ...options.headers
2009
2827
  }
2010
2828
  });
2011
2829
  };
@@ -2297,7 +3115,7 @@ var createNegotiation = (options) => {
2297
3115
  ...options,
2298
3116
  headers: {
2299
3117
  "Content-Type": "application/json",
2300
- ...options?.headers
3118
+ ...options.headers
2301
3119
  }
2302
3120
  });
2303
3121
  };
@@ -2325,11 +3143,11 @@ var presetSetNestedAnswers = (options) => {
2325
3143
  ...options,
2326
3144
  headers: {
2327
3145
  "Content-Type": "application/json",
2328
- ...options?.headers
3146
+ ...options.headers
2329
3147
  }
2330
3148
  });
2331
3149
  };
2332
- var createPresetAuditTrailXlsx = (options) => {
3150
+ var createPresetAuditTrailXLSX = (options) => {
2333
3151
  return (options.client ?? client).get({
2334
3152
  security: [
2335
3153
  {
@@ -2353,7 +3171,7 @@ var clonePreset = (options) => {
2353
3171
  ...options,
2354
3172
  headers: {
2355
3173
  "Content-Type": "application/json",
2356
- ...options?.headers
3174
+ ...options.headers
2357
3175
  }
2358
3176
  });
2359
3177
  };
@@ -2417,7 +3235,7 @@ var patchEmailPreferences = (options) => {
2417
3235
  ...options,
2418
3236
  headers: {
2419
3237
  "Content-Type": "application/json",
2420
- ...options?.headers
3238
+ ...options.headers
2421
3239
  }
2422
3240
  });
2423
3241
  };
@@ -2470,12 +3288,13 @@ var setExternalAttachments = (options) => {
2470
3288
  ...options,
2471
3289
  headers: {
2472
3290
  "Content-Type": null,
2473
- ...options?.headers
3291
+ ...options.headers
2474
3292
  }
2475
3293
  });
2476
3294
  };
2477
3295
  var setExternalAttachment = (options) => {
2478
3296
  return (options.client ?? client).put({
3297
+ bodySerializer: null,
2479
3298
  security: [
2480
3299
  {
2481
3300
  name: "Authorization",
@@ -2486,7 +3305,7 @@ var setExternalAttachment = (options) => {
2486
3305
  ...options,
2487
3306
  headers: {
2488
3307
  "Content-Type": "application/octet-stream",
2489
- ...options?.headers
3308
+ ...options.headers
2490
3309
  }
2491
3310
  });
2492
3311
  };
@@ -2514,7 +3333,7 @@ var validateDraftReceiverEmails = (options) => {
2514
3333
  ...options,
2515
3334
  headers: {
2516
3335
  "Content-Type": "application/json",
2517
- ...options?.headers
3336
+ ...options.headers
2518
3337
  }
2519
3338
  });
2520
3339
  };
@@ -2542,7 +3361,7 @@ var markApprovalCommentsAsViewed = (options) => {
2542
3361
  ...options,
2543
3362
  headers: {
2544
3363
  "Content-Type": "application/json",
2545
- ...options?.headers
3364
+ ...options.headers
2546
3365
  }
2547
3366
  });
2548
3367
  };
@@ -2570,7 +3389,7 @@ var cancelNegotiations = (options) => {
2570
3389
  ...options,
2571
3390
  headers: {
2572
3391
  "Content-Type": "application/json",
2573
- ...options?.headers
3392
+ ...options.headers
2574
3393
  }
2575
3394
  });
2576
3395
  };
@@ -2646,7 +3465,7 @@ var syncNewApprover = (options) => {
2646
3465
  ...options,
2647
3466
  headers: {
2648
3467
  "Content-Type": "application/json",
2649
- ...options?.headers
3468
+ ...options.headers
2650
3469
  }
2651
3470
  });
2652
3471
  };
@@ -2662,7 +3481,7 @@ var getMultipleNestedAnswers = (options) => {
2662
3481
  ...options,
2663
3482
  headers: {
2664
3483
  "Content-Type": "application/json",
2665
- ...options?.headers
3484
+ ...options.headers
2666
3485
  }
2667
3486
  });
2668
3487
  };
@@ -2678,7 +3497,7 @@ var setMultipleNestedAnswers = (options) => {
2678
3497
  ...options,
2679
3498
  headers: {
2680
3499
  "Content-Type": "application/json",
2681
- ...options?.headers
3500
+ ...options.headers
2682
3501
  }
2683
3502
  });
2684
3503
  };
@@ -2718,7 +3537,7 @@ var createBulkSet = (options) => {
2718
3537
  ...options,
2719
3538
  headers: {
2720
3539
  "Content-Type": "application/json",
2721
- ...options?.headers
3540
+ ...options.headers
2722
3541
  }
2723
3542
  });
2724
3543
  };
@@ -2734,7 +3553,7 @@ var addApprovalComment = (options) => {
2734
3553
  ...options,
2735
3554
  headers: {
2736
3555
  "Content-Type": "application/json",
2737
- ...options?.headers
3556
+ ...options.headers
2738
3557
  }
2739
3558
  });
2740
3559
  };
@@ -2786,7 +3605,7 @@ var negotiationsFilter = (options) => {
2786
3605
  ...options
2787
3606
  });
2788
3607
  };
2789
- var createAuditTrailXlsx = (options) => {
3608
+ var createAuditTrailXLSX = (options) => {
2790
3609
  return (options.client ?? client).get({
2791
3610
  security: [
2792
3611
  {
@@ -2810,7 +3629,7 @@ var setPreset = (options) => {
2810
3629
  ...options,
2811
3630
  headers: {
2812
3631
  "Content-Type": "application/json",
2813
- ...options?.headers
3632
+ ...options.headers
2814
3633
  }
2815
3634
  });
2816
3635
  };
@@ -2898,7 +3717,7 @@ var updateSubAccount = (options) => {
2898
3717
  ...options,
2899
3718
  headers: {
2900
3719
  "Content-Type": "application/json",
2901
- ...options?.headers
3720
+ ...options.headers
2902
3721
  }
2903
3722
  });
2904
3723
  };
@@ -2926,7 +3745,7 @@ var rejectPresetApproval = (options) => {
2926
3745
  ...options,
2927
3746
  headers: {
2928
3747
  "Content-Type": "application/json",
2929
- ...options?.headers
3748
+ ...options.headers
2930
3749
  }
2931
3750
  });
2932
3751
  };
@@ -2942,7 +3761,7 @@ var setOwnerEntity = (options) => {
2942
3761
  ...options,
2943
3762
  headers: {
2944
3763
  "Content-Type": "application/json",
2945
- ...options?.headers
3764
+ ...options.headers
2946
3765
  }
2947
3766
  });
2948
3767
  };
@@ -2958,7 +3777,7 @@ var negotiationSendForApproval = (options) => {
2958
3777
  ...options,
2959
3778
  headers: {
2960
3779
  "Content-Type": "application/json",
2961
- ...options?.headers
3780
+ ...options.headers
2962
3781
  }
2963
3782
  });
2964
3783
  };
@@ -2998,7 +3817,7 @@ var retract = (options) => {
2998
3817
  ...options,
2999
3818
  headers: {
3000
3819
  "Content-Type": "application/json",
3001
- ...options?.headers
3820
+ ...options.headers
3002
3821
  }
3003
3822
  });
3004
3823
  };
@@ -3026,7 +3845,7 @@ var renameExecutionAttachment = (options) => {
3026
3845
  ...options,
3027
3846
  headers: {
3028
3847
  "Content-Type": "application/json",
3029
- ...options?.headers
3848
+ ...options.headers
3030
3849
  }
3031
3850
  });
3032
3851
  };
@@ -3054,7 +3873,7 @@ var setNestedAnswers = (options) => {
3054
3873
  ...options,
3055
3874
  headers: {
3056
3875
  "Content-Type": "application/json",
3057
- ...options?.headers
3876
+ ...options.headers
3058
3877
  }
3059
3878
  });
3060
3879
  };
@@ -3095,7 +3914,7 @@ var setExecutionAttachments = (options) => {
3095
3914
  ...options,
3096
3915
  headers: {
3097
3916
  "Content-Type": null,
3098
- ...options?.headers
3917
+ ...options.headers
3099
3918
  }
3100
3919
  });
3101
3920
  };
@@ -3111,7 +3930,7 @@ var setExecutionAttachment = (options) => {
3111
3930
  ...options,
3112
3931
  headers: {
3113
3932
  "Content-Type": "application/pdf",
3114
- ...options?.headers
3933
+ ...options.headers
3115
3934
  }
3116
3935
  });
3117
3936
  };
@@ -3163,7 +3982,7 @@ var generateActiveNegotiationsReportAsExcel = (options) => {
3163
3982
  ...options,
3164
3983
  headers: {
3165
3984
  "Content-Type": "application/json",
3166
- ...options?.headers
3985
+ ...options.headers
3167
3986
  }
3168
3987
  });
3169
3988
  };
@@ -3191,7 +4010,7 @@ var setCounterparties = (options) => {
3191
4010
  ...options,
3192
4011
  headers: {
3193
4012
  "Content-Type": "application/json",
3194
- ...options?.headers
4013
+ ...options.headers
3195
4014
  }
3196
4015
  });
3197
4016
  };
@@ -3219,7 +4038,7 @@ var getChannelTimeline = (options) => {
3219
4038
  ...options
3220
4039
  });
3221
4040
  };
3222
- var schemaAvailableAsCdm = (options) => {
4041
+ var schemaAvailableAsCDM = (options) => {
3223
4042
  return (options.client ?? client).get({
3224
4043
  security: [
3225
4044
  {
@@ -3315,7 +4134,7 @@ var setOfflineNegotiatedDocument = (options) => {
3315
4134
  ...options,
3316
4135
  headers: {
3317
4136
  "Content-Type": "application/pdf",
3318
- ...options?.headers
4137
+ ...options.headers
3319
4138
  }
3320
4139
  });
3321
4140
  };
@@ -3355,7 +4174,7 @@ var setSignedExecutedVersion = (options) => {
3355
4174
  ...options,
3356
4175
  headers: {
3357
4176
  "Content-Type": "application/pdf",
3358
- ...options?.headers
4177
+ ...options.headers
3359
4178
  }
3360
4179
  });
3361
4180
  };
@@ -3383,7 +4202,7 @@ var updateCoverNote = (options) => {
3383
4202
  ...options,
3384
4203
  headers: {
3385
4204
  "Content-Type": "application/json",
3386
- ...options?.headers
4205
+ ...options.headers
3387
4206
  }
3388
4207
  });
3389
4208
  };
@@ -3399,11 +4218,11 @@ var queueGenerateNegotiationDocumentJob = (options) => {
3399
4218
  ...options,
3400
4219
  headers: {
3401
4220
  "Content-Type": "application/json",
3402
- ...options?.headers
4221
+ ...options.headers
3403
4222
  }
3404
4223
  });
3405
4224
  };
3406
- var createSignaturePagePdf = (options) => {
4225
+ var createSignaturePagePDF = (options) => {
3407
4226
  return (options.client ?? client).get({
3408
4227
  security: [
3409
4228
  {
@@ -3439,7 +4258,7 @@ var sendToCounterpartyInitial = (options) => {
3439
4258
  ...options,
3440
4259
  headers: {
3441
4260
  "Content-Type": "application/json",
3442
- ...options?.headers
4261
+ ...options.headers
3443
4262
  }
3444
4263
  });
3445
4264
  };
@@ -3491,7 +4310,7 @@ var addComment = (options) => {
3491
4310
  ...options,
3492
4311
  headers: {
3493
4312
  "Content-Type": "application/json",
3494
- ...options?.headers
4313
+ ...options.headers
3495
4314
  }
3496
4315
  });
3497
4316
  };
@@ -3507,11 +4326,11 @@ var presetSetElectionApproval = (options) => {
3507
4326
  ...options,
3508
4327
  headers: {
3509
4328
  "Content-Type": "application/json",
3510
- ...options?.headers
4329
+ ...options.headers
3511
4330
  }
3512
4331
  });
3513
4332
  };
3514
- var getSsoConfig = (options) => {
4333
+ var getSSOConfig = (options) => {
3515
4334
  return (options?.client ?? client).get({
3516
4335
  security: [
3517
4336
  {
@@ -3535,7 +4354,7 @@ var updateCustomFields = (options) => {
3535
4354
  ...options,
3536
4355
  headers: {
3537
4356
  "Content-Type": "application/json",
3538
- ...options?.headers
4357
+ ...options.headers
3539
4358
  }
3540
4359
  });
3541
4360
  };
@@ -3671,7 +4490,7 @@ var updateDraftingNotes = (options) => {
3671
4490
  ...options
3672
4491
  });
3673
4492
  };
3674
- var createAuditTrailPdf = (options) => {
4493
+ var createAuditTrailPDF = (options) => {
3675
4494
  return (options.client ?? client).get({
3676
4495
  security: [
3677
4496
  {
@@ -3780,22 +4599,22 @@ export {
3780
4599
  checkForBrokenApprovers,
3781
4600
  checkOfflineNegotiatedDocument,
3782
4601
  checkSignedExecutedVersion,
3783
- checkSignedSignaturePagePdf,
4602
+ checkSignedSignaturePagePDF,
3784
4603
  clonePreset,
3785
4604
  confirm,
3786
4605
  confirmExecutionVersion,
3787
4606
  consentCodeCallback,
3788
4607
  contactForNewApprover,
3789
4608
  createAuditTrailJson,
3790
- createAuditTrailPdf,
3791
- createAuditTrailXlsx,
4609
+ createAuditTrailPDF,
4610
+ createAuditTrailXLSX,
3792
4611
  createBulkSet,
3793
4612
  createGroup,
3794
4613
  createNegotiation,
3795
4614
  createPreset,
3796
4615
  createPresetAuditTrailJson,
3797
- createPresetAuditTrailXlsx,
3798
- createSignaturePagePdf,
4616
+ createPresetAuditTrailXLSX,
4617
+ createSignaturePagePDF,
3799
4618
  createSigningPack,
3800
4619
  deleteApprovalComment,
3801
4620
  deleteAuxiliaryDocument,
@@ -3841,7 +4660,7 @@ export {
3841
4660
  getApprovalComments,
3842
4661
  getApprovalHistory,
3843
4662
  getApprovalRound,
3844
- getAsCdm,
4663
+ getAsCDM,
3845
4664
  getAuxiliaryDocument,
3846
4665
  getBulkSet,
3847
4666
  getBulkSetAttachment,
@@ -3884,11 +4703,11 @@ export {
3884
4703
  getPreviousMajorVersionsNestedAnswerElections,
3885
4704
  getPreviousMajorVersionsNestedAnswerIds,
3886
4705
  getProfile,
4706
+ getSSOConfig,
3887
4707
  getSecurityContext,
3888
4708
  getSettings,
3889
4709
  getSignedExecutedVersion,
3890
- getSignedSignaturePagePdf,
3891
- getSsoConfig,
4710
+ getSignedSignaturePagePDF,
3892
4711
  getStatistics,
3893
4712
  getStatisticsOverview,
3894
4713
  getSubAccount,
@@ -3969,7 +4788,7 @@ export {
3969
4788
  revokePresetsAccess,
3970
4789
  revokeWindow,
3971
4790
  scheduleExtraction,
3972
- schemaAvailableAsCdm,
4791
+ schemaAvailableAsCDM,
3973
4792
  searchEntity,
3974
4793
  sendBulkSetToCounterpartiesInitial,
3975
4794
  sendChaserEmail,