@journeybee/sdk 0.1.0 → 0.2.0

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,6 +1,3027 @@
1
- export { client } from "./generated/client.gen";
2
- export * from "./generated/sdk.gen";
3
- // Re-export client factory so consumers (e.g. @journeybee/mcp HTTP mode)
4
- // can create per-request clients instead of mutating the singleton.
5
- export { createClient, createConfig } from "@hey-api/client-fetch";
1
+ // src/generated/core/bodySerializer.gen.ts
2
+ var jsonBodySerializer = {
3
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
4
+ };
5
+
6
+ // src/generated/core/params.gen.ts
7
+ var extraPrefixesMap = {
8
+ $body_: "body",
9
+ $headers_: "headers",
10
+ $path_: "path",
11
+ $query_: "query"
12
+ };
13
+ var extraPrefixes = Object.entries(extraPrefixesMap);
14
+
15
+ // src/generated/core/serverSentEvents.gen.ts
16
+ function createSseClient({
17
+ onRequest,
18
+ onSseError,
19
+ onSseEvent,
20
+ responseTransformer,
21
+ responseValidator,
22
+ sseDefaultRetryDelay,
23
+ sseMaxRetryAttempts,
24
+ sseMaxRetryDelay,
25
+ sseSleepFn,
26
+ url,
27
+ ...options
28
+ }) {
29
+ let lastEventId;
30
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
31
+ const createStream = async function* () {
32
+ let retryDelay = sseDefaultRetryDelay ?? 3e3;
33
+ let attempt = 0;
34
+ const signal = options.signal ?? new AbortController().signal;
35
+ while (true) {
36
+ if (signal.aborted) break;
37
+ attempt++;
38
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
39
+ if (lastEventId !== void 0) {
40
+ headers.set("Last-Event-ID", lastEventId);
41
+ }
42
+ try {
43
+ const requestInit = {
44
+ redirect: "follow",
45
+ ...options,
46
+ body: options.serializedBody,
47
+ headers,
48
+ signal
49
+ };
50
+ let request = new Request(url, requestInit);
51
+ if (onRequest) {
52
+ request = await onRequest(url, requestInit);
53
+ }
54
+ const _fetch = options.fetch ?? globalThis.fetch;
55
+ const response = await _fetch(request);
56
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
57
+ if (!response.body) throw new Error("No body in SSE response");
58
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
59
+ let buffer = "";
60
+ const abortHandler = () => {
61
+ try {
62
+ reader.cancel();
63
+ } catch {
64
+ }
65
+ };
66
+ signal.addEventListener("abort", abortHandler);
67
+ try {
68
+ while (true) {
69
+ const { done, value } = await reader.read();
70
+ if (done) break;
71
+ buffer += value;
72
+ buffer = buffer.replace(/\r\n?/g, "\n");
73
+ const chunks = buffer.split("\n\n");
74
+ buffer = chunks.pop() ?? "";
75
+ for (const chunk of chunks) {
76
+ const lines = chunk.split("\n");
77
+ const dataLines = [];
78
+ let eventName;
79
+ for (const line of lines) {
80
+ if (line.startsWith("data:")) {
81
+ dataLines.push(line.replace(/^data:\s*/, ""));
82
+ } else if (line.startsWith("event:")) {
83
+ eventName = line.replace(/^event:\s*/, "");
84
+ } else if (line.startsWith("id:")) {
85
+ lastEventId = line.replace(/^id:\s*/, "");
86
+ } else if (line.startsWith("retry:")) {
87
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
88
+ if (!Number.isNaN(parsed)) {
89
+ retryDelay = parsed;
90
+ }
91
+ }
92
+ }
93
+ let data;
94
+ let parsedJson = false;
95
+ if (dataLines.length) {
96
+ const rawData = dataLines.join("\n");
97
+ try {
98
+ data = JSON.parse(rawData);
99
+ parsedJson = true;
100
+ } catch {
101
+ data = rawData;
102
+ }
103
+ }
104
+ if (parsedJson) {
105
+ if (responseValidator) {
106
+ await responseValidator(data);
107
+ }
108
+ if (responseTransformer) {
109
+ data = await responseTransformer(data);
110
+ }
111
+ }
112
+ onSseEvent?.({
113
+ data,
114
+ event: eventName,
115
+ id: lastEventId,
116
+ retry: retryDelay
117
+ });
118
+ if (dataLines.length) {
119
+ yield data;
120
+ }
121
+ }
122
+ }
123
+ } finally {
124
+ signal.removeEventListener("abort", abortHandler);
125
+ reader.releaseLock();
126
+ }
127
+ break;
128
+ } catch (error) {
129
+ onSseError?.(error);
130
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
131
+ break;
132
+ }
133
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
134
+ await sleep(backoff);
135
+ }
136
+ }
137
+ };
138
+ const stream = createStream();
139
+ return { stream };
140
+ }
141
+
142
+ // src/generated/core/pathSerializer.gen.ts
143
+ var separatorArrayExplode = (style) => {
144
+ switch (style) {
145
+ case "label":
146
+ return ".";
147
+ case "matrix":
148
+ return ";";
149
+ case "simple":
150
+ return ",";
151
+ default:
152
+ return "&";
153
+ }
154
+ };
155
+ var separatorArrayNoExplode = (style) => {
156
+ switch (style) {
157
+ case "form":
158
+ return ",";
159
+ case "pipeDelimited":
160
+ return "|";
161
+ case "spaceDelimited":
162
+ return "%20";
163
+ default:
164
+ return ",";
165
+ }
166
+ };
167
+ var separatorObjectExplode = (style) => {
168
+ switch (style) {
169
+ case "label":
170
+ return ".";
171
+ case "matrix":
172
+ return ";";
173
+ case "simple":
174
+ return ",";
175
+ default:
176
+ return "&";
177
+ }
178
+ };
179
+ var serializeArrayParam = ({
180
+ allowReserved,
181
+ explode,
182
+ name,
183
+ style,
184
+ value
185
+ }) => {
186
+ if (!explode) {
187
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
188
+ switch (style) {
189
+ case "label":
190
+ return `.${joinedValues2}`;
191
+ case "matrix":
192
+ return `;${name}=${joinedValues2}`;
193
+ case "simple":
194
+ return joinedValues2;
195
+ default:
196
+ return `${name}=${joinedValues2}`;
197
+ }
198
+ }
199
+ const separator = separatorArrayExplode(style);
200
+ const joinedValues = value.map((v) => {
201
+ if (style === "label" || style === "simple") {
202
+ return allowReserved ? v : encodeURIComponent(v);
203
+ }
204
+ return serializePrimitiveParam({
205
+ allowReserved,
206
+ name,
207
+ value: v
208
+ });
209
+ }).join(separator);
210
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
211
+ };
212
+ var serializePrimitiveParam = ({
213
+ allowReserved,
214
+ name,
215
+ value
216
+ }) => {
217
+ if (value === void 0 || value === null) {
218
+ return "";
219
+ }
220
+ if (typeof value === "object") {
221
+ throw new Error(
222
+ "Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
223
+ );
224
+ }
225
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
226
+ };
227
+ var serializeObjectParam = ({
228
+ allowReserved,
229
+ explode,
230
+ name,
231
+ style,
232
+ value,
233
+ valueOnly
234
+ }) => {
235
+ if (value instanceof Date) {
236
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
237
+ }
238
+ if (style !== "deepObject" && !explode) {
239
+ let values = [];
240
+ Object.entries(value).forEach(([key, v]) => {
241
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
242
+ });
243
+ const joinedValues2 = values.join(",");
244
+ switch (style) {
245
+ case "form":
246
+ return `${name}=${joinedValues2}`;
247
+ case "label":
248
+ return `.${joinedValues2}`;
249
+ case "matrix":
250
+ return `;${name}=${joinedValues2}`;
251
+ default:
252
+ return joinedValues2;
253
+ }
254
+ }
255
+ const separator = separatorObjectExplode(style);
256
+ const joinedValues = Object.entries(value).map(
257
+ ([key, v]) => serializePrimitiveParam({
258
+ allowReserved,
259
+ name: style === "deepObject" ? `${name}[${key}]` : key,
260
+ value: v
261
+ })
262
+ ).join(separator);
263
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
264
+ };
265
+
266
+ // src/generated/core/utils.gen.ts
267
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
268
+ var defaultPathSerializer = ({ path, url: _url }) => {
269
+ let url = _url;
270
+ const matches = _url.match(PATH_PARAM_RE);
271
+ if (matches) {
272
+ for (const match of matches) {
273
+ let explode = false;
274
+ let name = match.substring(1, match.length - 1);
275
+ let style = "simple";
276
+ if (name.endsWith("*")) {
277
+ explode = true;
278
+ name = name.substring(0, name.length - 1);
279
+ }
280
+ if (name.startsWith(".")) {
281
+ name = name.substring(1);
282
+ style = "label";
283
+ } else if (name.startsWith(";")) {
284
+ name = name.substring(1);
285
+ style = "matrix";
286
+ }
287
+ const value = path[name];
288
+ if (value === void 0 || value === null) {
289
+ continue;
290
+ }
291
+ if (Array.isArray(value)) {
292
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
293
+ continue;
294
+ }
295
+ if (typeof value === "object") {
296
+ url = url.replace(
297
+ match,
298
+ serializeObjectParam({
299
+ explode,
300
+ name,
301
+ style,
302
+ value,
303
+ valueOnly: true
304
+ })
305
+ );
306
+ continue;
307
+ }
308
+ if (style === "matrix") {
309
+ url = url.replace(
310
+ match,
311
+ `;${serializePrimitiveParam({
312
+ name,
313
+ value
314
+ })}`
315
+ );
316
+ continue;
317
+ }
318
+ const replaceValue = encodeURIComponent(
319
+ style === "label" ? `.${value}` : value
320
+ );
321
+ url = url.replace(match, replaceValue);
322
+ }
323
+ }
324
+ return url;
325
+ };
326
+ var getUrl = ({
327
+ baseUrl,
328
+ path,
329
+ query,
330
+ querySerializer,
331
+ url: _url
332
+ }) => {
333
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
334
+ let url = (baseUrl ?? "") + pathUrl;
335
+ if (path) {
336
+ url = defaultPathSerializer({ path, url });
337
+ }
338
+ let search = query ? querySerializer(query) : "";
339
+ if (search.startsWith("?")) {
340
+ search = search.substring(1);
341
+ }
342
+ if (search) {
343
+ url += `?${search}`;
344
+ }
345
+ return url;
346
+ };
347
+ function getValidRequestBody(options) {
348
+ const hasBody = options.body !== void 0;
349
+ const isSerializedBody = hasBody && options.bodySerializer;
350
+ if (isSerializedBody) {
351
+ if ("serializedBody" in options) {
352
+ const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
353
+ return hasSerializedBody ? options.serializedBody : null;
354
+ }
355
+ return options.body !== "" ? options.body : null;
356
+ }
357
+ if (hasBody) {
358
+ return options.body;
359
+ }
360
+ return void 0;
361
+ }
362
+
363
+ // src/generated/core/auth.gen.ts
364
+ var getAuthToken = async (auth, callback) => {
365
+ const token = typeof callback === "function" ? await callback(auth) : callback;
366
+ if (!token) {
367
+ return;
368
+ }
369
+ if (auth.scheme === "bearer") {
370
+ return `Bearer ${token}`;
371
+ }
372
+ if (auth.scheme === "basic") {
373
+ return `Basic ${btoa(token)}`;
374
+ }
375
+ return token;
376
+ };
377
+
378
+ // src/generated/client/utils.gen.ts
379
+ var createQuerySerializer = ({
380
+ parameters = {},
381
+ ...args
382
+ } = {}) => {
383
+ const querySerializer = (queryParams) => {
384
+ const search = [];
385
+ if (queryParams && typeof queryParams === "object") {
386
+ for (const name in queryParams) {
387
+ const value = queryParams[name];
388
+ if (value === void 0 || value === null) {
389
+ continue;
390
+ }
391
+ const options = parameters[name] || args;
392
+ if (Array.isArray(value)) {
393
+ const serializedArray = serializeArrayParam({
394
+ allowReserved: options.allowReserved,
395
+ explode: true,
396
+ name,
397
+ style: "form",
398
+ value,
399
+ ...options.array
400
+ });
401
+ if (serializedArray) search.push(serializedArray);
402
+ } else if (typeof value === "object") {
403
+ const serializedObject = serializeObjectParam({
404
+ allowReserved: options.allowReserved,
405
+ explode: true,
406
+ name,
407
+ style: "deepObject",
408
+ value,
409
+ ...options.object
410
+ });
411
+ if (serializedObject) search.push(serializedObject);
412
+ } else {
413
+ const serializedPrimitive = serializePrimitiveParam({
414
+ allowReserved: options.allowReserved,
415
+ name,
416
+ value
417
+ });
418
+ if (serializedPrimitive) search.push(serializedPrimitive);
419
+ }
420
+ }
421
+ }
422
+ return search.join("&");
423
+ };
424
+ return querySerializer;
425
+ };
426
+ var getParseAs = (contentType) => {
427
+ if (!contentType) {
428
+ return "stream";
429
+ }
430
+ const cleanContent = contentType.split(";")[0]?.trim();
431
+ if (!cleanContent) {
432
+ return;
433
+ }
434
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
435
+ return "json";
436
+ }
437
+ if (cleanContent === "multipart/form-data") {
438
+ return "formData";
439
+ }
440
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
441
+ return "blob";
442
+ }
443
+ if (cleanContent.startsWith("text/")) {
444
+ return "text";
445
+ }
446
+ return;
447
+ };
448
+ var checkForExistence = (options, name) => {
449
+ if (!name) {
450
+ return false;
451
+ }
452
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
453
+ return true;
454
+ }
455
+ return false;
456
+ };
457
+ async function setAuthParams(options) {
458
+ for (const auth of options.security ?? []) {
459
+ if (checkForExistence(options, auth.name)) {
460
+ continue;
461
+ }
462
+ const token = await getAuthToken(auth, options.auth);
463
+ if (!token) {
464
+ continue;
465
+ }
466
+ const name = auth.name ?? "Authorization";
467
+ switch (auth.in) {
468
+ case "query":
469
+ if (!options.query) {
470
+ options.query = {};
471
+ }
472
+ options.query[name] = token;
473
+ break;
474
+ case "cookie":
475
+ options.headers.append("Cookie", `${name}=${token}`);
476
+ break;
477
+ case "header":
478
+ default:
479
+ options.headers.set(name, token);
480
+ break;
481
+ }
482
+ }
483
+ }
484
+ var buildUrl = (options) => getUrl({
485
+ baseUrl: options.baseUrl,
486
+ path: options.path,
487
+ query: options.query,
488
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
489
+ url: options.url
490
+ });
491
+ var mergeConfigs = (a, b) => {
492
+ const config = { ...a, ...b };
493
+ if (config.baseUrl?.endsWith("/")) {
494
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
495
+ }
496
+ config.headers = mergeHeaders(a.headers, b.headers);
497
+ return config;
498
+ };
499
+ var headersEntries = (headers) => {
500
+ const entries = [];
501
+ headers.forEach((value, key) => {
502
+ entries.push([key, value]);
503
+ });
504
+ return entries;
505
+ };
506
+ var mergeHeaders = (...headers) => {
507
+ const mergedHeaders = new Headers();
508
+ for (const header of headers) {
509
+ if (!header) {
510
+ continue;
511
+ }
512
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
513
+ for (const [key, value] of iterator) {
514
+ if (value === null) {
515
+ mergedHeaders.delete(key);
516
+ } else if (Array.isArray(value)) {
517
+ for (const v of value) {
518
+ mergedHeaders.append(key, v);
519
+ }
520
+ } else if (value !== void 0) {
521
+ mergedHeaders.set(
522
+ key,
523
+ typeof value === "object" ? JSON.stringify(value) : value
524
+ );
525
+ }
526
+ }
527
+ }
528
+ return mergedHeaders;
529
+ };
530
+ var Interceptors = class {
531
+ fns = [];
532
+ clear() {
533
+ this.fns = [];
534
+ }
535
+ eject(id) {
536
+ const index = this.getInterceptorIndex(id);
537
+ if (this.fns[index]) {
538
+ this.fns[index] = null;
539
+ }
540
+ }
541
+ exists(id) {
542
+ const index = this.getInterceptorIndex(id);
543
+ return Boolean(this.fns[index]);
544
+ }
545
+ getInterceptorIndex(id) {
546
+ if (typeof id === "number") {
547
+ return this.fns[id] ? id : -1;
548
+ }
549
+ return this.fns.indexOf(id);
550
+ }
551
+ update(id, fn) {
552
+ const index = this.getInterceptorIndex(id);
553
+ if (this.fns[index]) {
554
+ this.fns[index] = fn;
555
+ return id;
556
+ }
557
+ return false;
558
+ }
559
+ use(fn) {
560
+ this.fns.push(fn);
561
+ return this.fns.length - 1;
562
+ }
563
+ };
564
+ var createInterceptors = () => ({
565
+ error: new Interceptors(),
566
+ request: new Interceptors(),
567
+ response: new Interceptors()
568
+ });
569
+ var defaultQuerySerializer = createQuerySerializer({
570
+ allowReserved: false,
571
+ array: {
572
+ explode: true,
573
+ style: "form"
574
+ },
575
+ object: {
576
+ explode: true,
577
+ style: "deepObject"
578
+ }
579
+ });
580
+ var defaultHeaders = {
581
+ "Content-Type": "application/json"
582
+ };
583
+ var createConfig = (override = {}) => ({
584
+ ...jsonBodySerializer,
585
+ headers: defaultHeaders,
586
+ parseAs: "auto",
587
+ querySerializer: defaultQuerySerializer,
588
+ ...override
589
+ });
590
+
591
+ // src/generated/client/client.gen.ts
592
+ var createClient = (config = {}) => {
593
+ let _config = mergeConfigs(createConfig(), config);
594
+ const getConfig = () => ({ ..._config });
595
+ const setConfig = (config2) => {
596
+ _config = mergeConfigs(_config, config2);
597
+ return getConfig();
598
+ };
599
+ const interceptors = createInterceptors();
600
+ const beforeRequest = async (options) => {
601
+ const opts = {
602
+ ..._config,
603
+ ...options,
604
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
605
+ headers: mergeHeaders(_config.headers, options.headers),
606
+ serializedBody: void 0
607
+ };
608
+ if (opts.security) {
609
+ await setAuthParams(opts);
610
+ }
611
+ if (opts.requestValidator) {
612
+ await opts.requestValidator(opts);
613
+ }
614
+ if (opts.body !== void 0 && opts.bodySerializer) {
615
+ opts.serializedBody = opts.bodySerializer(opts.body);
616
+ }
617
+ if (opts.body === void 0 || opts.serializedBody === "") {
618
+ opts.headers.delete("Content-Type");
619
+ }
620
+ const resolvedOpts = opts;
621
+ const url = buildUrl(resolvedOpts);
622
+ return { opts: resolvedOpts, url };
623
+ };
624
+ const request = async (options) => {
625
+ const throwOnError = options.throwOnError ?? _config.throwOnError;
626
+ const responseStyle = options.responseStyle ?? _config.responseStyle;
627
+ let request2;
628
+ let response;
629
+ try {
630
+ const { opts, url } = await beforeRequest(options);
631
+ const requestInit = {
632
+ redirect: "follow",
633
+ ...opts,
634
+ body: getValidRequestBody(opts)
635
+ };
636
+ request2 = new Request(url, requestInit);
637
+ for (const fn of interceptors.request.fns) {
638
+ if (fn) {
639
+ request2 = await fn(request2, opts);
640
+ }
641
+ }
642
+ const _fetch = opts.fetch;
643
+ response = await _fetch(request2);
644
+ for (const fn of interceptors.response.fns) {
645
+ if (fn) {
646
+ response = await fn(response, request2, opts);
647
+ }
648
+ }
649
+ const result = {
650
+ request: request2,
651
+ response
652
+ };
653
+ if (response.ok) {
654
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
655
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
656
+ let emptyData;
657
+ switch (parseAs) {
658
+ case "arrayBuffer":
659
+ case "blob":
660
+ case "text":
661
+ emptyData = await response[parseAs]();
662
+ break;
663
+ case "formData":
664
+ emptyData = new FormData();
665
+ break;
666
+ case "stream":
667
+ emptyData = response.body;
668
+ break;
669
+ case "json":
670
+ default:
671
+ emptyData = {};
672
+ break;
673
+ }
674
+ return opts.responseStyle === "data" ? emptyData : {
675
+ data: emptyData,
676
+ ...result
677
+ };
678
+ }
679
+ let data;
680
+ switch (parseAs) {
681
+ case "arrayBuffer":
682
+ case "blob":
683
+ case "formData":
684
+ case "text":
685
+ data = await response[parseAs]();
686
+ break;
687
+ case "json": {
688
+ const text = await response.text();
689
+ data = text ? JSON.parse(text) : {};
690
+ break;
691
+ }
692
+ case "stream":
693
+ return opts.responseStyle === "data" ? response.body : {
694
+ data: response.body,
695
+ ...result
696
+ };
697
+ }
698
+ if (parseAs === "json") {
699
+ if (opts.responseValidator) {
700
+ await opts.responseValidator(data);
701
+ }
702
+ if (opts.responseTransformer) {
703
+ data = await opts.responseTransformer(data);
704
+ }
705
+ }
706
+ return opts.responseStyle === "data" ? data : {
707
+ data,
708
+ ...result
709
+ };
710
+ }
711
+ const textError = await response.text();
712
+ let jsonError;
713
+ try {
714
+ jsonError = JSON.parse(textError);
715
+ } catch {
716
+ }
717
+ throw jsonError ?? textError;
718
+ } catch (error) {
719
+ let finalError = error;
720
+ for (const fn of interceptors.error.fns) {
721
+ if (fn) {
722
+ finalError = await fn(finalError, response, request2, options);
723
+ }
724
+ }
725
+ finalError = finalError || {};
726
+ if (throwOnError) {
727
+ throw finalError;
728
+ }
729
+ return responseStyle === "data" ? void 0 : {
730
+ error: finalError,
731
+ request: request2,
732
+ response
733
+ };
734
+ }
735
+ };
736
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
737
+ const makeSseFn = (method) => async (options) => {
738
+ const { opts, url } = await beforeRequest(options);
739
+ return createSseClient({
740
+ ...opts,
741
+ body: opts.body,
742
+ method,
743
+ onRequest: async (url2, init) => {
744
+ let request2 = new Request(url2, init);
745
+ for (const fn of interceptors.request.fns) {
746
+ if (fn) {
747
+ request2 = await fn(request2, opts);
748
+ }
749
+ }
750
+ return request2;
751
+ },
752
+ serializedBody: getValidRequestBody(opts),
753
+ url
754
+ });
755
+ };
756
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
757
+ return {
758
+ buildUrl: _buildUrl,
759
+ connect: makeMethodFn("CONNECT"),
760
+ delete: makeMethodFn("DELETE"),
761
+ get: makeMethodFn("GET"),
762
+ getConfig,
763
+ head: makeMethodFn("HEAD"),
764
+ interceptors,
765
+ options: makeMethodFn("OPTIONS"),
766
+ patch: makeMethodFn("PATCH"),
767
+ post: makeMethodFn("POST"),
768
+ put: makeMethodFn("PUT"),
769
+ request,
770
+ setConfig,
771
+ sse: {
772
+ connect: makeSseFn("CONNECT"),
773
+ delete: makeSseFn("DELETE"),
774
+ get: makeSseFn("GET"),
775
+ head: makeSseFn("HEAD"),
776
+ options: makeSseFn("OPTIONS"),
777
+ patch: makeSseFn("PATCH"),
778
+ post: makeSseFn("POST"),
779
+ put: makeSseFn("PUT"),
780
+ trace: makeSseFn("TRACE")
781
+ },
782
+ trace: makeMethodFn("TRACE")
783
+ };
784
+ };
785
+
786
+ // src/generated/client.gen.ts
787
+ var client = createClient(createConfig({ baseUrl: "https://api.journeybee.io/v1" }));
788
+
789
+ // src/idempotency.ts
790
+ import { randomUUID } from "crypto";
791
+ var LOGICAL_OPERATION_ID_PATTERN = /^[A-Za-z0-9_-]{1,255}$/;
792
+ var parseLogicalOperationId = (operationId) => {
793
+ if (!LOGICAL_OPERATION_ID_PATTERN.test(operationId)) {
794
+ throw new Error(
795
+ "Invalid logical operation id. Expected 1-255 alphanumeric, underscore, or hyphen characters."
796
+ );
797
+ }
798
+ return operationId;
799
+ };
800
+ var createLogicalOperationId = () => parseLogicalOperationId(randomUUID());
801
+ var idempotencyHeaders = (operationId) => ({
802
+ "Idempotency-Key": parseLogicalOperationId(operationId)
803
+ });
804
+ var MUTATION_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
805
+ var addIdempotencyInterceptor = (client2) => {
806
+ client2.interceptors.request.use((request) => {
807
+ if (MUTATION_METHODS.has(request.method.toUpperCase()) && !request.headers.has("Idempotency-Key")) {
808
+ request.headers.set("Idempotency-Key", createLogicalOperationId());
809
+ }
810
+ return request;
811
+ });
812
+ return client2;
813
+ };
814
+ var createIdempotentClient = (config) => addIdempotencyInterceptor(createClient(config ?? createConfig()));
815
+
816
+ // src/generated/sdk.gen.ts
817
+ var getMe = (options) => (options?.client ?? client).get({
818
+ security: [{ scheme: "bearer", type: "http" }],
819
+ url: "/me",
820
+ ...options
821
+ });
822
+ var getPartnerRevenueAnalytics = (options) => (options?.client ?? client).get({
823
+ security: [{ scheme: "bearer", type: "http" }],
824
+ url: "/analytics/partners",
825
+ ...options
826
+ });
827
+ var getRevenueSummary = (options) => (options?.client ?? client).get({
828
+ security: [{ scheme: "bearer", type: "http" }],
829
+ url: "/analytics/revenue-summary",
830
+ ...options
831
+ });
832
+ var getPartnerRevenueTimeSeries = (options) => (options?.client ?? client).get({
833
+ security: [{ scheme: "bearer", type: "http" }],
834
+ url: "/analytics/partners/revenue-time-series",
835
+ ...options
836
+ });
837
+ var getLeadsSentReceived = (options) => (options?.client ?? client).get({
838
+ security: [{ scheme: "bearer", type: "http" }],
839
+ url: "/analytics/leads-sent-received",
840
+ ...options
841
+ });
842
+ var getDealsWonLost = (options) => (options?.client ?? client).get({
843
+ security: [{ scheme: "bearer", type: "http" }],
844
+ url: "/analytics/deals-won-lost",
845
+ ...options
846
+ });
847
+ var getPartnerLeadsTimeline = (options) => (options.client ?? client).get({
848
+ security: [{ scheme: "bearer", type: "http" }],
849
+ url: "/analytics/partners/leads-timeline",
850
+ ...options
851
+ });
852
+ var getPartnerDealsTimeline = (options) => (options.client ?? client).get({
853
+ security: [{ scheme: "bearer", type: "http" }],
854
+ url: "/analytics/partners/deals-timeline",
855
+ ...options
856
+ });
857
+ var getCommissionSummary = (options) => (options?.client ?? client).get({
858
+ security: [{ scheme: "bearer", type: "http" }],
859
+ url: "/analytics/commission-summary",
860
+ ...options
861
+ });
862
+ var getCommissionTimeSeries = (options) => (options?.client ?? client).get({
863
+ security: [{ scheme: "bearer", type: "http" }],
864
+ url: "/analytics/commission/time-series",
865
+ ...options
866
+ });
867
+ var getCommissionPartnerMetrics = (options) => (options?.client ?? client).get({
868
+ security: [{ scheme: "bearer", type: "http" }],
869
+ url: "/analytics/commission/partners",
870
+ ...options
871
+ });
872
+ var getEngagementSummary = (options) => (options?.client ?? client).get({
873
+ security: [{ scheme: "bearer", type: "http" }],
874
+ url: "/analytics/engagement-summary",
875
+ ...options
876
+ });
877
+ var getEngagementTimeSeries = (options) => (options?.client ?? client).get({
878
+ security: [{ scheme: "bearer", type: "http" }],
879
+ url: "/analytics/engagement-time-series",
880
+ ...options
881
+ });
882
+ var getEngagementTopResources = (options) => (options?.client ?? client).get({
883
+ security: [{ scheme: "bearer", type: "http" }],
884
+ url: "/analytics/engagement/top-resources",
885
+ ...options
886
+ });
887
+ var getEngagementTopRooms = (options) => (options?.client ?? client).get({
888
+ security: [{ scheme: "bearer", type: "http" }],
889
+ url: "/analytics/engagement/top-rooms",
890
+ ...options
891
+ });
892
+ var getEngagementTopCertifications = (options) => (options?.client ?? client).get({
893
+ security: [{ scheme: "bearer", type: "http" }],
894
+ url: "/analytics/engagement/top-certifications",
895
+ ...options
896
+ });
897
+ var getEngagementActionBreakdown = (options) => (options?.client ?? client).get({
898
+ security: [{ scheme: "bearer", type: "http" }],
899
+ url: "/analytics/engagement/action-breakdown",
900
+ ...options
901
+ });
902
+ var getEngagementPartnerMetrics = (options) => (options?.client ?? client).get({
903
+ security: [{ scheme: "bearer", type: "http" }],
904
+ url: "/analytics/engagement/partners",
905
+ ...options
906
+ });
907
+ var getLmsSummary = (options) => (options?.client ?? client).get({
908
+ security: [{ scheme: "bearer", type: "http" }],
909
+ url: "/analytics/lms-summary",
910
+ ...options
911
+ });
912
+ var getLmsTimeSeries = (options) => (options?.client ?? client).get({
913
+ security: [{ scheme: "bearer", type: "http" }],
914
+ url: "/analytics/lms-time-series",
915
+ ...options
916
+ });
917
+ var getLmsTopCertificationsByCompletion = (options) => (options?.client ?? client).get({
918
+ security: [{ scheme: "bearer", type: "http" }],
919
+ url: "/analytics/lms/top-certifications-by-completion",
920
+ ...options
921
+ });
922
+ var getLmsTopCertificationsByDifficulty = (options) => (options?.client ?? client).get({
923
+ security: [{ scheme: "bearer", type: "http" }],
924
+ url: "/analytics/lms/top-certifications-by-difficulty",
925
+ ...options
926
+ });
927
+ var getLmsPartnerLeaderboard = (options) => (options?.client ?? client).get({
928
+ security: [{ scheme: "bearer", type: "http" }],
929
+ url: "/analytics/lms/partners",
930
+ ...options
931
+ });
932
+ var getLmsUserLeaderboard = (options) => (options?.client ?? client).get({
933
+ security: [{ scheme: "bearer", type: "http" }],
934
+ url: "/analytics/lms/users",
935
+ ...options
936
+ });
937
+ var getLmsAtRiskLearners = (options) => (options?.client ?? client).get({
938
+ security: [{ scheme: "bearer", type: "http" }],
939
+ url: "/analytics/lms/at-risk-learners",
940
+ ...options
941
+ });
942
+ var getLmsCertResourceCompletions = (options) => (options?.client ?? client).get({
943
+ security: [{ scheme: "bearer", type: "http" }],
944
+ url: "/analytics/lms/cert-resource-completions",
945
+ ...options
946
+ });
947
+ var getLmsCertResourcePassRates = (options) => (options?.client ?? client).get({
948
+ security: [{ scheme: "bearer", type: "http" }],
949
+ url: "/analytics/lms/cert-resource-pass-rates",
950
+ ...options
951
+ });
952
+ var getLmsEnrollmentList = (options) => (options.client ?? client).get({
953
+ security: [{ scheme: "bearer", type: "http" }],
954
+ url: "/analytics/lms/enrollments",
955
+ ...options
956
+ });
957
+ var listAssets = (options) => (options.client ?? client).get({
958
+ security: [{ scheme: "bearer", type: "http" }],
959
+ url: "/assets/",
960
+ ...options
961
+ });
962
+ var uploadAsset = (options) => (options.client ?? client).post({
963
+ security: [{ scheme: "bearer", type: "http" }],
964
+ url: "/assets/",
965
+ ...options,
966
+ headers: {
967
+ "Content-Type": "application/json",
968
+ ...options.headers
969
+ }
970
+ });
971
+ var deleteAsset = (options) => (options.client ?? client).delete({
972
+ security: [{ scheme: "bearer", type: "http" }],
973
+ url: "/assets/{uuid}",
974
+ ...options
975
+ });
976
+ var getAsset = (options) => (options.client ?? client).get({
977
+ security: [{ scheme: "bearer", type: "http" }],
978
+ url: "/assets/{uuid}",
979
+ ...options
980
+ });
981
+ var updateAsset = (options) => (options.client ?? client).patch({
982
+ security: [{ scheme: "bearer", type: "http" }],
983
+ url: "/assets/{uuid}",
984
+ ...options,
985
+ headers: {
986
+ "Content-Type": "application/json",
987
+ ...options.headers
988
+ }
989
+ });
990
+ var listAttributions = (options) => (options?.client ?? client).get({
991
+ security: [{ scheme: "bearer", type: "http" }],
992
+ url: "/attributions/",
993
+ ...options
994
+ });
995
+ var createAttribution = (options) => (options.client ?? client).post({
996
+ security: [{ scheme: "bearer", type: "http" }],
997
+ url: "/attributions/",
998
+ ...options,
999
+ headers: {
1000
+ "Content-Type": "application/json",
1001
+ ...options.headers
1002
+ }
1003
+ });
1004
+ var deleteAttribution = (options) => (options.client ?? client).delete({
1005
+ security: [{ scheme: "bearer", type: "http" }],
1006
+ url: "/attributions/{uuid}",
1007
+ ...options
1008
+ });
1009
+ var getAttribution = (options) => (options.client ?? client).get({
1010
+ security: [{ scheme: "bearer", type: "http" }],
1011
+ url: "/attributions/{uuid}",
1012
+ ...options
1013
+ });
1014
+ var updateAttribution = (options) => (options.client ?? client).patch({
1015
+ security: [{ scheme: "bearer", type: "http" }],
1016
+ url: "/attributions/{uuid}",
1017
+ ...options,
1018
+ headers: {
1019
+ "Content-Type": "application/json",
1020
+ ...options.headers
1021
+ }
1022
+ });
1023
+ var listAuditLog = (options) => (options?.client ?? client).get({
1024
+ security: [{ scheme: "bearer", type: "http" }],
1025
+ url: "/audit-log/",
1026
+ ...options
1027
+ });
1028
+ var listAutomations = (options) => (options?.client ?? client).get({
1029
+ security: [{ scheme: "bearer", type: "http" }],
1030
+ url: "/automations/",
1031
+ ...options
1032
+ });
1033
+ var createAutomation = (options) => (options.client ?? client).post({
1034
+ security: [{ scheme: "bearer", type: "http" }],
1035
+ url: "/automations/",
1036
+ ...options,
1037
+ headers: {
1038
+ "Content-Type": "application/json",
1039
+ ...options.headers
1040
+ }
1041
+ });
1042
+ var deleteAutomation = (options) => (options.client ?? client).delete({
1043
+ security: [{ scheme: "bearer", type: "http" }],
1044
+ url: "/automations/{uuid}",
1045
+ ...options
1046
+ });
1047
+ var getAutomation = (options) => (options.client ?? client).get({
1048
+ security: [{ scheme: "bearer", type: "http" }],
1049
+ url: "/automations/{uuid}",
1050
+ ...options
1051
+ });
1052
+ var updateAutomationWorkflow = (options) => (options.client ?? client).patch({
1053
+ security: [{ scheme: "bearer", type: "http" }],
1054
+ url: "/automations/{uuid}",
1055
+ ...options,
1056
+ headers: {
1057
+ "Content-Type": "application/json",
1058
+ ...options.headers
1059
+ }
1060
+ });
1061
+ var toggleAutomation = (options) => (options.client ?? client).post({
1062
+ security: [{ scheme: "bearer", type: "http" }],
1063
+ url: "/automations/{uuid}/toggle",
1064
+ ...options,
1065
+ headers: {
1066
+ "Content-Type": "application/json",
1067
+ ...options.headers
1068
+ }
1069
+ });
1070
+ var addCampaignTier = (options) => (options.client ?? client).post({
1071
+ security: [{ scheme: "bearer", type: "http" }],
1072
+ url: "/campaigns/{uuid}/tiers",
1073
+ ...options,
1074
+ headers: {
1075
+ "Content-Type": "application/json",
1076
+ ...options.headers
1077
+ }
1078
+ });
1079
+ var removeCampaignTier = (options) => (options.client ?? client).delete({
1080
+ security: [{ scheme: "bearer", type: "http" }],
1081
+ url: "/campaigns/{uuid}/tiers/{subUuid}",
1082
+ ...options
1083
+ });
1084
+ var addCampaignRecipientPartnership = (options) => (options.client ?? client).post({
1085
+ security: [{ scheme: "bearer", type: "http" }],
1086
+ url: "/campaigns/{uuid}/recipient-partnerships",
1087
+ ...options,
1088
+ headers: {
1089
+ "Content-Type": "application/json",
1090
+ ...options.headers
1091
+ }
1092
+ });
1093
+ var removeCampaignRecipientPartnership = (options) => (options.client ?? client).delete({
1094
+ security: [{ scheme: "bearer", type: "http" }],
1095
+ url: "/campaigns/{uuid}/recipient-partnerships/{subUuid}",
1096
+ ...options
1097
+ });
1098
+ var addCampaignCategory = (options) => (options.client ?? client).post({
1099
+ security: [{ scheme: "bearer", type: "http" }],
1100
+ url: "/campaigns/{uuid}/categories",
1101
+ ...options,
1102
+ headers: {
1103
+ "Content-Type": "application/json",
1104
+ ...options.headers
1105
+ }
1106
+ });
1107
+ var removeCampaignCategory = (options) => (options.client ?? client).delete({
1108
+ security: [{ scheme: "bearer", type: "http" }],
1109
+ url: "/campaigns/{uuid}/categories/{subUuid}",
1110
+ ...options
1111
+ });
1112
+ var addCampaignStage = (options) => (options.client ?? client).post({
1113
+ security: [{ scheme: "bearer", type: "http" }],
1114
+ url: "/campaigns/{uuid}/stages",
1115
+ ...options,
1116
+ headers: {
1117
+ "Content-Type": "application/json",
1118
+ ...options.headers
1119
+ }
1120
+ });
1121
+ var addCampaignContactTag = (options) => (options.client ?? client).post({
1122
+ security: [{ scheme: "bearer", type: "http" }],
1123
+ url: "/campaigns/{uuid}/contact-tags",
1124
+ ...options,
1125
+ headers: {
1126
+ "Content-Type": "application/json",
1127
+ ...options.headers
1128
+ }
1129
+ });
1130
+ var removeCampaignContactTag = (options) => (options.client ?? client).delete({
1131
+ security: [{ scheme: "bearer", type: "http" }],
1132
+ url: "/campaigns/{uuid}/contact-tags/{subUuid}",
1133
+ ...options
1134
+ });
1135
+ var addCampaignContact = (options) => (options.client ?? client).post({
1136
+ security: [{ scheme: "bearer", type: "http" }],
1137
+ url: "/campaigns/{uuid}/contacts",
1138
+ ...options,
1139
+ headers: {
1140
+ "Content-Type": "application/json",
1141
+ ...options.headers
1142
+ }
1143
+ });
1144
+ var removeCampaignContact = (options) => (options.client ?? client).delete({
1145
+ security: [{ scheme: "bearer", type: "http" }],
1146
+ url: "/campaigns/{uuid}/contacts/{subUuid}",
1147
+ ...options
1148
+ });
1149
+ var removeCampaignStage = (options) => (options.client ?? client).delete({
1150
+ security: [{ scheme: "bearer", type: "http" }],
1151
+ url: "/campaigns/{uuid}/stages/{subUuid}",
1152
+ ...options
1153
+ });
1154
+ var shareCampaignPartner = (options) => (options.client ?? client).post({
1155
+ security: [{ scheme: "bearer", type: "http" }],
1156
+ url: "/campaigns/{uuid}/partners",
1157
+ ...options,
1158
+ headers: {
1159
+ "Content-Type": "application/json",
1160
+ ...options.headers
1161
+ }
1162
+ });
1163
+ var unshareCampaignPartner = (options) => (options.client ?? client).delete({
1164
+ security: [{ scheme: "bearer", type: "http" }],
1165
+ url: "/campaigns/{uuid}/partners/{subUuid}",
1166
+ ...options
1167
+ });
1168
+ var getCampaignLeadStats = (options) => (options?.client ?? client).get({
1169
+ security: [{ scheme: "bearer", type: "http" }],
1170
+ url: "/campaigns/lead-stats",
1171
+ ...options
1172
+ });
1173
+ var listCampaigns = (options) => (options?.client ?? client).get({
1174
+ security: [{ scheme: "bearer", type: "http" }],
1175
+ url: "/campaigns/",
1176
+ ...options
1177
+ });
1178
+ var createCampaign = (options) => (options.client ?? client).post({
1179
+ security: [{ scheme: "bearer", type: "http" }],
1180
+ url: "/campaigns/",
1181
+ ...options,
1182
+ headers: {
1183
+ "Content-Type": "application/json",
1184
+ ...options.headers
1185
+ }
1186
+ });
1187
+ var deleteCampaign = (options) => (options.client ?? client).delete({
1188
+ security: [{ scheme: "bearer", type: "http" }],
1189
+ url: "/campaigns/{uuid}",
1190
+ ...options
1191
+ });
1192
+ var getCampaign = (options) => (options.client ?? client).get({
1193
+ security: [{ scheme: "bearer", type: "http" }],
1194
+ url: "/campaigns/{uuid}",
1195
+ ...options
1196
+ });
1197
+ var updateCampaign = (options) => (options.client ?? client).patch({
1198
+ security: [{ scheme: "bearer", type: "http" }],
1199
+ url: "/campaigns/{uuid}",
1200
+ ...options,
1201
+ headers: {
1202
+ "Content-Type": "application/json",
1203
+ ...options.headers
1204
+ }
1205
+ });
1206
+ var listCampaignLeads = (options) => (options.client ?? client).get({
1207
+ security: [{ scheme: "bearer", type: "http" }],
1208
+ url: "/campaigns/{uuid}/leads",
1209
+ ...options
1210
+ });
1211
+ var getCampaignRecipients = (options) => (options.client ?? client).get({
1212
+ security: [{ scheme: "bearer", type: "http" }],
1213
+ url: "/campaigns/{uuid}/recipients",
1214
+ ...options
1215
+ });
1216
+ var getCampaignStatistics = (options) => (options.client ?? client).get({
1217
+ security: [{ scheme: "bearer", type: "http" }],
1218
+ url: "/campaigns/{uuid}/statistics",
1219
+ ...options
1220
+ });
1221
+ var testSendCampaignEmail = (options) => (options.client ?? client).post({
1222
+ security: [{ scheme: "bearer", type: "http" }],
1223
+ url: "/campaigns/{uuid}/test-send",
1224
+ ...options,
1225
+ headers: {
1226
+ "Content-Type": "application/json",
1227
+ ...options.headers
1228
+ }
1229
+ });
1230
+ var addCardAssignee = (options) => (options.client ?? client).post({
1231
+ security: [{ scheme: "bearer", type: "http" }],
1232
+ url: "/cards/{uuid}/assignees",
1233
+ ...options,
1234
+ headers: {
1235
+ "Content-Type": "application/json",
1236
+ ...options.headers
1237
+ }
1238
+ });
1239
+ var removeCardAssignee = (options) => (options.client ?? client).delete({
1240
+ security: [{ scheme: "bearer", type: "http" }],
1241
+ url: "/cards/{uuid}/assignees/{subUuid}",
1242
+ ...options
1243
+ });
1244
+ var addCardPartner = (options) => (options.client ?? client).post({
1245
+ security: [{ scheme: "bearer", type: "http" }],
1246
+ url: "/cards/{uuid}/partners",
1247
+ ...options,
1248
+ headers: {
1249
+ "Content-Type": "application/json",
1250
+ ...options.headers
1251
+ }
1252
+ });
1253
+ var removeCardPartner = (options) => (options.client ?? client).delete({
1254
+ security: [{ scheme: "bearer", type: "http" }],
1255
+ url: "/cards/{uuid}/partners/{subUuid}",
1256
+ ...options
1257
+ });
1258
+ var addCardTag = (options) => (options.client ?? client).post({
1259
+ security: [{ scheme: "bearer", type: "http" }],
1260
+ url: "/cards/{uuid}/tags",
1261
+ ...options,
1262
+ headers: {
1263
+ "Content-Type": "application/json",
1264
+ ...options.headers
1265
+ }
1266
+ });
1267
+ var removeCardTag = (options) => (options.client ?? client).delete({
1268
+ security: [{ scheme: "bearer", type: "http" }],
1269
+ url: "/cards/{uuid}/tags/{subUuid}",
1270
+ ...options
1271
+ });
1272
+ var archiveCard = (options) => (options.client ?? client).delete({
1273
+ security: [{ scheme: "bearer", type: "http" }],
1274
+ url: "/cards/{uuid}",
1275
+ ...options
1276
+ });
1277
+ var getCard = (options) => (options.client ?? client).get({
1278
+ security: [{ scheme: "bearer", type: "http" }],
1279
+ url: "/cards/{uuid}",
1280
+ ...options
1281
+ });
1282
+ var updateCard = (options) => (options.client ?? client).patch({
1283
+ security: [{ scheme: "bearer", type: "http" }],
1284
+ url: "/cards/{uuid}",
1285
+ ...options,
1286
+ headers: {
1287
+ "Content-Type": "application/json",
1288
+ ...options.headers
1289
+ }
1290
+ });
1291
+ var listCategories = (options) => (options?.client ?? client).get({
1292
+ security: [{ scheme: "bearer", type: "http" }],
1293
+ url: "/categories/",
1294
+ ...options
1295
+ });
1296
+ var createCategory = (options) => (options.client ?? client).post({
1297
+ security: [{ scheme: "bearer", type: "http" }],
1298
+ url: "/categories/",
1299
+ ...options,
1300
+ headers: {
1301
+ "Content-Type": "application/json",
1302
+ ...options.headers
1303
+ }
1304
+ });
1305
+ var deleteCategory = (options) => (options.client ?? client).delete({
1306
+ security: [{ scheme: "bearer", type: "http" }],
1307
+ url: "/categories/{uuid}",
1308
+ ...options
1309
+ });
1310
+ var updateCategory = (options) => (options.client ?? client).patch({
1311
+ security: [{ scheme: "bearer", type: "http" }],
1312
+ url: "/categories/{uuid}",
1313
+ ...options,
1314
+ headers: {
1315
+ "Content-Type": "application/json",
1316
+ ...options.headers
1317
+ }
1318
+ });
1319
+ var addCertificationCategory = (options) => (options.client ?? client).post({
1320
+ security: [{ scheme: "bearer", type: "http" }],
1321
+ url: "/certifications/{uuid}/categories",
1322
+ ...options,
1323
+ headers: {
1324
+ "Content-Type": "application/json",
1325
+ ...options.headers
1326
+ }
1327
+ });
1328
+ var removeCertificationCategory = (options) => (options.client ?? client).delete({
1329
+ security: [{ scheme: "bearer", type: "http" }],
1330
+ url: "/certifications/{uuid}/categories/{subUuid}",
1331
+ ...options
1332
+ });
1333
+ var listCertificationEnrollments = (options) => (options.client ?? client).get({
1334
+ security: [{ scheme: "bearer", type: "http" }],
1335
+ url: "/certifications/{uuid}/enrollments",
1336
+ ...options
1337
+ });
1338
+ var enrollInCertification = (options) => (options.client ?? client).post({
1339
+ security: [{ scheme: "bearer", type: "http" }],
1340
+ url: "/certifications/{uuid}/enrollments",
1341
+ ...options,
1342
+ headers: {
1343
+ "Content-Type": "application/json",
1344
+ ...options.headers
1345
+ }
1346
+ });
1347
+ var addCertificationFolder = (options) => (options.client ?? client).post({
1348
+ security: [{ scheme: "bearer", type: "http" }],
1349
+ url: "/certifications/{uuid}/folders",
1350
+ ...options,
1351
+ headers: {
1352
+ "Content-Type": "application/json",
1353
+ ...options.headers
1354
+ }
1355
+ });
1356
+ var removeCertificationFolder = (options) => (options.client ?? client).delete({
1357
+ security: [{ scheme: "bearer", type: "http" }],
1358
+ url: "/certifications/{uuid}/folders/{subUuid}",
1359
+ ...options
1360
+ });
1361
+ var listCertificationResources = (options) => (options.client ?? client).get({
1362
+ security: [{ scheme: "bearer", type: "http" }],
1363
+ url: "/certifications/{uuid}/resources",
1364
+ ...options
1365
+ });
1366
+ var addCertificationResource = (options) => (options.client ?? client).post({
1367
+ security: [{ scheme: "bearer", type: "http" }],
1368
+ url: "/certifications/{uuid}/resources",
1369
+ ...options,
1370
+ headers: {
1371
+ "Content-Type": "application/json",
1372
+ ...options.headers
1373
+ }
1374
+ });
1375
+ var removeCertificationResource = (options) => (options.client ?? client).delete({
1376
+ security: [{ scheme: "bearer", type: "http" }],
1377
+ url: "/certifications/{uuid}/resources/{subUuid}",
1378
+ ...options
1379
+ });
1380
+ var updateCertificationResource = (options) => (options.client ?? client).patch({
1381
+ security: [{ scheme: "bearer", type: "http" }],
1382
+ url: "/certifications/{uuid}/resources/{subUuid}",
1383
+ ...options,
1384
+ headers: {
1385
+ "Content-Type": "application/json",
1386
+ ...options.headers
1387
+ }
1388
+ });
1389
+ var listCertifications = (options) => (options?.client ?? client).get({
1390
+ security: [{ scheme: "bearer", type: "http" }],
1391
+ url: "/certifications/",
1392
+ ...options
1393
+ });
1394
+ var createCertification = (options) => (options.client ?? client).post({
1395
+ security: [{ scheme: "bearer", type: "http" }],
1396
+ url: "/certifications/",
1397
+ ...options,
1398
+ headers: {
1399
+ "Content-Type": "application/json",
1400
+ ...options.headers
1401
+ }
1402
+ });
1403
+ var deleteCertification = (options) => (options.client ?? client).delete({
1404
+ security: [{ scheme: "bearer", type: "http" }],
1405
+ url: "/certifications/{uuid}",
1406
+ ...options
1407
+ });
1408
+ var getCertification = (options) => (options.client ?? client).get({
1409
+ security: [{ scheme: "bearer", type: "http" }],
1410
+ url: "/certifications/{uuid}",
1411
+ ...options
1412
+ });
1413
+ var updateCertification = (options) => (options.client ?? client).patch({
1414
+ security: [{ scheme: "bearer", type: "http" }],
1415
+ url: "/certifications/{uuid}",
1416
+ ...options,
1417
+ headers: {
1418
+ "Content-Type": "application/json",
1419
+ ...options.headers
1420
+ }
1421
+ });
1422
+ var listCommissions = (options) => (options?.client ?? client).get({
1423
+ security: [{ scheme: "bearer", type: "http" }],
1424
+ url: "/commissions/",
1425
+ ...options
1426
+ });
1427
+ var createCommission = (options) => (options.client ?? client).post({
1428
+ security: [{ scheme: "bearer", type: "http" }],
1429
+ url: "/commissions/",
1430
+ ...options,
1431
+ headers: {
1432
+ "Content-Type": "application/json",
1433
+ ...options.headers
1434
+ }
1435
+ });
1436
+ var deleteCommission = (options) => (options.client ?? client).delete({
1437
+ security: [{ scheme: "bearer", type: "http" }],
1438
+ url: "/commissions/{uuid}",
1439
+ ...options
1440
+ });
1441
+ var getCommission = (options) => (options.client ?? client).get({
1442
+ security: [{ scheme: "bearer", type: "http" }],
1443
+ url: "/commissions/{uuid}",
1444
+ ...options
1445
+ });
1446
+ var updateCommission = (options) => (options.client ?? client).patch({
1447
+ security: [{ scheme: "bearer", type: "http" }],
1448
+ url: "/commissions/{uuid}",
1449
+ ...options,
1450
+ headers: {
1451
+ "Content-Type": "application/json",
1452
+ ...options.headers
1453
+ }
1454
+ });
1455
+ var listContacts = (options) => (options?.client ?? client).get({
1456
+ security: [{ scheme: "bearer", type: "http" }],
1457
+ url: "/contacts/",
1458
+ ...options
1459
+ });
1460
+ var getContact = (options) => (options.client ?? client).get({
1461
+ security: [{ scheme: "bearer", type: "http" }],
1462
+ url: "/contacts/{uuid}",
1463
+ ...options
1464
+ });
1465
+ var listCurrencies = (options) => (options?.client ?? client).get({
1466
+ security: [{ scheme: "bearer", type: "http" }],
1467
+ url: "/currencies/",
1468
+ ...options
1469
+ });
1470
+ var addCustomFieldOption = (options) => (options.client ?? client).post({
1471
+ security: [{ scheme: "bearer", type: "http" }],
1472
+ url: "/custom-fields/{uuid}/options",
1473
+ ...options,
1474
+ headers: {
1475
+ "Content-Type": "application/json",
1476
+ ...options.headers
1477
+ }
1478
+ });
1479
+ var deleteCustomFieldOption = (options) => (options.client ?? client).delete({
1480
+ security: [{ scheme: "bearer", type: "http" }],
1481
+ url: "/custom-fields/{uuid}/options/{optionId}",
1482
+ ...options
1483
+ });
1484
+ var updateCustomFieldOption = (options) => (options.client ?? client).patch({
1485
+ security: [{ scheme: "bearer", type: "http" }],
1486
+ url: "/custom-fields/{uuid}/options/{optionId}",
1487
+ ...options,
1488
+ headers: {
1489
+ "Content-Type": "application/json",
1490
+ ...options.headers
1491
+ }
1492
+ });
1493
+ var listCustomFieldRules = (options) => (options?.client ?? client).get({
1494
+ security: [{ scheme: "bearer", type: "http" }],
1495
+ url: "/custom-field-rules/",
1496
+ ...options
1497
+ });
1498
+ var createCustomFieldRule = (options) => (options.client ?? client).post({
1499
+ security: [{ scheme: "bearer", type: "http" }],
1500
+ url: "/custom-field-rules/",
1501
+ ...options,
1502
+ headers: {
1503
+ "Content-Type": "application/json",
1504
+ ...options.headers
1505
+ }
1506
+ });
1507
+ var deleteCustomFieldRule = (options) => (options.client ?? client).delete({
1508
+ security: [{ scheme: "bearer", type: "http" }],
1509
+ url: "/custom-field-rules/{uuid}",
1510
+ ...options
1511
+ });
1512
+ var updateCustomFieldRule = (options) => (options.client ?? client).patch({
1513
+ security: [{ scheme: "bearer", type: "http" }],
1514
+ url: "/custom-field-rules/{uuid}",
1515
+ ...options,
1516
+ headers: {
1517
+ "Content-Type": "application/json",
1518
+ ...options.headers
1519
+ }
1520
+ });
1521
+ var listCustomFieldValues = (options) => (options.client ?? client).get({
1522
+ security: [{ scheme: "bearer", type: "http" }],
1523
+ url: "/custom-field-values/",
1524
+ ...options
1525
+ });
1526
+ var createCustomFieldValue = (options) => (options.client ?? client).post({
1527
+ security: [{ scheme: "bearer", type: "http" }],
1528
+ url: "/custom-field-values/",
1529
+ ...options,
1530
+ headers: {
1531
+ "Content-Type": "application/json",
1532
+ ...options.headers
1533
+ }
1534
+ });
1535
+ var deleteCustomFieldValue = (options) => (options.client ?? client).delete({
1536
+ security: [{ scheme: "bearer", type: "http" }],
1537
+ url: "/custom-field-values/{uuid}",
1538
+ ...options
1539
+ });
1540
+ var updateCustomFieldValue = (options) => (options.client ?? client).patch({
1541
+ security: [{ scheme: "bearer", type: "http" }],
1542
+ url: "/custom-field-values/{uuid}",
1543
+ ...options,
1544
+ headers: {
1545
+ "Content-Type": "application/json",
1546
+ ...options.headers
1547
+ }
1548
+ });
1549
+ var listCustomFields = (options) => (options?.client ?? client).get({
1550
+ security: [{ scheme: "bearer", type: "http" }],
1551
+ url: "/custom-fields/",
1552
+ ...options
1553
+ });
1554
+ var createCustomField = (options) => (options.client ?? client).post({
1555
+ security: [{ scheme: "bearer", type: "http" }],
1556
+ url: "/custom-fields/",
1557
+ ...options,
1558
+ headers: {
1559
+ "Content-Type": "application/json",
1560
+ ...options.headers
1561
+ }
1562
+ });
1563
+ var deleteCustomField = (options) => (options.client ?? client).delete({
1564
+ security: [{ scheme: "bearer", type: "http" }],
1565
+ url: "/custom-fields/{uuid}",
1566
+ ...options
1567
+ });
1568
+ var updateCustomField = (options) => (options.client ?? client).patch({
1569
+ security: [{ scheme: "bearer", type: "http" }],
1570
+ url: "/custom-fields/{uuid}",
1571
+ ...options,
1572
+ headers: {
1573
+ "Content-Type": "application/json",
1574
+ ...options.headers
1575
+ }
1576
+ });
1577
+ var clearDealCommission = (options) => (options.client ?? client).delete({
1578
+ security: [{ scheme: "bearer", type: "http" }],
1579
+ url: "/deals/{uuid}/commission",
1580
+ ...options
1581
+ });
1582
+ var getDealCommission = (options) => (options.client ?? client).get({
1583
+ security: [{ scheme: "bearer", type: "http" }],
1584
+ url: "/deals/{uuid}/commission",
1585
+ ...options
1586
+ });
1587
+ var setDealCommission = (options) => (options.client ?? client).put({
1588
+ security: [{ scheme: "bearer", type: "http" }],
1589
+ url: "/deals/{uuid}/commission",
1590
+ ...options,
1591
+ headers: {
1592
+ "Content-Type": "application/json",
1593
+ ...options.headers
1594
+ }
1595
+ });
1596
+ var setDealCustomField = (options) => (options.client ?? client).put({
1597
+ security: [{ scheme: "bearer", type: "http" }],
1598
+ url: "/deals/{uuid}/custom-fields",
1599
+ ...options,
1600
+ headers: {
1601
+ "Content-Type": "application/json",
1602
+ ...options.headers
1603
+ }
1604
+ });
1605
+ var removeDealCustomField = (options) => (options.client ?? client).delete({
1606
+ security: [{ scheme: "bearer", type: "http" }],
1607
+ url: "/deals/{uuid}/custom-fields/{subUuid}",
1608
+ ...options
1609
+ });
1610
+ var listDealNotes = (options) => (options.client ?? client).get({
1611
+ security: [{ scheme: "bearer", type: "http" }],
1612
+ url: "/deals/{uuid}/notes",
1613
+ ...options
1614
+ });
1615
+ var createDealNote = (options) => (options.client ?? client).post({
1616
+ security: [{ scheme: "bearer", type: "http" }],
1617
+ url: "/deals/{uuid}/notes",
1618
+ ...options,
1619
+ headers: {
1620
+ "Content-Type": "application/json",
1621
+ ...options.headers
1622
+ }
1623
+ });
1624
+ var deleteDealNote = (options) => (options.client ?? client).delete({
1625
+ security: [{ scheme: "bearer", type: "http" }],
1626
+ url: "/deals/{uuid}/notes/{subUuid}",
1627
+ ...options
1628
+ });
1629
+ var listDealPayments = (options) => (options.client ?? client).get({
1630
+ security: [{ scheme: "bearer", type: "http" }],
1631
+ url: "/deals/{uuid}/payments",
1632
+ ...options
1633
+ });
1634
+ var listDealProducts = (options) => (options.client ?? client).get({
1635
+ security: [{ scheme: "bearer", type: "http" }],
1636
+ url: "/deals/{uuid}/products",
1637
+ ...options
1638
+ });
1639
+ var addDealProduct = (options) => (options.client ?? client).post({
1640
+ security: [{ scheme: "bearer", type: "http" }],
1641
+ url: "/deals/{uuid}/products",
1642
+ ...options,
1643
+ headers: {
1644
+ "Content-Type": "application/json",
1645
+ ...options.headers
1646
+ }
1647
+ });
1648
+ var removeDealProduct = (options) => (options.client ?? client).delete({
1649
+ security: [{ scheme: "bearer", type: "http" }],
1650
+ url: "/deals/{uuid}/products/{subUuid}",
1651
+ ...options
1652
+ });
1653
+ var updateDealProduct = (options) => (options.client ?? client).patch({
1654
+ security: [{ scheme: "bearer", type: "http" }],
1655
+ url: "/deals/{uuid}/products/{subUuid}",
1656
+ ...options,
1657
+ headers: {
1658
+ "Content-Type": "application/json",
1659
+ ...options.headers
1660
+ }
1661
+ });
1662
+ var listDealStages = (options) => (options?.client ?? client).get({
1663
+ security: [{ scheme: "bearer", type: "http" }],
1664
+ url: "/deal-stages/",
1665
+ ...options
1666
+ });
1667
+ var createDealStage = (options) => (options.client ?? client).post({
1668
+ security: [{ scheme: "bearer", type: "http" }],
1669
+ url: "/deal-stages/",
1670
+ ...options,
1671
+ headers: {
1672
+ "Content-Type": "application/json",
1673
+ ...options.headers
1674
+ }
1675
+ });
1676
+ var deleteDealStage = (options) => (options.client ?? client).delete({
1677
+ security: [{ scheme: "bearer", type: "http" }],
1678
+ url: "/deal-stages/{uuid}",
1679
+ ...options
1680
+ });
1681
+ var updateDealStage = (options) => (options.client ?? client).patch({
1682
+ security: [{ scheme: "bearer", type: "http" }],
1683
+ url: "/deal-stages/{uuid}",
1684
+ ...options,
1685
+ headers: {
1686
+ "Content-Type": "application/json",
1687
+ ...options.headers
1688
+ }
1689
+ });
1690
+ var addDealTag = (options) => (options.client ?? client).post({
1691
+ security: [{ scheme: "bearer", type: "http" }],
1692
+ url: "/deals/{uuid}/tags",
1693
+ ...options,
1694
+ headers: {
1695
+ "Content-Type": "application/json",
1696
+ ...options.headers
1697
+ }
1698
+ });
1699
+ var removeDealTag = (options) => (options.client ?? client).delete({
1700
+ security: [{ scheme: "bearer", type: "http" }],
1701
+ url: "/deals/{uuid}/tags/{subUuid}",
1702
+ ...options
1703
+ });
1704
+ var listDealTasks = (options) => (options.client ?? client).get({
1705
+ security: [{ scheme: "bearer", type: "http" }],
1706
+ url: "/deals/{uuid}/tasks",
1707
+ ...options
1708
+ });
1709
+ var createDealTask = (options) => (options.client ?? client).post({
1710
+ security: [{ scheme: "bearer", type: "http" }],
1711
+ url: "/deals/{uuid}/tasks",
1712
+ ...options,
1713
+ headers: {
1714
+ "Content-Type": "application/json",
1715
+ ...options.headers
1716
+ }
1717
+ });
1718
+ var listDeals = (options) => (options?.client ?? client).get({
1719
+ security: [{ scheme: "bearer", type: "http" }],
1720
+ url: "/deals/",
1721
+ ...options
1722
+ });
1723
+ var createDeal = (options) => (options.client ?? client).post({
1724
+ security: [{ scheme: "bearer", type: "http" }],
1725
+ url: "/deals/",
1726
+ ...options,
1727
+ headers: {
1728
+ "Content-Type": "application/json",
1729
+ ...options.headers
1730
+ }
1731
+ });
1732
+ var deleteDeal = (options) => (options.client ?? client).delete({
1733
+ security: [{ scheme: "bearer", type: "http" }],
1734
+ url: "/deals/{uuid}",
1735
+ ...options
1736
+ });
1737
+ var getDeal = (options) => (options.client ?? client).get({
1738
+ security: [{ scheme: "bearer", type: "http" }],
1739
+ url: "/deals/{uuid}",
1740
+ ...options
1741
+ });
1742
+ var updateDeal = (options) => (options.client ?? client).patch({
1743
+ security: [{ scheme: "bearer", type: "http" }],
1744
+ url: "/deals/{uuid}",
1745
+ ...options,
1746
+ headers: {
1747
+ "Content-Type": "application/json",
1748
+ ...options.headers
1749
+ }
1750
+ });
1751
+ var getPipelineSummary = (options) => (options?.client ?? client).get({
1752
+ security: [{ scheme: "bearer", type: "http" }],
1753
+ url: "/deals/pipeline-summary",
1754
+ ...options
1755
+ });
1756
+ var listFolders = (options) => (options?.client ?? client).get({
1757
+ security: [{ scheme: "bearer", type: "http" }],
1758
+ url: "/folders/",
1759
+ ...options
1760
+ });
1761
+ var createFolder = (options) => (options.client ?? client).post({
1762
+ security: [{ scheme: "bearer", type: "http" }],
1763
+ url: "/folders/",
1764
+ ...options,
1765
+ headers: {
1766
+ "Content-Type": "application/json",
1767
+ ...options.headers
1768
+ }
1769
+ });
1770
+ var deleteFolder = (options) => (options.client ?? client).delete({
1771
+ security: [{ scheme: "bearer", type: "http" }],
1772
+ url: "/folders/{uuid}",
1773
+ ...options
1774
+ });
1775
+ var getFolder = (options) => (options.client ?? client).get({
1776
+ security: [{ scheme: "bearer", type: "http" }],
1777
+ url: "/folders/{uuid}",
1778
+ ...options
1779
+ });
1780
+ var updateFolder = (options) => (options.client ?? client).patch({
1781
+ security: [{ scheme: "bearer", type: "http" }],
1782
+ url: "/folders/{uuid}",
1783
+ ...options,
1784
+ headers: {
1785
+ "Content-Type": "application/json",
1786
+ ...options.headers
1787
+ }
1788
+ });
1789
+ var getSalesforcePartnerCreateStageGates = (options) => (options?.client ?? client).get({
1790
+ security: [{ scheme: "bearer", type: "http" }],
1791
+ url: "/integrations/salesforce/partner-create-stage-gates/",
1792
+ ...options
1793
+ });
1794
+ var updateSalesforcePartnerCreateStageGates = (options) => (options.client ?? client).patch({
1795
+ security: [{ scheme: "bearer", type: "http" }],
1796
+ url: "/integrations/salesforce/partner-create-stage-gates/",
1797
+ ...options,
1798
+ headers: {
1799
+ "Content-Type": "application/json",
1800
+ ...options.headers
1801
+ }
1802
+ });
1803
+ var listLeadAttributions = (options) => (options.client ?? client).get({
1804
+ security: [{ scheme: "bearer", type: "http" }],
1805
+ url: "/leads/{uuid}/attributions",
1806
+ ...options
1807
+ });
1808
+ var addLeadAttribution = (options) => (options.client ?? client).post({
1809
+ security: [{ scheme: "bearer", type: "http" }],
1810
+ url: "/leads/{uuid}/attributions",
1811
+ ...options,
1812
+ headers: {
1813
+ "Content-Type": "application/json",
1814
+ ...options.headers
1815
+ }
1816
+ });
1817
+ var removeLeadAttribution = (options) => (options.client ?? client).delete({
1818
+ security: [{ scheme: "bearer", type: "http" }],
1819
+ url: "/leads/{uuid}/attributions/{subUuid}",
1820
+ ...options
1821
+ });
1822
+ var listLeadContacts = (options) => (options.client ?? client).get({
1823
+ security: [{ scheme: "bearer", type: "http" }],
1824
+ url: "/leads/{uuid}/contacts",
1825
+ ...options
1826
+ });
1827
+ var addLeadContact = (options) => (options.client ?? client).post({
1828
+ security: [{ scheme: "bearer", type: "http" }],
1829
+ url: "/leads/{uuid}/contacts",
1830
+ ...options,
1831
+ headers: {
1832
+ "Content-Type": "application/json",
1833
+ ...options.headers
1834
+ }
1835
+ });
1836
+ var removeLeadContact = (options) => (options.client ?? client).delete({
1837
+ security: [{ scheme: "bearer", type: "http" }],
1838
+ url: "/leads/{uuid}/contacts/{subUuid}",
1839
+ ...options
1840
+ });
1841
+ var setLeadCustomField = (options) => (options.client ?? client).put({
1842
+ security: [{ scheme: "bearer", type: "http" }],
1843
+ url: "/leads/{uuid}/custom-fields",
1844
+ ...options,
1845
+ headers: {
1846
+ "Content-Type": "application/json",
1847
+ ...options.headers
1848
+ }
1849
+ });
1850
+ var removeLeadCustomField = (options) => (options.client ?? client).delete({
1851
+ security: [{ scheme: "bearer", type: "http" }],
1852
+ url: "/leads/{uuid}/custom-fields/{subUuid}",
1853
+ ...options
1854
+ });
1855
+ var updateLeadCustomField = (options) => (options.client ?? client).patch({
1856
+ security: [{ scheme: "bearer", type: "http" }],
1857
+ url: "/leads/{uuid}/custom-fields/{subUuid}",
1858
+ ...options,
1859
+ headers: {
1860
+ "Content-Type": "application/json",
1861
+ ...options.headers
1862
+ }
1863
+ });
1864
+ var removeLeadDistributor = (options) => (options.client ?? client).delete({
1865
+ security: [{ scheme: "bearer", type: "http" }],
1866
+ url: "/leads/{uuid}/distributor",
1867
+ ...options
1868
+ });
1869
+ var getLeadDistributor = (options) => (options.client ?? client).get({
1870
+ security: [{ scheme: "bearer", type: "http" }],
1871
+ url: "/leads/{uuid}/distributor",
1872
+ ...options
1873
+ });
1874
+ var setLeadDistributor = (options) => (options.client ?? client).put({
1875
+ security: [{ scheme: "bearer", type: "http" }],
1876
+ url: "/leads/{uuid}/distributor",
1877
+ ...options,
1878
+ headers: {
1879
+ "Content-Type": "application/json",
1880
+ ...options.headers
1881
+ }
1882
+ });
1883
+ var listLeadNotes = (options) => (options.client ?? client).get({
1884
+ security: [{ scheme: "bearer", type: "http" }],
1885
+ url: "/leads/{uuid}/notes",
1886
+ ...options
1887
+ });
1888
+ var createLeadNote = (options) => (options.client ?? client).post({
1889
+ security: [{ scheme: "bearer", type: "http" }],
1890
+ url: "/leads/{uuid}/notes",
1891
+ ...options,
1892
+ headers: {
1893
+ "Content-Type": "application/json",
1894
+ ...options.headers
1895
+ }
1896
+ });
1897
+ var deleteLeadNote = (options) => (options.client ?? client).delete({
1898
+ security: [{ scheme: "bearer", type: "http" }],
1899
+ url: "/leads/{uuid}/notes/{subUuid}",
1900
+ ...options
1901
+ });
1902
+ var listLeadProducts = (options) => (options.client ?? client).get({
1903
+ security: [{ scheme: "bearer", type: "http" }],
1904
+ url: "/leads/{uuid}/products",
1905
+ ...options
1906
+ });
1907
+ var addLeadProduct = (options) => (options.client ?? client).post({
1908
+ security: [{ scheme: "bearer", type: "http" }],
1909
+ url: "/leads/{uuid}/products",
1910
+ ...options,
1911
+ headers: {
1912
+ "Content-Type": "application/json",
1913
+ ...options.headers
1914
+ }
1915
+ });
1916
+ var removeLeadProduct = (options) => (options.client ?? client).delete({
1917
+ security: [{ scheme: "bearer", type: "http" }],
1918
+ url: "/leads/{uuid}/products/{subUuid}",
1919
+ ...options
1920
+ });
1921
+ var updateLeadProduct = (options) => (options.client ?? client).patch({
1922
+ security: [{ scheme: "bearer", type: "http" }],
1923
+ url: "/leads/{uuid}/products/{subUuid}",
1924
+ ...options,
1925
+ headers: {
1926
+ "Content-Type": "application/json",
1927
+ ...options.headers
1928
+ }
1929
+ });
1930
+ var deleteLeadQuote = (options) => (options.client ?? client).delete({
1931
+ security: [{ scheme: "bearer", type: "http" }],
1932
+ url: "/leads/{uuid}/quote",
1933
+ ...options
1934
+ });
1935
+ var getLeadQuote = (options) => (options.client ?? client).get({
1936
+ security: [{ scheme: "bearer", type: "http" }],
1937
+ url: "/leads/{uuid}/quote",
1938
+ ...options
1939
+ });
1940
+ var addLeadTag = (options) => (options.client ?? client).post({
1941
+ security: [{ scheme: "bearer", type: "http" }],
1942
+ url: "/leads/{uuid}/tags",
1943
+ ...options,
1944
+ headers: {
1945
+ "Content-Type": "application/json",
1946
+ ...options.headers
1947
+ }
1948
+ });
1949
+ var removeLeadTag = (options) => (options.client ?? client).delete({
1950
+ security: [{ scheme: "bearer", type: "http" }],
1951
+ url: "/leads/{uuid}/tags/{subUuid}",
1952
+ ...options
1953
+ });
1954
+ var listLeadTasks = (options) => (options.client ?? client).get({
1955
+ security: [{ scheme: "bearer", type: "http" }],
1956
+ url: "/leads/{uuid}/tasks",
1957
+ ...options
1958
+ });
1959
+ var createLeadTask = (options) => (options.client ?? client).post({
1960
+ security: [{ scheme: "bearer", type: "http" }],
1961
+ url: "/leads/{uuid}/tasks",
1962
+ ...options,
1963
+ headers: {
1964
+ "Content-Type": "application/json",
1965
+ ...options.headers
1966
+ }
1967
+ });
1968
+ var assignLeadUser = (options) => (options.client ?? client).post({
1969
+ security: [{ scheme: "bearer", type: "http" }],
1970
+ url: "/leads/{uuid}/assigned-users",
1971
+ ...options,
1972
+ headers: {
1973
+ "Content-Type": "application/json",
1974
+ ...options.headers
1975
+ }
1976
+ });
1977
+ var removeLeadUser = (options) => (options.client ?? client).delete({
1978
+ security: [{ scheme: "bearer", type: "http" }],
1979
+ url: "/leads/{uuid}/assigned-users/{subUuid}",
1980
+ ...options
1981
+ });
1982
+ var listLeads = (options) => (options?.client ?? client).get({
1983
+ security: [{ scheme: "bearer", type: "http" }],
1984
+ url: "/leads/",
1985
+ ...options
1986
+ });
1987
+ var createLead = (options) => (options.client ?? client).post({
1988
+ security: [{ scheme: "bearer", type: "http" }],
1989
+ url: "/leads/",
1990
+ ...options,
1991
+ headers: {
1992
+ "Content-Type": "application/json",
1993
+ ...options.headers
1994
+ }
1995
+ });
1996
+ var deleteLead = (options) => (options.client ?? client).delete({
1997
+ security: [{ scheme: "bearer", type: "http" }],
1998
+ url: "/leads/{uuid}",
1999
+ ...options
2000
+ });
2001
+ var getLead = (options) => (options.client ?? client).get({
2002
+ security: [{ scheme: "bearer", type: "http" }],
2003
+ url: "/leads/{uuid}",
2004
+ ...options
2005
+ });
2006
+ var updateLead = (options) => (options.client ?? client).patch({
2007
+ security: [{ scheme: "bearer", type: "http" }],
2008
+ url: "/leads/{uuid}",
2009
+ ...options,
2010
+ headers: {
2011
+ "Content-Type": "application/json",
2012
+ ...options.headers
2013
+ }
2014
+ });
2015
+ var listMarketingTemplates = (options) => (options?.client ?? client).get({
2016
+ security: [{ scheme: "bearer", type: "http" }],
2017
+ url: "/marketing-templates/",
2018
+ ...options
2019
+ });
2020
+ var createMarketingTemplate = (options) => (options.client ?? client).post({
2021
+ security: [{ scheme: "bearer", type: "http" }],
2022
+ url: "/marketing-templates/",
2023
+ ...options,
2024
+ headers: {
2025
+ "Content-Type": "application/json",
2026
+ ...options.headers
2027
+ }
2028
+ });
2029
+ var deleteMarketingTemplate = (options) => (options.client ?? client).delete({
2030
+ security: [{ scheme: "bearer", type: "http" }],
2031
+ url: "/marketing-templates/{uuid}",
2032
+ ...options
2033
+ });
2034
+ var getMarketingTemplate = (options) => (options.client ?? client).get({
2035
+ security: [{ scheme: "bearer", type: "http" }],
2036
+ url: "/marketing-templates/{uuid}",
2037
+ ...options
2038
+ });
2039
+ var updateMarketingTemplate = (options) => (options.client ?? client).patch({
2040
+ security: [{ scheme: "bearer", type: "http" }],
2041
+ url: "/marketing-templates/{uuid}",
2042
+ ...options,
2043
+ headers: {
2044
+ "Content-Type": "application/json",
2045
+ ...options.headers
2046
+ }
2047
+ });
2048
+ var listPartnerContacts = (options) => (options.client ?? client).get({
2049
+ security: [{ scheme: "bearer", type: "http" }],
2050
+ url: "/partners/{uuid}/contacts",
2051
+ ...options
2052
+ });
2053
+ var createPartnerContact = (options) => (options.client ?? client).post({
2054
+ security: [{ scheme: "bearer", type: "http" }],
2055
+ url: "/partners/{uuid}/contacts",
2056
+ ...options,
2057
+ headers: {
2058
+ "Content-Type": "application/json",
2059
+ ...options.headers
2060
+ }
2061
+ });
2062
+ var deletePartnerContact = (options) => (options.client ?? client).delete({
2063
+ security: [{ scheme: "bearer", type: "http" }],
2064
+ url: "/partners/{uuid}/contacts/{subUuid}",
2065
+ ...options
2066
+ });
2067
+ var updatePartnerContact = (options) => (options.client ?? client).patch({
2068
+ security: [{ scheme: "bearer", type: "http" }],
2069
+ url: "/partners/{uuid}/contacts/{subUuid}",
2070
+ ...options,
2071
+ headers: {
2072
+ "Content-Type": "application/json",
2073
+ ...options.headers
2074
+ }
2075
+ });
2076
+ var setPartnerCustomField = (options) => (options.client ?? client).post({
2077
+ security: [{ scheme: "bearer", type: "http" }],
2078
+ url: "/partners/{uuid}/custom-fields",
2079
+ ...options,
2080
+ headers: {
2081
+ "Content-Type": "application/json",
2082
+ ...options.headers
2083
+ }
2084
+ });
2085
+ var removePartnerCustomField = (options) => (options.client ?? client).delete({
2086
+ security: [{ scheme: "bearer", type: "http" }],
2087
+ url: "/partners/{uuid}/custom-fields/{subUuid}",
2088
+ ...options
2089
+ });
2090
+ var updatePartnerCustomField = (options) => (options.client ?? client).patch({
2091
+ security: [{ scheme: "bearer", type: "http" }],
2092
+ url: "/partners/{uuid}/custom-fields/{subUuid}",
2093
+ ...options,
2094
+ headers: {
2095
+ "Content-Type": "application/json",
2096
+ ...options.headers
2097
+ }
2098
+ });
2099
+ var addPartnerDomain = (options) => (options.client ?? client).post({
2100
+ security: [{ scheme: "bearer", type: "http" }],
2101
+ url: "/partners/{uuid}/domains",
2102
+ ...options,
2103
+ headers: {
2104
+ "Content-Type": "application/json",
2105
+ ...options.headers
2106
+ }
2107
+ });
2108
+ var removePartnerDomain = (options) => (options.client ?? client).delete({
2109
+ security: [{ scheme: "bearer", type: "http" }],
2110
+ url: "/partners/{uuid}/domains/{subUuid}",
2111
+ ...options
2112
+ });
2113
+ var listPartnerNotes = (options) => (options.client ?? client).get({
2114
+ security: [{ scheme: "bearer", type: "http" }],
2115
+ url: "/partners/{uuid}/notes",
2116
+ ...options
2117
+ });
2118
+ var createPartnerNote = (options) => (options.client ?? client).post({
2119
+ security: [{ scheme: "bearer", type: "http" }],
2120
+ url: "/partners/{uuid}/notes",
2121
+ ...options,
2122
+ headers: {
2123
+ "Content-Type": "application/json",
2124
+ ...options.headers
2125
+ }
2126
+ });
2127
+ var deletePartnerNote = (options) => (options.client ?? client).delete({
2128
+ security: [{ scheme: "bearer", type: "http" }],
2129
+ url: "/partners/{uuid}/notes/{subUuid}",
2130
+ ...options
2131
+ });
2132
+ var listPartnerResellers = (options) => (options.client ?? client).get({
2133
+ security: [{ scheme: "bearer", type: "http" }],
2134
+ url: "/partners/{uuid}/resellers",
2135
+ ...options
2136
+ });
2137
+ var addPartnerReseller = (options) => (options.client ?? client).post({
2138
+ security: [{ scheme: "bearer", type: "http" }],
2139
+ url: "/partners/{uuid}/resellers",
2140
+ ...options,
2141
+ headers: {
2142
+ "Content-Type": "application/json",
2143
+ ...options.headers
2144
+ }
2145
+ });
2146
+ var removePartnerReseller = (options) => (options.client ?? client).delete({
2147
+ security: [{ scheme: "bearer", type: "http" }],
2148
+ url: "/partners/{uuid}/resellers/{subUuid}",
2149
+ ...options
2150
+ });
2151
+ var listPartnerStages = (options) => (options?.client ?? client).get({
2152
+ security: [{ scheme: "bearer", type: "http" }],
2153
+ url: "/partner-stages/",
2154
+ ...options
2155
+ });
2156
+ var createPartnerStage = (options) => (options.client ?? client).post({
2157
+ security: [{ scheme: "bearer", type: "http" }],
2158
+ url: "/partner-stages/",
2159
+ ...options,
2160
+ headers: {
2161
+ "Content-Type": "application/json",
2162
+ ...options.headers
2163
+ }
2164
+ });
2165
+ var deletePartnerStage = (options) => (options.client ?? client).delete({
2166
+ security: [{ scheme: "bearer", type: "http" }],
2167
+ url: "/partner-stages/{uuid}",
2168
+ ...options
2169
+ });
2170
+ var updatePartnerStage = (options) => (options.client ?? client).patch({
2171
+ security: [{ scheme: "bearer", type: "http" }],
2172
+ url: "/partner-stages/{uuid}",
2173
+ ...options,
2174
+ headers: {
2175
+ "Content-Type": "application/json",
2176
+ ...options.headers
2177
+ }
2178
+ });
2179
+ var addPartnerTag = (options) => (options.client ?? client).post({
2180
+ security: [{ scheme: "bearer", type: "http" }],
2181
+ url: "/partners/{uuid}/tags",
2182
+ ...options,
2183
+ headers: {
2184
+ "Content-Type": "application/json",
2185
+ ...options.headers
2186
+ }
2187
+ });
2188
+ var removePartnerTag = (options) => (options.client ?? client).delete({
2189
+ security: [{ scheme: "bearer", type: "http" }],
2190
+ url: "/partners/{uuid}/tags/{subUuid}",
2191
+ ...options
2192
+ });
2193
+ var assignPartnerUser = (options) => (options.client ?? client).post({
2194
+ security: [{ scheme: "bearer", type: "http" }],
2195
+ url: "/partners/{uuid}/assigned-users",
2196
+ ...options,
2197
+ headers: {
2198
+ "Content-Type": "application/json",
2199
+ ...options.headers
2200
+ }
2201
+ });
2202
+ var removePartnerUser = (options) => (options.client ?? client).delete({
2203
+ security: [{ scheme: "bearer", type: "http" }],
2204
+ url: "/partners/{uuid}/assigned-users/{subUuid}",
2205
+ ...options
2206
+ });
2207
+ var listPartners = (options) => (options?.client ?? client).get({
2208
+ security: [{ scheme: "bearer", type: "http" }],
2209
+ url: "/partners/",
2210
+ ...options
2211
+ });
2212
+ var createPartner = (options) => (options.client ?? client).post({
2213
+ security: [{ scheme: "bearer", type: "http" }],
2214
+ url: "/partners/",
2215
+ ...options,
2216
+ headers: {
2217
+ "Content-Type": "application/json",
2218
+ ...options.headers
2219
+ }
2220
+ });
2221
+ var deletePartner = (options) => (options.client ?? client).delete({
2222
+ security: [{ scheme: "bearer", type: "http" }],
2223
+ url: "/partners/{uuid}",
2224
+ ...options
2225
+ });
2226
+ var getPartner = (options) => (options.client ?? client).get({
2227
+ security: [{ scheme: "bearer", type: "http" }],
2228
+ url: "/partners/{uuid}",
2229
+ ...options
2230
+ });
2231
+ var updatePartner = (options) => (options.client ?? client).patch({
2232
+ security: [{ scheme: "bearer", type: "http" }],
2233
+ url: "/partners/{uuid}",
2234
+ ...options,
2235
+ headers: {
2236
+ "Content-Type": "application/json",
2237
+ ...options.headers
2238
+ }
2239
+ });
2240
+ var addPricingCalculatorField = (options) => (options.client ?? client).post({
2241
+ security: [{ scheme: "bearer", type: "http" }],
2242
+ url: "/pricing-calculators/{uuid}/fields",
2243
+ ...options,
2244
+ headers: {
2245
+ "Content-Type": "application/json",
2246
+ ...options.headers
2247
+ }
2248
+ });
2249
+ var removePricingCalculatorField = (options) => (options.client ?? client).delete({
2250
+ security: [{ scheme: "bearer", type: "http" }],
2251
+ url: "/pricing-calculators/{uuid}/fields/{subUuid}",
2252
+ ...options
2253
+ });
2254
+ var updatePricingCalculatorField = (options) => (options.client ?? client).patch({
2255
+ security: [{ scheme: "bearer", type: "http" }],
2256
+ url: "/pricing-calculators/{uuid}/fields/{subUuid}",
2257
+ ...options,
2258
+ headers: {
2259
+ "Content-Type": "application/json",
2260
+ ...options.headers
2261
+ }
2262
+ });
2263
+ var addPricingCalculatorFormula = (options) => (options.client ?? client).post({
2264
+ security: [{ scheme: "bearer", type: "http" }],
2265
+ url: "/pricing-calculators/{uuid}/formulas",
2266
+ ...options,
2267
+ headers: {
2268
+ "Content-Type": "application/json",
2269
+ ...options.headers
2270
+ }
2271
+ });
2272
+ var removePricingCalculatorFormula = (options) => (options.client ?? client).delete({
2273
+ security: [{ scheme: "bearer", type: "http" }],
2274
+ url: "/pricing-calculators/{uuid}/formulas/{subUuid}",
2275
+ ...options
2276
+ });
2277
+ var updatePricingCalculatorFormula = (options) => (options.client ?? client).patch({
2278
+ security: [{ scheme: "bearer", type: "http" }],
2279
+ url: "/pricing-calculators/{uuid}/formulas/{subUuid}",
2280
+ ...options,
2281
+ headers: {
2282
+ "Content-Type": "application/json",
2283
+ ...options.headers
2284
+ }
2285
+ });
2286
+ var addPricingCalculatorProduct = (options) => (options.client ?? client).post({
2287
+ security: [{ scheme: "bearer", type: "http" }],
2288
+ url: "/pricing-calculators/{uuid}/products",
2289
+ ...options,
2290
+ headers: {
2291
+ "Content-Type": "application/json",
2292
+ ...options.headers
2293
+ }
2294
+ });
2295
+ var removePricingCalculatorProduct = (options) => (options.client ?? client).delete({
2296
+ security: [{ scheme: "bearer", type: "http" }],
2297
+ url: "/pricing-calculators/{uuid}/products/{subUuid}",
2298
+ ...options
2299
+ });
2300
+ var updatePricingCalculatorProduct = (options) => (options.client ?? client).patch({
2301
+ security: [{ scheme: "bearer", type: "http" }],
2302
+ url: "/pricing-calculators/{uuid}/products/{subUuid}",
2303
+ ...options,
2304
+ headers: {
2305
+ "Content-Type": "application/json",
2306
+ ...options.headers
2307
+ }
2308
+ });
2309
+ var listPricingCalculators = (options) => (options?.client ?? client).get({
2310
+ security: [{ scheme: "bearer", type: "http" }],
2311
+ url: "/pricing-calculators/",
2312
+ ...options
2313
+ });
2314
+ var createPricingCalculator = (options) => (options.client ?? client).post({
2315
+ security: [{ scheme: "bearer", type: "http" }],
2316
+ url: "/pricing-calculators/",
2317
+ ...options,
2318
+ headers: {
2319
+ "Content-Type": "application/json",
2320
+ ...options.headers
2321
+ }
2322
+ });
2323
+ var deletePricingCalculator = (options) => (options.client ?? client).delete({
2324
+ security: [{ scheme: "bearer", type: "http" }],
2325
+ url: "/pricing-calculators/{uuid}",
2326
+ ...options
2327
+ });
2328
+ var getPricingCalculator = (options) => (options.client ?? client).get({
2329
+ security: [{ scheme: "bearer", type: "http" }],
2330
+ url: "/pricing-calculators/{uuid}",
2331
+ ...options
2332
+ });
2333
+ var updatePricingCalculator = (options) => (options.client ?? client).patch({
2334
+ security: [{ scheme: "bearer", type: "http" }],
2335
+ url: "/pricing-calculators/{uuid}",
2336
+ ...options,
2337
+ headers: {
2338
+ "Content-Type": "application/json",
2339
+ ...options.headers
2340
+ }
2341
+ });
2342
+ var previewPricingCalculator = (options) => (options.client ?? client).post({
2343
+ security: [{ scheme: "bearer", type: "http" }],
2344
+ url: "/pricing-calculators/{uuid}/preview",
2345
+ ...options,
2346
+ headers: {
2347
+ "Content-Type": "application/json",
2348
+ ...options.headers
2349
+ }
2350
+ });
2351
+ var listProducts = (options) => (options?.client ?? client).get({
2352
+ security: [{ scheme: "bearer", type: "http" }],
2353
+ url: "/products/",
2354
+ ...options
2355
+ });
2356
+ var createProduct = (options) => (options.client ?? client).post({
2357
+ security: [{ scheme: "bearer", type: "http" }],
2358
+ url: "/products/",
2359
+ ...options,
2360
+ headers: {
2361
+ "Content-Type": "application/json",
2362
+ ...options.headers
2363
+ }
2364
+ });
2365
+ var deleteProduct = (options) => (options.client ?? client).delete({
2366
+ security: [{ scheme: "bearer", type: "http" }],
2367
+ url: "/products/{uuid}",
2368
+ ...options
2369
+ });
2370
+ var getProduct = (options) => (options.client ?? client).get({
2371
+ security: [{ scheme: "bearer", type: "http" }],
2372
+ url: "/products/{uuid}",
2373
+ ...options
2374
+ });
2375
+ var updateProduct = (options) => (options.client ?? client).patch({
2376
+ security: [{ scheme: "bearer", type: "http" }],
2377
+ url: "/products/{uuid}",
2378
+ ...options,
2379
+ headers: {
2380
+ "Content-Type": "application/json",
2381
+ ...options.headers
2382
+ }
2383
+ });
2384
+ var listResourceBlocks = (options) => (options.client ?? client).get({
2385
+ security: [{ scheme: "bearer", type: "http" }],
2386
+ url: "/resources/{uuid}/blocks",
2387
+ ...options
2388
+ });
2389
+ var addResourceBlock = (options) => (options.client ?? client).post({
2390
+ security: [{ scheme: "bearer", type: "http" }],
2391
+ url: "/resources/{uuid}/blocks",
2392
+ ...options,
2393
+ headers: {
2394
+ "Content-Type": "application/json",
2395
+ ...options.headers
2396
+ }
2397
+ });
2398
+ var removeResourceBlock = (options) => (options.client ?? client).delete({
2399
+ security: [{ scheme: "bearer", type: "http" }],
2400
+ url: "/resources/{uuid}/blocks/{subUuid}",
2401
+ ...options
2402
+ });
2403
+ var updateResourceBlock = (options) => (options.client ?? client).patch({
2404
+ security: [{ scheme: "bearer", type: "http" }],
2405
+ url: "/resources/{uuid}/blocks/{subUuid}",
2406
+ ...options,
2407
+ headers: {
2408
+ "Content-Type": "application/json",
2409
+ ...options.headers
2410
+ }
2411
+ });
2412
+ var addResourceCategory = (options) => (options.client ?? client).post({
2413
+ security: [{ scheme: "bearer", type: "http" }],
2414
+ url: "/resources/{uuid}/categories",
2415
+ ...options,
2416
+ headers: {
2417
+ "Content-Type": "application/json",
2418
+ ...options.headers
2419
+ }
2420
+ });
2421
+ var removeResourceCategory = (options) => (options.client ?? client).delete({
2422
+ security: [{ scheme: "bearer", type: "http" }],
2423
+ url: "/resources/{uuid}/categories/{subUuid}",
2424
+ ...options
2425
+ });
2426
+ var addResourceFolder = (options) => (options.client ?? client).post({
2427
+ security: [{ scheme: "bearer", type: "http" }],
2428
+ url: "/resources/{uuid}/folders",
2429
+ ...options,
2430
+ headers: {
2431
+ "Content-Type": "application/json",
2432
+ ...options.headers
2433
+ }
2434
+ });
2435
+ var removeResourceFolder = (options) => (options.client ?? client).delete({
2436
+ security: [{ scheme: "bearer", type: "http" }],
2437
+ url: "/resources/{uuid}/folders/{subUuid}",
2438
+ ...options
2439
+ });
2440
+ var addResourceTag = (options) => (options.client ?? client).post({
2441
+ security: [{ scheme: "bearer", type: "http" }],
2442
+ url: "/resources/{uuid}/tags",
2443
+ ...options,
2444
+ headers: {
2445
+ "Content-Type": "application/json",
2446
+ ...options.headers
2447
+ }
2448
+ });
2449
+ var removeResourceTag = (options) => (options.client ?? client).delete({
2450
+ security: [{ scheme: "bearer", type: "http" }],
2451
+ url: "/resources/{uuid}/tags/{subUuid}",
2452
+ ...options
2453
+ });
2454
+ var listResources = (options) => (options?.client ?? client).get({
2455
+ security: [{ scheme: "bearer", type: "http" }],
2456
+ url: "/resources/",
2457
+ ...options
2458
+ });
2459
+ var createResource = (options) => (options.client ?? client).post({
2460
+ security: [{ scheme: "bearer", type: "http" }],
2461
+ url: "/resources/",
2462
+ ...options,
2463
+ headers: {
2464
+ "Content-Type": "application/json",
2465
+ ...options.headers
2466
+ }
2467
+ });
2468
+ var deleteResource = (options) => (options.client ?? client).delete({
2469
+ security: [{ scheme: "bearer", type: "http" }],
2470
+ url: "/resources/{uuid}",
2471
+ ...options
2472
+ });
2473
+ var getResource = (options) => (options.client ?? client).get({
2474
+ security: [{ scheme: "bearer", type: "http" }],
2475
+ url: "/resources/{uuid}",
2476
+ ...options
2477
+ });
2478
+ var updateResource = (options) => (options.client ?? client).patch({
2479
+ security: [{ scheme: "bearer", type: "http" }],
2480
+ url: "/resources/{uuid}",
2481
+ ...options,
2482
+ headers: {
2483
+ "Content-Type": "application/json",
2484
+ ...options.headers
2485
+ }
2486
+ });
2487
+ var listRoomBlocks = (options) => (options.client ?? client).get({
2488
+ security: [{ scheme: "bearer", type: "http" }],
2489
+ url: "/rooms/{uuid}/blocks",
2490
+ ...options
2491
+ });
2492
+ var addRoomBlock = (options) => (options.client ?? client).post({
2493
+ security: [{ scheme: "bearer", type: "http" }],
2494
+ url: "/rooms/{uuid}/blocks",
2495
+ ...options,
2496
+ headers: {
2497
+ "Content-Type": "application/json",
2498
+ ...options.headers
2499
+ }
2500
+ });
2501
+ var removeRoomBlock = (options) => (options.client ?? client).delete({
2502
+ security: [{ scheme: "bearer", type: "http" }],
2503
+ url: "/rooms/{uuid}/blocks/{subUuid}",
2504
+ ...options
2505
+ });
2506
+ var updateRoomBlock = (options) => (options.client ?? client).patch({
2507
+ security: [{ scheme: "bearer", type: "http" }],
2508
+ url: "/rooms/{uuid}/blocks/{subUuid}",
2509
+ ...options,
2510
+ headers: {
2511
+ "Content-Type": "application/json",
2512
+ ...options.headers
2513
+ }
2514
+ });
2515
+ var addRoomCategory = (options) => (options.client ?? client).post({
2516
+ security: [{ scheme: "bearer", type: "http" }],
2517
+ url: "/rooms/{uuid}/categories",
2518
+ ...options,
2519
+ headers: {
2520
+ "Content-Type": "application/json",
2521
+ ...options.headers
2522
+ }
2523
+ });
2524
+ var removeRoomCategory = (options) => (options.client ?? client).delete({
2525
+ security: [{ scheme: "bearer", type: "http" }],
2526
+ url: "/rooms/{uuid}/categories/{subUuid}",
2527
+ ...options
2528
+ });
2529
+ var addRoomPartnership = (options) => (options.client ?? client).post({
2530
+ security: [{ scheme: "bearer", type: "http" }],
2531
+ url: "/rooms/{uuid}/partnerships",
2532
+ ...options,
2533
+ headers: {
2534
+ "Content-Type": "application/json",
2535
+ ...options.headers
2536
+ }
2537
+ });
2538
+ var removeRoomPartnership = (options) => (options.client ?? client).delete({
2539
+ security: [{ scheme: "bearer", type: "http" }],
2540
+ url: "/rooms/{uuid}/partnerships/{subUuid}",
2541
+ ...options
2542
+ });
2543
+ var addRoomStage = (options) => (options.client ?? client).post({
2544
+ security: [{ scheme: "bearer", type: "http" }],
2545
+ url: "/rooms/{uuid}/stages",
2546
+ ...options,
2547
+ headers: {
2548
+ "Content-Type": "application/json",
2549
+ ...options.headers
2550
+ }
2551
+ });
2552
+ var removeRoomStage = (options) => (options.client ?? client).delete({
2553
+ security: [{ scheme: "bearer", type: "http" }],
2554
+ url: "/rooms/{uuid}/stages/{subUuid}",
2555
+ ...options
2556
+ });
2557
+ var addRoomTag = (options) => (options.client ?? client).post({
2558
+ security: [{ scheme: "bearer", type: "http" }],
2559
+ url: "/rooms/{uuid}/tags",
2560
+ ...options,
2561
+ headers: {
2562
+ "Content-Type": "application/json",
2563
+ ...options.headers
2564
+ }
2565
+ });
2566
+ var removeRoomTag = (options) => (options.client ?? client).delete({
2567
+ security: [{ scheme: "bearer", type: "http" }],
2568
+ url: "/rooms/{uuid}/tags/{subUuid}",
2569
+ ...options
2570
+ });
2571
+ var addRoomTier = (options) => (options.client ?? client).post({
2572
+ security: [{ scheme: "bearer", type: "http" }],
2573
+ url: "/rooms/{uuid}/tiers",
2574
+ ...options,
2575
+ headers: {
2576
+ "Content-Type": "application/json",
2577
+ ...options.headers
2578
+ }
2579
+ });
2580
+ var removeRoomTier = (options) => (options.client ?? client).delete({
2581
+ security: [{ scheme: "bearer", type: "http" }],
2582
+ url: "/rooms/{uuid}/tiers/{subUuid}",
2583
+ ...options
2584
+ });
2585
+ var listRooms = (options) => (options?.client ?? client).get({
2586
+ security: [{ scheme: "bearer", type: "http" }],
2587
+ url: "/rooms/",
2588
+ ...options
2589
+ });
2590
+ var createRoom = (options) => (options.client ?? client).post({
2591
+ security: [{ scheme: "bearer", type: "http" }],
2592
+ url: "/rooms/",
2593
+ ...options,
2594
+ headers: {
2595
+ "Content-Type": "application/json",
2596
+ ...options.headers
2597
+ }
2598
+ });
2599
+ var deleteRoom = (options) => (options.client ?? client).delete({
2600
+ security: [{ scheme: "bearer", type: "http" }],
2601
+ url: "/rooms/{uuid}",
2602
+ ...options
2603
+ });
2604
+ var getRoom = (options) => (options.client ?? client).get({
2605
+ security: [{ scheme: "bearer", type: "http" }],
2606
+ url: "/rooms/{uuid}",
2607
+ ...options
2608
+ });
2609
+ var updateRoom = (options) => (options.client ?? client).patch({
2610
+ security: [{ scheme: "bearer", type: "http" }],
2611
+ url: "/rooms/{uuid}",
2612
+ ...options,
2613
+ headers: {
2614
+ "Content-Type": "application/json",
2615
+ ...options.headers
2616
+ }
2617
+ });
2618
+ var listTags = (options) => (options?.client ?? client).get({
2619
+ security: [{ scheme: "bearer", type: "http" }],
2620
+ url: "/tags/",
2621
+ ...options
2622
+ });
2623
+ var createTag = (options) => (options.client ?? client).post({
2624
+ security: [{ scheme: "bearer", type: "http" }],
2625
+ url: "/tags/",
2626
+ ...options,
2627
+ headers: {
2628
+ "Content-Type": "application/json",
2629
+ ...options.headers
2630
+ }
2631
+ });
2632
+ var deleteTag = (options) => (options.client ?? client).delete({
2633
+ security: [{ scheme: "bearer", type: "http" }],
2634
+ url: "/tags/{uuid}",
2635
+ ...options
2636
+ });
2637
+ var updateTag = (options) => (options.client ?? client).patch({
2638
+ security: [{ scheme: "bearer", type: "http" }],
2639
+ url: "/tags/{uuid}",
2640
+ ...options,
2641
+ headers: {
2642
+ "Content-Type": "application/json",
2643
+ ...options.headers
2644
+ }
2645
+ });
2646
+ var assignTaskUser = (options) => (options.client ?? client).post({
2647
+ security: [{ scheme: "bearer", type: "http" }],
2648
+ url: "/tasks/{uuid}/assigned-users",
2649
+ ...options,
2650
+ headers: {
2651
+ "Content-Type": "application/json",
2652
+ ...options.headers
2653
+ }
2654
+ });
2655
+ var removeTaskUser = (options) => (options.client ?? client).delete({
2656
+ security: [{ scheme: "bearer", type: "http" }],
2657
+ url: "/tasks/{uuid}/assigned-users/{subUuid}",
2658
+ ...options
2659
+ });
2660
+ var listTasks = (options) => (options?.client ?? client).get({
2661
+ security: [{ scheme: "bearer", type: "http" }],
2662
+ url: "/tasks/",
2663
+ ...options
2664
+ });
2665
+ var createTask = (options) => (options.client ?? client).post({
2666
+ security: [{ scheme: "bearer", type: "http" }],
2667
+ url: "/tasks/",
2668
+ ...options,
2669
+ headers: {
2670
+ "Content-Type": "application/json",
2671
+ ...options.headers
2672
+ }
2673
+ });
2674
+ var deleteTask = (options) => (options.client ?? client).delete({
2675
+ security: [{ scheme: "bearer", type: "http" }],
2676
+ url: "/tasks/{uuid}",
2677
+ ...options
2678
+ });
2679
+ var getTask = (options) => (options.client ?? client).get({
2680
+ security: [{ scheme: "bearer", type: "http" }],
2681
+ url: "/tasks/{uuid}",
2682
+ ...options
2683
+ });
2684
+ var updateTask = (options) => (options.client ?? client).patch({
2685
+ security: [{ scheme: "bearer", type: "http" }],
2686
+ url: "/tasks/{uuid}",
2687
+ ...options,
2688
+ headers: {
2689
+ "Content-Type": "application/json",
2690
+ ...options.headers
2691
+ }
2692
+ });
2693
+ var listTiers = (options) => (options?.client ?? client).get({
2694
+ security: [{ scheme: "bearer", type: "http" }],
2695
+ url: "/tiers/",
2696
+ ...options
2697
+ });
2698
+ var createTier = (options) => (options.client ?? client).post({
2699
+ security: [{ scheme: "bearer", type: "http" }],
2700
+ url: "/tiers/",
2701
+ ...options,
2702
+ headers: {
2703
+ "Content-Type": "application/json",
2704
+ ...options.headers
2705
+ }
2706
+ });
2707
+ var deleteTier = (options) => (options.client ?? client).delete({
2708
+ security: [{ scheme: "bearer", type: "http" }],
2709
+ url: "/tiers/{uuid}",
2710
+ ...options
2711
+ });
2712
+ var updateTier = (options) => (options.client ?? client).patch({
2713
+ security: [{ scheme: "bearer", type: "http" }],
2714
+ url: "/tiers/{uuid}",
2715
+ ...options,
2716
+ headers: {
2717
+ "Content-Type": "application/json",
2718
+ ...options.headers
2719
+ }
2720
+ });
2721
+ var listUsers = (options) => (options?.client ?? client).get({
2722
+ security: [{ scheme: "bearer", type: "http" }],
2723
+ url: "/users/",
2724
+ ...options
2725
+ });
2726
+
2727
+ // src/index.ts
2728
+ addIdempotencyInterceptor(client);
2729
+ export {
2730
+ addCampaignCategory,
2731
+ addCampaignContact,
2732
+ addCampaignContactTag,
2733
+ addCampaignRecipientPartnership,
2734
+ addCampaignStage,
2735
+ addCampaignTier,
2736
+ addCardAssignee,
2737
+ addCardPartner,
2738
+ addCardTag,
2739
+ addCertificationCategory,
2740
+ addCertificationFolder,
2741
+ addCertificationResource,
2742
+ addCustomFieldOption,
2743
+ addDealProduct,
2744
+ addDealTag,
2745
+ addIdempotencyInterceptor,
2746
+ addLeadAttribution,
2747
+ addLeadContact,
2748
+ addLeadProduct,
2749
+ addLeadTag,
2750
+ addPartnerDomain,
2751
+ addPartnerReseller,
2752
+ addPartnerTag,
2753
+ addPricingCalculatorField,
2754
+ addPricingCalculatorFormula,
2755
+ addPricingCalculatorProduct,
2756
+ addResourceBlock,
2757
+ addResourceCategory,
2758
+ addResourceFolder,
2759
+ addResourceTag,
2760
+ addRoomBlock,
2761
+ addRoomCategory,
2762
+ addRoomPartnership,
2763
+ addRoomStage,
2764
+ addRoomTag,
2765
+ addRoomTier,
2766
+ archiveCard,
2767
+ assignLeadUser,
2768
+ assignPartnerUser,
2769
+ assignTaskUser,
2770
+ clearDealCommission,
2771
+ client,
2772
+ createAttribution,
2773
+ createAutomation,
2774
+ createCampaign,
2775
+ createCategory,
2776
+ createCertification,
2777
+ createClient,
2778
+ createCommission,
2779
+ createConfig,
2780
+ createCustomField,
2781
+ createCustomFieldRule,
2782
+ createCustomFieldValue,
2783
+ createDeal,
2784
+ createDealNote,
2785
+ createDealStage,
2786
+ createDealTask,
2787
+ createFolder,
2788
+ createIdempotentClient,
2789
+ createLead,
2790
+ createLeadNote,
2791
+ createLeadTask,
2792
+ createLogicalOperationId,
2793
+ createMarketingTemplate,
2794
+ createPartner,
2795
+ createPartnerContact,
2796
+ createPartnerNote,
2797
+ createPartnerStage,
2798
+ createPricingCalculator,
2799
+ createProduct,
2800
+ createResource,
2801
+ createRoom,
2802
+ createTag,
2803
+ createTask,
2804
+ createTier,
2805
+ deleteAsset,
2806
+ deleteAttribution,
2807
+ deleteAutomation,
2808
+ deleteCampaign,
2809
+ deleteCategory,
2810
+ deleteCertification,
2811
+ deleteCommission,
2812
+ deleteCustomField,
2813
+ deleteCustomFieldOption,
2814
+ deleteCustomFieldRule,
2815
+ deleteCustomFieldValue,
2816
+ deleteDeal,
2817
+ deleteDealNote,
2818
+ deleteDealStage,
2819
+ deleteFolder,
2820
+ deleteLead,
2821
+ deleteLeadNote,
2822
+ deleteLeadQuote,
2823
+ deleteMarketingTemplate,
2824
+ deletePartner,
2825
+ deletePartnerContact,
2826
+ deletePartnerNote,
2827
+ deletePartnerStage,
2828
+ deletePricingCalculator,
2829
+ deleteProduct,
2830
+ deleteResource,
2831
+ deleteRoom,
2832
+ deleteTag,
2833
+ deleteTask,
2834
+ deleteTier,
2835
+ enrollInCertification,
2836
+ getAsset,
2837
+ getAttribution,
2838
+ getAutomation,
2839
+ getCampaign,
2840
+ getCampaignLeadStats,
2841
+ getCampaignRecipients,
2842
+ getCampaignStatistics,
2843
+ getCard,
2844
+ getCertification,
2845
+ getCommission,
2846
+ getCommissionPartnerMetrics,
2847
+ getCommissionSummary,
2848
+ getCommissionTimeSeries,
2849
+ getContact,
2850
+ getDeal,
2851
+ getDealCommission,
2852
+ getDealsWonLost,
2853
+ getEngagementActionBreakdown,
2854
+ getEngagementPartnerMetrics,
2855
+ getEngagementSummary,
2856
+ getEngagementTimeSeries,
2857
+ getEngagementTopCertifications,
2858
+ getEngagementTopResources,
2859
+ getEngagementTopRooms,
2860
+ getFolder,
2861
+ getLead,
2862
+ getLeadDistributor,
2863
+ getLeadQuote,
2864
+ getLeadsSentReceived,
2865
+ getLmsAtRiskLearners,
2866
+ getLmsCertResourceCompletions,
2867
+ getLmsCertResourcePassRates,
2868
+ getLmsEnrollmentList,
2869
+ getLmsPartnerLeaderboard,
2870
+ getLmsSummary,
2871
+ getLmsTimeSeries,
2872
+ getLmsTopCertificationsByCompletion,
2873
+ getLmsTopCertificationsByDifficulty,
2874
+ getLmsUserLeaderboard,
2875
+ getMarketingTemplate,
2876
+ getMe,
2877
+ getPartner,
2878
+ getPartnerDealsTimeline,
2879
+ getPartnerLeadsTimeline,
2880
+ getPartnerRevenueAnalytics,
2881
+ getPartnerRevenueTimeSeries,
2882
+ getPipelineSummary,
2883
+ getPricingCalculator,
2884
+ getProduct,
2885
+ getResource,
2886
+ getRevenueSummary,
2887
+ getRoom,
2888
+ getSalesforcePartnerCreateStageGates,
2889
+ getTask,
2890
+ idempotencyHeaders,
2891
+ listAssets,
2892
+ listAttributions,
2893
+ listAuditLog,
2894
+ listAutomations,
2895
+ listCampaignLeads,
2896
+ listCampaigns,
2897
+ listCategories,
2898
+ listCertificationEnrollments,
2899
+ listCertificationResources,
2900
+ listCertifications,
2901
+ listCommissions,
2902
+ listContacts,
2903
+ listCurrencies,
2904
+ listCustomFieldRules,
2905
+ listCustomFieldValues,
2906
+ listCustomFields,
2907
+ listDealNotes,
2908
+ listDealPayments,
2909
+ listDealProducts,
2910
+ listDealStages,
2911
+ listDealTasks,
2912
+ listDeals,
2913
+ listFolders,
2914
+ listLeadAttributions,
2915
+ listLeadContacts,
2916
+ listLeadNotes,
2917
+ listLeadProducts,
2918
+ listLeadTasks,
2919
+ listLeads,
2920
+ listMarketingTemplates,
2921
+ listPartnerContacts,
2922
+ listPartnerNotes,
2923
+ listPartnerResellers,
2924
+ listPartnerStages,
2925
+ listPartners,
2926
+ listPricingCalculators,
2927
+ listProducts,
2928
+ listResourceBlocks,
2929
+ listResources,
2930
+ listRoomBlocks,
2931
+ listRooms,
2932
+ listTags,
2933
+ listTasks,
2934
+ listTiers,
2935
+ listUsers,
2936
+ previewPricingCalculator,
2937
+ removeCampaignCategory,
2938
+ removeCampaignContact,
2939
+ removeCampaignContactTag,
2940
+ removeCampaignRecipientPartnership,
2941
+ removeCampaignStage,
2942
+ removeCampaignTier,
2943
+ removeCardAssignee,
2944
+ removeCardPartner,
2945
+ removeCardTag,
2946
+ removeCertificationCategory,
2947
+ removeCertificationFolder,
2948
+ removeCertificationResource,
2949
+ removeDealCustomField,
2950
+ removeDealProduct,
2951
+ removeDealTag,
2952
+ removeLeadAttribution,
2953
+ removeLeadContact,
2954
+ removeLeadCustomField,
2955
+ removeLeadDistributor,
2956
+ removeLeadProduct,
2957
+ removeLeadTag,
2958
+ removeLeadUser,
2959
+ removePartnerCustomField,
2960
+ removePartnerDomain,
2961
+ removePartnerReseller,
2962
+ removePartnerTag,
2963
+ removePartnerUser,
2964
+ removePricingCalculatorField,
2965
+ removePricingCalculatorFormula,
2966
+ removePricingCalculatorProduct,
2967
+ removeResourceBlock,
2968
+ removeResourceCategory,
2969
+ removeResourceFolder,
2970
+ removeResourceTag,
2971
+ removeRoomBlock,
2972
+ removeRoomCategory,
2973
+ removeRoomPartnership,
2974
+ removeRoomStage,
2975
+ removeRoomTag,
2976
+ removeRoomTier,
2977
+ removeTaskUser,
2978
+ setDealCommission,
2979
+ setDealCustomField,
2980
+ setLeadCustomField,
2981
+ setLeadDistributor,
2982
+ setPartnerCustomField,
2983
+ shareCampaignPartner,
2984
+ testSendCampaignEmail,
2985
+ toggleAutomation,
2986
+ unshareCampaignPartner,
2987
+ updateAsset,
2988
+ updateAttribution,
2989
+ updateAutomationWorkflow,
2990
+ updateCampaign,
2991
+ updateCard,
2992
+ updateCategory,
2993
+ updateCertification,
2994
+ updateCertificationResource,
2995
+ updateCommission,
2996
+ updateCustomField,
2997
+ updateCustomFieldOption,
2998
+ updateCustomFieldRule,
2999
+ updateCustomFieldValue,
3000
+ updateDeal,
3001
+ updateDealProduct,
3002
+ updateDealStage,
3003
+ updateFolder,
3004
+ updateLead,
3005
+ updateLeadCustomField,
3006
+ updateLeadProduct,
3007
+ updateMarketingTemplate,
3008
+ updatePartner,
3009
+ updatePartnerContact,
3010
+ updatePartnerCustomField,
3011
+ updatePartnerStage,
3012
+ updatePricingCalculator,
3013
+ updatePricingCalculatorField,
3014
+ updatePricingCalculatorFormula,
3015
+ updatePricingCalculatorProduct,
3016
+ updateProduct,
3017
+ updateResource,
3018
+ updateResourceBlock,
3019
+ updateRoom,
3020
+ updateRoomBlock,
3021
+ updateSalesforcePartnerCreateStageGates,
3022
+ updateTag,
3023
+ updateTask,
3024
+ updateTier,
3025
+ uploadAsset
3026
+ };
6
3027
  //# sourceMappingURL=index.js.map