@linebundle-sdk/ts 1.0.0-rc.2 → 1.0.0-rc.21

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.
Files changed (71) hide show
  1. package/README.md +79 -27
  2. package/esm/index.d.ts +13952 -3
  3. package/esm/index.js +2903 -2
  4. package/esm/index.js.map +1 -1
  5. package/package.json +27 -18
  6. package/tsup.config.ts +11 -0
  7. package/esm/client/client.gen.d.ts +0 -3
  8. package/esm/client/client.gen.d.ts.map +0 -1
  9. package/esm/client/client.gen.js +0 -236
  10. package/esm/client/client.gen.js.map +0 -1
  11. package/esm/client/index.d.ts +0 -9
  12. package/esm/client/index.d.ts.map +0 -1
  13. package/esm/client/index.js +0 -7
  14. package/esm/client/index.js.map +0 -1
  15. package/esm/client/types.gen.d.ts +0 -118
  16. package/esm/client/types.gen.d.ts.map +0 -1
  17. package/esm/client/types.gen.js +0 -3
  18. package/esm/client/types.gen.js.map +0 -1
  19. package/esm/client/utils.gen.d.ts +0 -34
  20. package/esm/client/utils.gen.d.ts.map +0 -1
  21. package/esm/client/utils.gen.js +0 -231
  22. package/esm/client/utils.gen.js.map +0 -1
  23. package/esm/client.gen.d.ts +0 -13
  24. package/esm/client.gen.d.ts.map +0 -1
  25. package/esm/client.gen.js +0 -4
  26. package/esm/client.gen.js.map +0 -1
  27. package/esm/core/auth.gen.d.ts +0 -19
  28. package/esm/core/auth.gen.d.ts.map +0 -1
  29. package/esm/core/auth.gen.js +0 -15
  30. package/esm/core/auth.gen.js.map +0 -1
  31. package/esm/core/bodySerializer.gen.d.ts +0 -26
  32. package/esm/core/bodySerializer.gen.d.ts.map +0 -1
  33. package/esm/core/bodySerializer.gen.js +0 -58
  34. package/esm/core/bodySerializer.gen.js.map +0 -1
  35. package/esm/core/params.gen.d.ts +0 -44
  36. package/esm/core/params.gen.d.ts.map +0 -1
  37. package/esm/core/params.gen.js +0 -101
  38. package/esm/core/params.gen.js.map +0 -1
  39. package/esm/core/pathSerializer.gen.d.ts +0 -34
  40. package/esm/core/pathSerializer.gen.d.ts.map +0 -1
  41. package/esm/core/pathSerializer.gen.js +0 -107
  42. package/esm/core/pathSerializer.gen.js.map +0 -1
  43. package/esm/core/queryKeySerializer.gen.d.ts +0 -19
  44. package/esm/core/queryKeySerializer.gen.d.ts.map +0 -1
  45. package/esm/core/queryKeySerializer.gen.js +0 -93
  46. package/esm/core/queryKeySerializer.gen.js.map +0 -1
  47. package/esm/core/serverSentEvents.gen.d.ts +0 -72
  48. package/esm/core/serverSentEvents.gen.d.ts.map +0 -1
  49. package/esm/core/serverSentEvents.gen.js +0 -134
  50. package/esm/core/serverSentEvents.gen.js.map +0 -1
  51. package/esm/core/types.gen.d.ts +0 -79
  52. package/esm/core/types.gen.d.ts.map +0 -1
  53. package/esm/core/types.gen.js +0 -3
  54. package/esm/core/types.gen.js.map +0 -1
  55. package/esm/core/utils.gen.d.ts +0 -20
  56. package/esm/core/utils.gen.d.ts.map +0 -1
  57. package/esm/core/utils.gen.js +0 -88
  58. package/esm/core/utils.gen.js.map +0 -1
  59. package/esm/index.d.ts.map +0 -1
  60. package/esm/sdk.gen.d.ts +0 -1854
  61. package/esm/sdk.gen.d.ts.map +0 -1
  62. package/esm/sdk.gen.js +0 -3875
  63. package/esm/sdk.gen.js.map +0 -1
  64. package/esm/types.gen.d.ts +0 -12463
  65. package/esm/types.gen.d.ts.map +0 -1
  66. package/esm/types.gen.js +0 -3
  67. package/esm/types.gen.js.map +0 -1
  68. package/esm/zod.gen.d.ts +0 -8634
  69. package/esm/zod.gen.d.ts.map +0 -1
  70. package/esm/zod.gen.js +0 -4430
  71. package/esm/zod.gen.js.map +0 -1
package/esm/index.js CHANGED
@@ -1,3 +1,2904 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- export { AI, AiAgent, AiAgent2, AiAgents, AiWorkflows, Analytic, AuditLogs, AuthContexts, AutomationCron, AutomationMetadata, AutomationRules, Booking, Bookings, ChatMessages, ChatRooms, Contacts, CustomRoles, Event_, EventAttendees, EventDocuments, EventLocation, Events, EventTimeline, EventTimezones, Features, Health, HealthNotifications, Integration, IntegrationUser, Linebundle, Metrics, Organizations, Permissions, Place, Places, Realtime, Roles, Sentry, Space, SpaceContacts, SpaceDocuments, SpaceEvents, SpaceRoles, Spaces, User, Users } from './sdk.gen';
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+
5
+ // src/hey-api.ts
6
+ var createClientConfig = (config) => ({
7
+ ...config,
8
+ baseUrl: config.baseUrl ?? "https://api.linebundle.com"
9
+ });
10
+
11
+ // src/generated/core/bodySerializer.gen.ts
12
+ var jsonBodySerializer = {
13
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
14
+ };
15
+
16
+ // src/generated/core/serverSentEvents.gen.ts
17
+ var createSseClient = ({
18
+ onRequest,
19
+ onSseError,
20
+ onSseEvent,
21
+ responseTransformer,
22
+ responseValidator,
23
+ sseDefaultRetryDelay,
24
+ sseMaxRetryAttempts,
25
+ sseMaxRetryDelay,
26
+ sseSleepFn,
27
+ url,
28
+ ...options
29
+ }) => {
30
+ let lastEventId;
31
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
32
+ const createStream = async function* () {
33
+ let retryDelay = sseDefaultRetryDelay ?? 3e3;
34
+ let attempt = 0;
35
+ const signal = options.signal ?? new AbortController().signal;
36
+ while (true) {
37
+ if (signal.aborted) break;
38
+ attempt++;
39
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
40
+ if (lastEventId !== void 0) {
41
+ headers.set("Last-Event-ID", lastEventId);
42
+ }
43
+ try {
44
+ const requestInit = {
45
+ redirect: "follow",
46
+ ...options,
47
+ body: options.serializedBody,
48
+ headers,
49
+ signal
50
+ };
51
+ let request = new Request(url, requestInit);
52
+ if (onRequest) {
53
+ request = await onRequest(url, requestInit);
54
+ }
55
+ const _fetch = options.fetch ?? globalThis.fetch;
56
+ const response = await _fetch(request);
57
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
58
+ if (!response.body) throw new Error("No body in SSE response");
59
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
60
+ let buffer = "";
61
+ const abortHandler = () => {
62
+ try {
63
+ reader.cancel();
64
+ } catch {
65
+ }
66
+ };
67
+ signal.addEventListener("abort", abortHandler);
68
+ try {
69
+ while (true) {
70
+ const { done, value } = await reader.read();
71
+ if (done) break;
72
+ buffer += value;
73
+ buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
74
+ const chunks = buffer.split("\n\n");
75
+ buffer = chunks.pop() ?? "";
76
+ for (const chunk of chunks) {
77
+ const lines = chunk.split("\n");
78
+ const dataLines = [];
79
+ let eventName;
80
+ for (const line of lines) {
81
+ if (line.startsWith("data:")) {
82
+ dataLines.push(line.replace(/^data:\s*/, ""));
83
+ } else if (line.startsWith("event:")) {
84
+ eventName = line.replace(/^event:\s*/, "");
85
+ } else if (line.startsWith("id:")) {
86
+ lastEventId = line.replace(/^id:\s*/, "");
87
+ } else if (line.startsWith("retry:")) {
88
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
89
+ if (!Number.isNaN(parsed)) {
90
+ retryDelay = parsed;
91
+ }
92
+ }
93
+ }
94
+ let data;
95
+ let parsedJson = false;
96
+ if (dataLines.length) {
97
+ const rawData = dataLines.join("\n");
98
+ try {
99
+ data = JSON.parse(rawData);
100
+ parsedJson = true;
101
+ } catch {
102
+ data = rawData;
103
+ }
104
+ }
105
+ if (parsedJson) {
106
+ if (responseValidator) {
107
+ await responseValidator(data);
108
+ }
109
+ if (responseTransformer) {
110
+ data = await responseTransformer(data);
111
+ }
112
+ }
113
+ onSseEvent?.({
114
+ data,
115
+ event: eventName,
116
+ id: lastEventId,
117
+ retry: retryDelay
118
+ });
119
+ if (dataLines.length) {
120
+ yield data;
121
+ }
122
+ }
123
+ }
124
+ } finally {
125
+ signal.removeEventListener("abort", abortHandler);
126
+ reader.releaseLock();
127
+ }
128
+ break;
129
+ } catch (error) {
130
+ onSseError?.(error);
131
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
132
+ break;
133
+ }
134
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
135
+ await sleep(backoff);
136
+ }
137
+ }
138
+ };
139
+ const stream = createStream();
140
+ return { stream };
141
+ };
142
+
143
+ // src/generated/core/pathSerializer.gen.ts
144
+ var separatorArrayExplode = (style) => {
145
+ switch (style) {
146
+ case "label":
147
+ return ".";
148
+ case "matrix":
149
+ return ";";
150
+ case "simple":
151
+ return ",";
152
+ default:
153
+ return "&";
154
+ }
155
+ };
156
+ var separatorArrayNoExplode = (style) => {
157
+ switch (style) {
158
+ case "form":
159
+ return ",";
160
+ case "pipeDelimited":
161
+ return "|";
162
+ case "spaceDelimited":
163
+ return "%20";
164
+ default:
165
+ return ",";
166
+ }
167
+ };
168
+ var separatorObjectExplode = (style) => {
169
+ switch (style) {
170
+ case "label":
171
+ return ".";
172
+ case "matrix":
173
+ return ";";
174
+ case "simple":
175
+ return ",";
176
+ default:
177
+ return "&";
178
+ }
179
+ };
180
+ var serializeArrayParam = ({
181
+ allowReserved,
182
+ explode,
183
+ name,
184
+ style,
185
+ value
186
+ }) => {
187
+ if (!explode) {
188
+ const joinedValues2 = (allowReserved ? value : value.map((v2) => encodeURIComponent(v2))).join(separatorArrayNoExplode(style));
189
+ switch (style) {
190
+ case "label":
191
+ return `.${joinedValues2}`;
192
+ case "matrix":
193
+ return `;${name}=${joinedValues2}`;
194
+ case "simple":
195
+ return joinedValues2;
196
+ default:
197
+ return `${name}=${joinedValues2}`;
198
+ }
199
+ }
200
+ const separator = separatorArrayExplode(style);
201
+ const joinedValues = value.map((v2) => {
202
+ if (style === "label" || style === "simple") {
203
+ return allowReserved ? v2 : encodeURIComponent(v2);
204
+ }
205
+ return serializePrimitiveParam({
206
+ allowReserved,
207
+ name,
208
+ value: v2
209
+ });
210
+ }).join(separator);
211
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
212
+ };
213
+ var serializePrimitiveParam = ({
214
+ allowReserved,
215
+ name,
216
+ value
217
+ }) => {
218
+ if (value === void 0 || value === null) {
219
+ return "";
220
+ }
221
+ if (typeof value === "object") {
222
+ throw new Error(
223
+ "Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
224
+ );
225
+ }
226
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
227
+ };
228
+ var serializeObjectParam = ({
229
+ allowReserved,
230
+ explode,
231
+ name,
232
+ style,
233
+ value,
234
+ valueOnly
235
+ }) => {
236
+ if (value instanceof Date) {
237
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
238
+ }
239
+ if (style !== "deepObject" && !explode) {
240
+ let values = [];
241
+ Object.entries(value).forEach(([key, v2]) => {
242
+ values = [...values, key, allowReserved ? v2 : encodeURIComponent(v2)];
243
+ });
244
+ const joinedValues2 = values.join(",");
245
+ switch (style) {
246
+ case "form":
247
+ return `${name}=${joinedValues2}`;
248
+ case "label":
249
+ return `.${joinedValues2}`;
250
+ case "matrix":
251
+ return `;${name}=${joinedValues2}`;
252
+ default:
253
+ return joinedValues2;
254
+ }
255
+ }
256
+ const separator = separatorObjectExplode(style);
257
+ const joinedValues = Object.entries(value).map(
258
+ ([key, v2]) => serializePrimitiveParam({
259
+ allowReserved,
260
+ name: style === "deepObject" ? `${name}[${key}]` : key,
261
+ value: v2
262
+ })
263
+ ).join(separator);
264
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
265
+ };
266
+
267
+ // src/generated/core/utils.gen.ts
268
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
269
+ var defaultPathSerializer = ({ path, url: _url }) => {
270
+ let url = _url;
271
+ const matches = _url.match(PATH_PARAM_RE);
272
+ if (matches) {
273
+ for (const match of matches) {
274
+ let explode = false;
275
+ let name = match.substring(1, match.length - 1);
276
+ let style = "simple";
277
+ if (name.endsWith("*")) {
278
+ explode = true;
279
+ name = name.substring(0, name.length - 1);
280
+ }
281
+ if (name.startsWith(".")) {
282
+ name = name.substring(1);
283
+ style = "label";
284
+ } else if (name.startsWith(";")) {
285
+ name = name.substring(1);
286
+ style = "matrix";
287
+ }
288
+ const value = path[name];
289
+ if (value === void 0 || value === null) {
290
+ continue;
291
+ }
292
+ if (Array.isArray(value)) {
293
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
294
+ continue;
295
+ }
296
+ if (typeof value === "object") {
297
+ url = url.replace(
298
+ match,
299
+ serializeObjectParam({
300
+ explode,
301
+ name,
302
+ style,
303
+ value,
304
+ valueOnly: true
305
+ })
306
+ );
307
+ continue;
308
+ }
309
+ if (style === "matrix") {
310
+ url = url.replace(
311
+ match,
312
+ `;${serializePrimitiveParam({
313
+ name,
314
+ value
315
+ })}`
316
+ );
317
+ continue;
318
+ }
319
+ const replaceValue = encodeURIComponent(
320
+ style === "label" ? `.${value}` : value
321
+ );
322
+ url = url.replace(match, replaceValue);
323
+ }
324
+ }
325
+ return url;
326
+ };
327
+ var getUrl = ({
328
+ baseUrl,
329
+ path,
330
+ query,
331
+ querySerializer,
332
+ url: _url
333
+ }) => {
334
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
335
+ let url = (baseUrl ?? "") + pathUrl;
336
+ if (path) {
337
+ url = defaultPathSerializer({ path, url });
338
+ }
339
+ let search = query ? querySerializer(query) : "";
340
+ if (search.startsWith("?")) {
341
+ search = search.substring(1);
342
+ }
343
+ if (search) {
344
+ url += `?${search}`;
345
+ }
346
+ return url;
347
+ };
348
+ function getValidRequestBody(options) {
349
+ const hasBody = options.body !== void 0;
350
+ const isSerializedBody = hasBody && options.bodySerializer;
351
+ if (isSerializedBody) {
352
+ if ("serializedBody" in options) {
353
+ const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
354
+ return hasSerializedBody ? options.serializedBody : null;
355
+ }
356
+ return options.body !== "" ? options.body : null;
357
+ }
358
+ if (hasBody) {
359
+ return options.body;
360
+ }
361
+ return void 0;
362
+ }
363
+
364
+ // src/generated/core/auth.gen.ts
365
+ var getAuthToken = async (auth, callback) => {
366
+ const token = typeof callback === "function" ? await callback(auth) : callback;
367
+ if (!token) {
368
+ return;
369
+ }
370
+ if (auth.scheme === "bearer") {
371
+ return `Bearer ${token}`;
372
+ }
373
+ if (auth.scheme === "basic") {
374
+ return `Basic ${btoa(token)}`;
375
+ }
376
+ return token;
377
+ };
378
+
379
+ // src/generated/client/utils.gen.ts
380
+ var createQuerySerializer = ({
381
+ parameters = {},
382
+ ...args
383
+ } = {}) => {
384
+ const querySerializer = (queryParams) => {
385
+ const search = [];
386
+ if (queryParams && typeof queryParams === "object") {
387
+ for (const name in queryParams) {
388
+ const value = queryParams[name];
389
+ if (value === void 0 || value === null) {
390
+ continue;
391
+ }
392
+ const options = parameters[name] || args;
393
+ if (Array.isArray(value)) {
394
+ const serializedArray = serializeArrayParam({
395
+ allowReserved: options.allowReserved,
396
+ explode: true,
397
+ name,
398
+ style: "form",
399
+ value,
400
+ ...options.array
401
+ });
402
+ if (serializedArray) search.push(serializedArray);
403
+ } else if (typeof value === "object") {
404
+ const serializedObject = serializeObjectParam({
405
+ allowReserved: options.allowReserved,
406
+ explode: true,
407
+ name,
408
+ style: "deepObject",
409
+ value,
410
+ ...options.object
411
+ });
412
+ if (serializedObject) search.push(serializedObject);
413
+ } else {
414
+ const serializedPrimitive = serializePrimitiveParam({
415
+ allowReserved: options.allowReserved,
416
+ name,
417
+ value
418
+ });
419
+ if (serializedPrimitive) search.push(serializedPrimitive);
420
+ }
421
+ }
422
+ }
423
+ return search.join("&");
424
+ };
425
+ return querySerializer;
426
+ };
427
+ var getParseAs = (contentType) => {
428
+ if (!contentType) {
429
+ return "stream";
430
+ }
431
+ const cleanContent = contentType.split(";")[0]?.trim();
432
+ if (!cleanContent) {
433
+ return;
434
+ }
435
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
436
+ return "json";
437
+ }
438
+ if (cleanContent === "multipart/form-data") {
439
+ return "formData";
440
+ }
441
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
442
+ return "blob";
443
+ }
444
+ if (cleanContent.startsWith("text/")) {
445
+ return "text";
446
+ }
447
+ return;
448
+ };
449
+ var checkForExistence = (options, name) => {
450
+ if (!name) {
451
+ return false;
452
+ }
453
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
454
+ return true;
455
+ }
456
+ return false;
457
+ };
458
+ var setAuthParams = async ({
459
+ security,
460
+ ...options
461
+ }) => {
462
+ for (const auth of security) {
463
+ if (checkForExistence(options, auth.name)) {
464
+ continue;
465
+ }
466
+ const token = await getAuthToken(auth, options.auth);
467
+ if (!token) {
468
+ continue;
469
+ }
470
+ const name = auth.name ?? "Authorization";
471
+ switch (auth.in) {
472
+ case "query":
473
+ if (!options.query) {
474
+ options.query = {};
475
+ }
476
+ options.query[name] = token;
477
+ break;
478
+ case "cookie":
479
+ options.headers.append("Cookie", `${name}=${token}`);
480
+ break;
481
+ case "header":
482
+ default:
483
+ options.headers.set(name, token);
484
+ break;
485
+ }
486
+ }
487
+ };
488
+ var buildUrl = (options) => getUrl({
489
+ baseUrl: options.baseUrl,
490
+ path: options.path,
491
+ query: options.query,
492
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
493
+ url: options.url
494
+ });
495
+ var mergeConfigs = (a, b) => {
496
+ const config = { ...a, ...b };
497
+ if (config.baseUrl?.endsWith("/")) {
498
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
499
+ }
500
+ config.headers = mergeHeaders(a.headers, b.headers);
501
+ return config;
502
+ };
503
+ var headersEntries = (headers) => {
504
+ const entries = [];
505
+ headers.forEach((value, key) => {
506
+ entries.push([key, value]);
507
+ });
508
+ return entries;
509
+ };
510
+ var mergeHeaders = (...headers) => {
511
+ const mergedHeaders = new Headers();
512
+ for (const header of headers) {
513
+ if (!header) {
514
+ continue;
515
+ }
516
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
517
+ for (const [key, value] of iterator) {
518
+ if (value === null) {
519
+ mergedHeaders.delete(key);
520
+ } else if (Array.isArray(value)) {
521
+ for (const v2 of value) {
522
+ mergedHeaders.append(key, v2);
523
+ }
524
+ } else if (value !== void 0) {
525
+ mergedHeaders.set(
526
+ key,
527
+ typeof value === "object" ? JSON.stringify(value) : value
528
+ );
529
+ }
530
+ }
531
+ }
532
+ return mergedHeaders;
533
+ };
534
+ var Interceptors = class {
535
+ constructor() {
536
+ this.fns = [];
537
+ }
538
+ clear() {
539
+ this.fns = [];
540
+ }
541
+ eject(id) {
542
+ const index = this.getInterceptorIndex(id);
543
+ if (this.fns[index]) {
544
+ this.fns[index] = null;
545
+ }
546
+ }
547
+ exists(id) {
548
+ const index = this.getInterceptorIndex(id);
549
+ return Boolean(this.fns[index]);
550
+ }
551
+ getInterceptorIndex(id) {
552
+ if (typeof id === "number") {
553
+ return this.fns[id] ? id : -1;
554
+ }
555
+ return this.fns.indexOf(id);
556
+ }
557
+ update(id, fn) {
558
+ const index = this.getInterceptorIndex(id);
559
+ if (this.fns[index]) {
560
+ this.fns[index] = fn;
561
+ return id;
562
+ }
563
+ return false;
564
+ }
565
+ use(fn) {
566
+ this.fns.push(fn);
567
+ return this.fns.length - 1;
568
+ }
569
+ };
570
+ var createInterceptors = () => ({
571
+ error: new Interceptors(),
572
+ request: new Interceptors(),
573
+ response: new Interceptors()
574
+ });
575
+ var defaultQuerySerializer = createQuerySerializer({
576
+ allowReserved: false,
577
+ array: {
578
+ explode: true,
579
+ style: "form"
580
+ },
581
+ object: {
582
+ explode: true,
583
+ style: "deepObject"
584
+ }
585
+ });
586
+ var defaultHeaders = {
587
+ "Content-Type": "application/json"
588
+ };
589
+ var createConfig = (override = {}) => ({
590
+ ...jsonBodySerializer,
591
+ headers: defaultHeaders,
592
+ parseAs: "auto",
593
+ querySerializer: defaultQuerySerializer,
594
+ ...override
595
+ });
596
+
597
+ // src/generated/client/client.gen.ts
598
+ var createClient = (config = {}) => {
599
+ let _config = mergeConfigs(createConfig(), config);
600
+ const getConfig = () => ({ ..._config });
601
+ const setConfig = (config2) => {
602
+ _config = mergeConfigs(_config, config2);
603
+ return getConfig();
604
+ };
605
+ const interceptors = createInterceptors();
606
+ const beforeRequest = async (options) => {
607
+ const opts = {
608
+ ..._config,
609
+ ...options,
610
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
611
+ headers: mergeHeaders(_config.headers, options.headers),
612
+ serializedBody: void 0
613
+ };
614
+ if (opts.security) {
615
+ await setAuthParams({
616
+ ...opts,
617
+ security: opts.security
618
+ });
619
+ }
620
+ if (opts.requestValidator) {
621
+ await opts.requestValidator(opts);
622
+ }
623
+ if (opts.body !== void 0 && opts.bodySerializer) {
624
+ opts.serializedBody = opts.bodySerializer(opts.body);
625
+ }
626
+ if (opts.body === void 0 || opts.serializedBody === "") {
627
+ opts.headers.delete("Content-Type");
628
+ }
629
+ const resolvedOpts = opts;
630
+ const url = buildUrl(resolvedOpts);
631
+ return { opts: resolvedOpts, url };
632
+ };
633
+ const request = async (options) => {
634
+ const { opts, url } = await beforeRequest(options);
635
+ const requestInit = {
636
+ redirect: "follow",
637
+ ...opts,
638
+ body: getValidRequestBody(opts)
639
+ };
640
+ let request2 = new Request(url, requestInit);
641
+ for (const fn of interceptors.request.fns) {
642
+ if (fn) {
643
+ request2 = await fn(request2, opts);
644
+ }
645
+ }
646
+ const _fetch = opts.fetch;
647
+ let response;
648
+ try {
649
+ response = await _fetch(request2);
650
+ } catch (error2) {
651
+ let finalError2 = error2;
652
+ for (const fn of interceptors.error.fns) {
653
+ if (fn) {
654
+ finalError2 = await fn(error2, void 0, request2, opts);
655
+ }
656
+ }
657
+ finalError2 = finalError2 || {};
658
+ if (opts.throwOnError) {
659
+ throw finalError2;
660
+ }
661
+ return opts.responseStyle === "data" ? void 0 : {
662
+ error: finalError2,
663
+ request: request2,
664
+ response: void 0
665
+ };
666
+ }
667
+ for (const fn of interceptors.response.fns) {
668
+ if (fn) {
669
+ response = await fn(response, request2, opts);
670
+ }
671
+ }
672
+ const result = {
673
+ request: request2,
674
+ response
675
+ };
676
+ if (response.ok) {
677
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
678
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
679
+ let emptyData;
680
+ switch (parseAs) {
681
+ case "arrayBuffer":
682
+ case "blob":
683
+ case "text":
684
+ emptyData = await response[parseAs]();
685
+ break;
686
+ case "formData":
687
+ emptyData = new FormData();
688
+ break;
689
+ case "stream":
690
+ emptyData = response.body;
691
+ break;
692
+ case "json":
693
+ default:
694
+ emptyData = {};
695
+ break;
696
+ }
697
+ return opts.responseStyle === "data" ? emptyData : {
698
+ data: emptyData,
699
+ ...result
700
+ };
701
+ }
702
+ let data;
703
+ switch (parseAs) {
704
+ case "arrayBuffer":
705
+ case "blob":
706
+ case "formData":
707
+ case "text":
708
+ data = await response[parseAs]();
709
+ break;
710
+ case "json": {
711
+ const text = await response.text();
712
+ data = text ? JSON.parse(text) : {};
713
+ break;
714
+ }
715
+ case "stream":
716
+ return opts.responseStyle === "data" ? response.body : {
717
+ data: response.body,
718
+ ...result
719
+ };
720
+ }
721
+ if (parseAs === "json") {
722
+ if (opts.responseValidator) {
723
+ await opts.responseValidator(data);
724
+ }
725
+ if (opts.responseTransformer) {
726
+ data = await opts.responseTransformer(data);
727
+ }
728
+ }
729
+ return opts.responseStyle === "data" ? data : {
730
+ data,
731
+ ...result
732
+ };
733
+ }
734
+ const textError = await response.text();
735
+ let jsonError;
736
+ try {
737
+ jsonError = JSON.parse(textError);
738
+ } catch {
739
+ }
740
+ const error = jsonError ?? textError;
741
+ let finalError = error;
742
+ for (const fn of interceptors.error.fns) {
743
+ if (fn) {
744
+ finalError = await fn(error, response, request2, opts);
745
+ }
746
+ }
747
+ finalError = finalError || {};
748
+ if (opts.throwOnError) {
749
+ throw finalError;
750
+ }
751
+ return opts.responseStyle === "data" ? void 0 : {
752
+ error: finalError,
753
+ ...result
754
+ };
755
+ };
756
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
757
+ const makeSseFn = (method) => async (options) => {
758
+ const { opts, url } = await beforeRequest(options);
759
+ return createSseClient({
760
+ ...opts,
761
+ body: opts.body,
762
+ headers: opts.headers,
763
+ method,
764
+ onRequest: async (url2, init) => {
765
+ let request2 = new Request(url2, init);
766
+ for (const fn of interceptors.request.fns) {
767
+ if (fn) {
768
+ request2 = await fn(request2, opts);
769
+ }
770
+ }
771
+ return request2;
772
+ },
773
+ serializedBody: getValidRequestBody(opts),
774
+ url
775
+ });
776
+ };
777
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
778
+ return {
779
+ buildUrl: _buildUrl,
780
+ connect: makeMethodFn("CONNECT"),
781
+ delete: makeMethodFn("DELETE"),
782
+ get: makeMethodFn("GET"),
783
+ getConfig,
784
+ head: makeMethodFn("HEAD"),
785
+ interceptors,
786
+ options: makeMethodFn("OPTIONS"),
787
+ patch: makeMethodFn("PATCH"),
788
+ post: makeMethodFn("POST"),
789
+ put: makeMethodFn("PUT"),
790
+ request,
791
+ setConfig,
792
+ sse: {
793
+ connect: makeSseFn("CONNECT"),
794
+ delete: makeSseFn("DELETE"),
795
+ get: makeSseFn("GET"),
796
+ head: makeSseFn("HEAD"),
797
+ options: makeSseFn("OPTIONS"),
798
+ patch: makeSseFn("PATCH"),
799
+ post: makeSseFn("POST"),
800
+ put: makeSseFn("PUT"),
801
+ trace: makeSseFn("TRACE")
802
+ },
803
+ trace: makeMethodFn("TRACE")
804
+ };
805
+ };
806
+
807
+ // src/generated/client.gen.ts
808
+ var client = createClient(createClientConfig(createConfig({ baseUrl: "https://api.linebundle.com" })));
809
+
810
+ // src/generated/sdk.gen.ts
811
+ var HeyApiClient = class {
812
+ constructor(args) {
813
+ this.client = args?.client ?? client;
814
+ }
815
+ };
816
+ var HeyApiRegistry = class {
817
+ constructor() {
818
+ this.defaultKey = "default";
819
+ this.instances = /* @__PURE__ */ new Map();
820
+ }
821
+ get(key) {
822
+ const instance = this.instances.get(key ?? this.defaultKey);
823
+ if (!instance) {
824
+ throw new Error(`No SDK client found. Create one with "new Linebundle()" to fix this error.`);
825
+ }
826
+ return instance;
827
+ }
828
+ set(value, key) {
829
+ this.instances.set(key ?? this.defaultKey, value);
830
+ }
831
+ };
832
+ var Analytics = class extends HeyApiClient {
833
+ /**
834
+ * Get entity counts for the org
835
+ */
836
+ counts(options) {
837
+ return (options?.client ?? this.client).get({ url: "/api/v1/analytics/counts", ...options });
838
+ }
839
+ /**
840
+ * Get the org dashboard
841
+ */
842
+ dashboard(options) {
843
+ return (options?.client ?? this.client).get({ url: "/api/v1/analytics/dashboard", ...options });
844
+ }
845
+ /**
846
+ * Get the overview screen payload
847
+ */
848
+ overview(options) {
849
+ return (options?.client ?? this.client).get({ url: "/api/v1/analytics/overview", ...options });
850
+ }
851
+ };
852
+ var Announcements = class extends HeyApiClient {
853
+ /**
854
+ * List announcements
855
+ */
856
+ list(options) {
857
+ return (options?.client ?? this.client).get({ url: "/api/v1/announcements", ...options });
858
+ }
859
+ /**
860
+ * Create an announcement
861
+ */
862
+ create(options) {
863
+ return (options.client ?? this.client).post({
864
+ url: "/api/v1/announcements",
865
+ ...options,
866
+ headers: {
867
+ "Content-Type": "application/json",
868
+ ...options.headers
869
+ }
870
+ });
871
+ }
872
+ /**
873
+ * Delete an announcement
874
+ */
875
+ delete(options) {
876
+ return (options.client ?? this.client).delete({ url: "/api/v1/announcements/{id}", ...options });
877
+ }
878
+ /**
879
+ * Get an announcement
880
+ */
881
+ get(options) {
882
+ return (options.client ?? this.client).get({ url: "/api/v1/announcements/{id}", ...options });
883
+ }
884
+ /**
885
+ * Partially update an announcement
886
+ */
887
+ patch(options) {
888
+ return (options.client ?? this.client).patch({
889
+ url: "/api/v1/announcements/{id}",
890
+ ...options,
891
+ headers: {
892
+ "Content-Type": "application/json",
893
+ ...options.headers
894
+ }
895
+ });
896
+ }
897
+ /**
898
+ * Upload announcement cover image (multipart/form-data, field: file)
899
+ */
900
+ uploadCover(options) {
901
+ return (options.client ?? this.client).put({
902
+ bodySerializer: null,
903
+ url: "/api/v1/announcements/{id}/cover",
904
+ ...options,
905
+ headers: {
906
+ "Content-Type": "application/octet-stream",
907
+ ...options.headers
908
+ }
909
+ });
910
+ }
911
+ /**
912
+ * Publish an announcement (queues email delivery)
913
+ */
914
+ publish(options) {
915
+ return (options.client ?? this.client).post({
916
+ url: "/api/v1/announcements/{id}/publish",
917
+ ...options,
918
+ headers: {
919
+ "Content-Type": "application/json",
920
+ ...options.headers
921
+ }
922
+ });
923
+ }
924
+ };
925
+ var Audit = class extends HeyApiClient {
926
+ /**
927
+ * List audit log entries for the organisation
928
+ */
929
+ list(options) {
930
+ return (options?.client ?? this.client).get({ url: "/api/v1/audit-logs", ...options });
931
+ }
932
+ };
933
+ var Auth = class extends HeyApiClient {
934
+ /**
935
+ * Get the authenticated caller's identity and permissions
936
+ */
937
+ context(options) {
938
+ return (options?.client ?? this.client).get({ url: "/api/v1/auth/context", ...options });
939
+ }
940
+ /**
941
+ * Get the authenticated caller's identity and permissions
942
+ */
943
+ me(options) {
944
+ return (options?.client ?? this.client).get({ url: "/api/v1/auth/me", ...options });
945
+ }
946
+ };
947
+ var Automation = class extends HeyApiClient {
948
+ /**
949
+ * List available native automation action types
950
+ */
951
+ listActions(options) {
952
+ return (options?.client ?? this.client).get({ url: "/api/v1/automation/actions", ...options });
953
+ }
954
+ /**
955
+ * List automation rules
956
+ */
957
+ listRules(options) {
958
+ return (options?.client ?? this.client).get({ url: "/api/v1/automation/rules", ...options });
959
+ }
960
+ /**
961
+ * Create an automation rule
962
+ */
963
+ createRule(options) {
964
+ return (options.client ?? this.client).post({
965
+ url: "/api/v1/automation/rules",
966
+ ...options,
967
+ headers: {
968
+ "Content-Type": "application/json",
969
+ ...options.headers
970
+ }
971
+ });
972
+ }
973
+ /**
974
+ * Delete an automation rule
975
+ */
976
+ deleteRule(options) {
977
+ return (options.client ?? this.client).delete({ url: "/api/v1/automation/rules/{id}", ...options });
978
+ }
979
+ /**
980
+ * Get an automation rule
981
+ */
982
+ getRule(options) {
983
+ return (options.client ?? this.client).get({ url: "/api/v1/automation/rules/{id}", ...options });
984
+ }
985
+ /**
986
+ * Update an automation rule
987
+ */
988
+ updateRule(options) {
989
+ return (options.client ?? this.client).put({
990
+ url: "/api/v1/automation/rules/{id}",
991
+ ...options,
992
+ headers: {
993
+ "Content-Type": "application/json",
994
+ ...options.headers
995
+ }
996
+ });
997
+ }
998
+ /**
999
+ * Manually trigger an automation rule
1000
+ */
1001
+ executeRule(options) {
1002
+ return (options.client ?? this.client).post({ url: "/api/v1/automation/rules/{id}/execute", ...options });
1003
+ }
1004
+ /**
1005
+ * List execution history for a rule
1006
+ */
1007
+ listExecutions(options) {
1008
+ return (options.client ?? this.client).get({ url: "/api/v1/automation/rules/{id}/executions", ...options });
1009
+ }
1010
+ /**
1011
+ * List available automation trigger types
1012
+ */
1013
+ listTriggers(options) {
1014
+ return (options?.client ?? this.client).get({ url: "/api/v1/automation/triggers", ...options });
1015
+ }
1016
+ };
1017
+ var Bookings = class extends HeyApiClient {
1018
+ /**
1019
+ * List bookings
1020
+ */
1021
+ list(options) {
1022
+ return (options?.client ?? this.client).get({ url: "/api/v1/bookings", ...options });
1023
+ }
1024
+ /**
1025
+ * Create a booking
1026
+ */
1027
+ create(options) {
1028
+ return (options.client ?? this.client).post({
1029
+ url: "/api/v1/bookings",
1030
+ ...options,
1031
+ headers: {
1032
+ "Content-Type": "application/json",
1033
+ ...options.headers
1034
+ }
1035
+ });
1036
+ }
1037
+ /**
1038
+ * Check place availability for a time slot
1039
+ */
1040
+ checkAvailability(options) {
1041
+ return (options.client ?? this.client).post({
1042
+ url: "/api/v1/bookings/check-availability",
1043
+ ...options,
1044
+ headers: {
1045
+ "Content-Type": "application/json",
1046
+ ...options.headers
1047
+ }
1048
+ });
1049
+ }
1050
+ /**
1051
+ * Get all bookings for a place within a date range
1052
+ */
1053
+ placeSchedule(options) {
1054
+ return (options.client ?? this.client).get({ url: "/api/v1/bookings/places/{place_id}/schedule", ...options });
1055
+ }
1056
+ /**
1057
+ * Delete a booking
1058
+ */
1059
+ delete(options) {
1060
+ return (options.client ?? this.client).delete({ url: "/api/v1/bookings/{id}", ...options });
1061
+ }
1062
+ /**
1063
+ * Get a booking by ID
1064
+ */
1065
+ get(options) {
1066
+ return (options.client ?? this.client).get({ url: "/api/v1/bookings/{id}", ...options });
1067
+ }
1068
+ /**
1069
+ * Update a booking
1070
+ */
1071
+ update(options) {
1072
+ return (options.client ?? this.client).put({
1073
+ url: "/api/v1/bookings/{id}",
1074
+ ...options,
1075
+ headers: {
1076
+ "Content-Type": "application/json",
1077
+ ...options.headers
1078
+ }
1079
+ });
1080
+ }
1081
+ };
1082
+ var Contacts = class extends HeyApiClient {
1083
+ /**
1084
+ * List contacts
1085
+ */
1086
+ list(options) {
1087
+ return (options?.client ?? this.client).get({ url: "/api/v1/contacts", ...options });
1088
+ }
1089
+ /**
1090
+ * Create a contact
1091
+ */
1092
+ create(options) {
1093
+ return (options.client ?? this.client).post({
1094
+ url: "/api/v1/contacts",
1095
+ ...options,
1096
+ headers: {
1097
+ "Content-Type": "application/json",
1098
+ ...options.headers
1099
+ }
1100
+ });
1101
+ }
1102
+ /**
1103
+ * Search contacts
1104
+ */
1105
+ search(options) {
1106
+ return (options?.client ?? this.client).get({ url: "/api/v1/contacts/search", ...options });
1107
+ }
1108
+ /**
1109
+ * Delete a contact
1110
+ */
1111
+ delete(options) {
1112
+ return (options.client ?? this.client).delete({ url: "/api/v1/contacts/{id}", ...options });
1113
+ }
1114
+ /**
1115
+ * Get a contact
1116
+ */
1117
+ get(options) {
1118
+ return (options.client ?? this.client).get({ url: "/api/v1/contacts/{id}", ...options });
1119
+ }
1120
+ /**
1121
+ * Update a contact
1122
+ */
1123
+ update(options) {
1124
+ return (options.client ?? this.client).put({
1125
+ url: "/api/v1/contacts/{id}",
1126
+ ...options,
1127
+ headers: {
1128
+ "Content-Type": "application/json",
1129
+ ...options.headers
1130
+ }
1131
+ });
1132
+ }
1133
+ /**
1134
+ * Toggle contact favorite
1135
+ */
1136
+ toggleFavorite(options) {
1137
+ return (options.client ?? this.client).patch({
1138
+ url: "/api/v1/contacts/{id}/favorite",
1139
+ ...options,
1140
+ headers: {
1141
+ "Content-Type": "application/json",
1142
+ ...options.headers
1143
+ }
1144
+ });
1145
+ }
1146
+ };
1147
+ var Credentials = class extends HeyApiClient {
1148
+ /**
1149
+ * List machine credentials
1150
+ */
1151
+ list(options) {
1152
+ return (options?.client ?? this.client).get({ url: "/api/v1/credentials", ...options });
1153
+ }
1154
+ /**
1155
+ * Create a machine credential
1156
+ */
1157
+ create(options) {
1158
+ return (options.client ?? this.client).post({
1159
+ url: "/api/v1/credentials",
1160
+ ...options,
1161
+ headers: {
1162
+ "Content-Type": "application/json",
1163
+ ...options.headers
1164
+ }
1165
+ });
1166
+ }
1167
+ /**
1168
+ * Revoke a machine credential
1169
+ */
1170
+ revoke(options) {
1171
+ return (options.client ?? this.client).delete({ url: "/api/v1/credentials/{id}", ...options });
1172
+ }
1173
+ /**
1174
+ * Get a machine credential
1175
+ */
1176
+ get(options) {
1177
+ return (options.client ?? this.client).get({ url: "/api/v1/credentials/{id}", ...options });
1178
+ }
1179
+ };
1180
+ var Events = class extends HeyApiClient {
1181
+ /**
1182
+ * List events
1183
+ */
1184
+ list(options) {
1185
+ return (options?.client ?? this.client).get({ url: "/api/v1/events", ...options });
1186
+ }
1187
+ /**
1188
+ * Create an event
1189
+ */
1190
+ create(options) {
1191
+ return (options.client ?? this.client).post({
1192
+ url: "/api/v1/events",
1193
+ ...options,
1194
+ headers: {
1195
+ "Content-Type": "application/json",
1196
+ ...options.headers
1197
+ }
1198
+ });
1199
+ }
1200
+ /**
1201
+ * List events overlapping a date range (calendar view)
1202
+ */
1203
+ calendar(options) {
1204
+ return (options.client ?? this.client).get({ url: "/api/v1/events/calendar", ...options });
1205
+ }
1206
+ /**
1207
+ * List all assignable event manager permissions
1208
+ */
1209
+ managerPermissions(options) {
1210
+ return (options?.client ?? this.client).get({ url: "/api/v1/events/manager-permissions", ...options });
1211
+ }
1212
+ /**
1213
+ * Accept an event manager invite via token
1214
+ */
1215
+ acceptManagerInvite(options) {
1216
+ return (options.client ?? this.client).post({
1217
+ url: "/api/v1/events/managers/accept",
1218
+ ...options,
1219
+ headers: {
1220
+ "Content-Type": "application/json",
1221
+ ...options.headers
1222
+ }
1223
+ });
1224
+ }
1225
+ /**
1226
+ * List pending event manager invites for the current user
1227
+ */
1228
+ listPendingManagerInvites(options) {
1229
+ return (options?.client ?? this.client).get({ url: "/api/v1/events/managers/pending", ...options });
1230
+ }
1231
+ /**
1232
+ * Create an event and optionally a recurring series in one atomic call
1233
+ *
1234
+ * If series.freq is provided the event is converted into the anchor of a new recurring series. On series creation failure the event is rolled back.
1235
+ */
1236
+ createWithSeries(options) {
1237
+ return (options.client ?? this.client).post({
1238
+ url: "/api/v1/events/with-series",
1239
+ ...options,
1240
+ headers: {
1241
+ "Content-Type": "application/json",
1242
+ ...options.headers
1243
+ }
1244
+ });
1245
+ }
1246
+ /**
1247
+ * Delete an event
1248
+ */
1249
+ delete(options) {
1250
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}", ...options });
1251
+ }
1252
+ /**
1253
+ * Get an event
1254
+ */
1255
+ get(options) {
1256
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}", ...options });
1257
+ }
1258
+ /**
1259
+ * Partial-update an event (merge-patch)
1260
+ *
1261
+ * Updates only the fields present in the request body. Absent fields are left unchanged. Allows individual form sections to auto-save without submitting the full event payload.
1262
+ */
1263
+ patch(options) {
1264
+ return (options.client ?? this.client).patch({
1265
+ url: "/api/v1/events/{id}",
1266
+ ...options,
1267
+ headers: {
1268
+ "Content-Type": "application/json",
1269
+ ...options.headers
1270
+ }
1271
+ });
1272
+ }
1273
+ /**
1274
+ * Update an event
1275
+ */
1276
+ update(options) {
1277
+ return (options.client ?? this.client).put({
1278
+ url: "/api/v1/events/{id}",
1279
+ ...options,
1280
+ headers: {
1281
+ "Content-Type": "application/json",
1282
+ ...options.headers
1283
+ }
1284
+ });
1285
+ }
1286
+ /**
1287
+ * Archive an event
1288
+ */
1289
+ archive(options) {
1290
+ return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/archive", ...options });
1291
+ }
1292
+ /**
1293
+ * List event attendees
1294
+ */
1295
+ listAttendees(options) {
1296
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/attendees", ...options });
1297
+ }
1298
+ /**
1299
+ * Add an attendee to an event
1300
+ */
1301
+ addAttendee(options) {
1302
+ return (options.client ?? this.client).post({
1303
+ url: "/api/v1/events/{id}/attendees",
1304
+ ...options,
1305
+ headers: {
1306
+ "Content-Type": "application/json",
1307
+ ...options.headers
1308
+ }
1309
+ });
1310
+ }
1311
+ /**
1312
+ * Bulk remove attendees from an event
1313
+ */
1314
+ bulkRemoveAttendees(options) {
1315
+ return (options.client ?? this.client).delete({
1316
+ url: "/api/v1/events/{id}/attendees/bulk",
1317
+ ...options,
1318
+ headers: {
1319
+ "Content-Type": "application/json",
1320
+ ...options.headers
1321
+ }
1322
+ });
1323
+ }
1324
+ /**
1325
+ * Bulk add attendees to an event
1326
+ */
1327
+ bulkAddAttendees(options) {
1328
+ return (options.client ?? this.client).post({
1329
+ url: "/api/v1/events/{id}/attendees/bulk",
1330
+ ...options,
1331
+ headers: {
1332
+ "Content-Type": "application/json",
1333
+ ...options.headers
1334
+ }
1335
+ });
1336
+ }
1337
+ /**
1338
+ * Bulk update attendee statuses
1339
+ */
1340
+ bulkUpdateAttendeeStatus(options) {
1341
+ return (options.client ?? this.client).patch({
1342
+ url: "/api/v1/events/{id}/attendees/bulk/status",
1343
+ ...options,
1344
+ headers: {
1345
+ "Content-Type": "application/json",
1346
+ ...options.headers
1347
+ }
1348
+ });
1349
+ }
1350
+ /**
1351
+ * Remove an attendee from an event
1352
+ */
1353
+ removeAttendee(options) {
1354
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/attendees/{contact_id}", ...options });
1355
+ }
1356
+ /**
1357
+ * Update attendee status
1358
+ */
1359
+ updateAttendeeStatus(options) {
1360
+ return (options.client ?? this.client).patch({
1361
+ url: "/api/v1/events/{id}/attendees/{contact_id}",
1362
+ ...options,
1363
+ headers: {
1364
+ "Content-Type": "application/json",
1365
+ ...options.headers
1366
+ }
1367
+ });
1368
+ }
1369
+ /**
1370
+ * Check in an attendee
1371
+ */
1372
+ checkInAttendee(options) {
1373
+ return (options.client ?? this.client).post({
1374
+ url: "/api/v1/events/{id}/attendees/{contact_id}/check-in",
1375
+ ...options,
1376
+ headers: {
1377
+ "Content-Type": "application/json",
1378
+ ...options.headers
1379
+ }
1380
+ });
1381
+ }
1382
+ /**
1383
+ * List automations attached to an event
1384
+ */
1385
+ listAutomations(options) {
1386
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations", ...options });
1387
+ }
1388
+ /**
1389
+ * Create an automation attached to an event
1390
+ */
1391
+ createAutomation(options) {
1392
+ return (options.client ?? this.client).post({
1393
+ url: "/api/v1/events/{id}/automations",
1394
+ ...options,
1395
+ headers: {
1396
+ "Content-Type": "application/json",
1397
+ ...options.headers
1398
+ }
1399
+ });
1400
+ }
1401
+ /**
1402
+ * List event automation templates
1403
+ */
1404
+ automationTemplates(options) {
1405
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations/templates", ...options });
1406
+ }
1407
+ /**
1408
+ * Delete an event automation
1409
+ */
1410
+ deleteAutomation(options) {
1411
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/automations/{rule_id}", ...options });
1412
+ }
1413
+ /**
1414
+ * Get an event automation
1415
+ */
1416
+ getAutomation(options) {
1417
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations/{rule_id}", ...options });
1418
+ }
1419
+ /**
1420
+ * Update an event automation
1421
+ */
1422
+ updateAutomation(options) {
1423
+ return (options.client ?? this.client).put({
1424
+ url: "/api/v1/events/{id}/automations/{rule_id}",
1425
+ ...options,
1426
+ headers: {
1427
+ "Content-Type": "application/json",
1428
+ ...options.headers
1429
+ }
1430
+ });
1431
+ }
1432
+ /**
1433
+ * Run an event automation now
1434
+ */
1435
+ executeAutomation(options) {
1436
+ return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/automations/{rule_id}/execute", ...options });
1437
+ }
1438
+ /**
1439
+ * List execution history for an event automation
1440
+ */
1441
+ listAutomationExecutions(options) {
1442
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/automations/{rule_id}/executions", ...options });
1443
+ }
1444
+ /**
1445
+ * Upload event cover image (multipart/form-data, field: file)
1446
+ */
1447
+ uploadCover(options) {
1448
+ return (options.client ?? this.client).put({
1449
+ bodySerializer: null,
1450
+ url: "/api/v1/events/{id}/cover",
1451
+ ...options,
1452
+ headers: {
1453
+ "Content-Type": "application/octet-stream",
1454
+ ...options.headers
1455
+ }
1456
+ });
1457
+ }
1458
+ /**
1459
+ * Discard draft, keep published version
1460
+ */
1461
+ discard(options) {
1462
+ return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/discard", ...options });
1463
+ }
1464
+ /**
1465
+ * List documents linked to an event
1466
+ */
1467
+ listDocuments(options) {
1468
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/documents", ...options });
1469
+ }
1470
+ /**
1471
+ * Unlink a document from an event
1472
+ */
1473
+ removeDocument(options) {
1474
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/documents/{document_id}", ...options });
1475
+ }
1476
+ /**
1477
+ * Link a document to an event
1478
+ */
1479
+ addDocument(options) {
1480
+ return (options.client ?? this.client).post({
1481
+ url: "/api/v1/events/{id}/documents/{document_id}",
1482
+ ...options,
1483
+ headers: {
1484
+ "Content-Type": "application/json",
1485
+ ...options.headers
1486
+ }
1487
+ });
1488
+ }
1489
+ /**
1490
+ * Get draft version of an event
1491
+ */
1492
+ getDraft(options) {
1493
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/draft", ...options });
1494
+ }
1495
+ /**
1496
+ * Start editing (creates draft clone)
1497
+ */
1498
+ startEdit(options) {
1499
+ return (options.client ?? this.client).post({ url: "/api/v1/events/{id}/edit", ...options });
1500
+ }
1501
+ /**
1502
+ * List cross-reference links for this event
1503
+ */
1504
+ listLinks(options) {
1505
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/links", ...options });
1506
+ }
1507
+ /**
1508
+ * Link another event as a cross-reference
1509
+ */
1510
+ addLink(options) {
1511
+ return (options.client ?? this.client).post({
1512
+ url: "/api/v1/events/{id}/links",
1513
+ ...options,
1514
+ headers: {
1515
+ "Content-Type": "application/json",
1516
+ ...options.headers
1517
+ }
1518
+ });
1519
+ }
1520
+ /**
1521
+ * Remove a cross-reference link
1522
+ */
1523
+ removeLink(options) {
1524
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/links/{target_id}", ...options });
1525
+ }
1526
+ /**
1527
+ * List managers for an event
1528
+ */
1529
+ listManagers(options) {
1530
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/managers", ...options });
1531
+ }
1532
+ /**
1533
+ * Add a manager to an event
1534
+ */
1535
+ addManager(options) {
1536
+ return (options.client ?? this.client).post({
1537
+ url: "/api/v1/events/{id}/managers",
1538
+ ...options,
1539
+ headers: {
1540
+ "Content-Type": "application/json",
1541
+ ...options.headers
1542
+ }
1543
+ });
1544
+ }
1545
+ /**
1546
+ * Invite a manager to an event by email
1547
+ */
1548
+ inviteManager(options) {
1549
+ return (options.client ?? this.client).post({
1550
+ url: "/api/v1/events/{id}/managers/invite",
1551
+ ...options,
1552
+ headers: {
1553
+ "Content-Type": "application/json",
1554
+ ...options.headers
1555
+ }
1556
+ });
1557
+ }
1558
+ /**
1559
+ * Remove a manager from an event
1560
+ */
1561
+ removeManager(options) {
1562
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/managers/{user_id}", ...options });
1563
+ }
1564
+ /**
1565
+ * Get a single event manager
1566
+ */
1567
+ getManager(options) {
1568
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/managers/{user_id}", ...options });
1569
+ }
1570
+ /**
1571
+ * Update an event manager's permissions
1572
+ */
1573
+ updateManager(options) {
1574
+ return (options.client ?? this.client).put({
1575
+ url: "/api/v1/events/{id}/managers/{user_id}",
1576
+ ...options,
1577
+ headers: {
1578
+ "Content-Type": "application/json",
1579
+ ...options.headers
1580
+ }
1581
+ });
1582
+ }
1583
+ /**
1584
+ * List milestones for an event
1585
+ */
1586
+ listMilestones(options) {
1587
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/milestones", ...options });
1588
+ }
1589
+ /**
1590
+ * Add a milestone event to a base event
1591
+ */
1592
+ addMilestone(options) {
1593
+ return (options.client ?? this.client).post({
1594
+ url: "/api/v1/events/{id}/milestones",
1595
+ ...options,
1596
+ headers: {
1597
+ "Content-Type": "application/json",
1598
+ ...options.headers
1599
+ }
1600
+ });
1601
+ }
1602
+ /**
1603
+ * Remove a milestone from an event
1604
+ */
1605
+ removeMilestone(options) {
1606
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/milestones/{milestone_event_id}", ...options });
1607
+ }
1608
+ /**
1609
+ * Update milestone lifecycle status or reset to automatic mode
1610
+ */
1611
+ patchMilestoneLifecycle(options) {
1612
+ return (options.client ?? this.client).patch({
1613
+ url: "/api/v1/events/{id}/milestones/{milestone_event_id}",
1614
+ ...options,
1615
+ headers: {
1616
+ "Content-Type": "application/json",
1617
+ ...options.headers
1618
+ }
1619
+ });
1620
+ }
1621
+ /**
1622
+ * Update milestone sequence
1623
+ */
1624
+ updateMilestone(options) {
1625
+ return (options.client ?? this.client).put({
1626
+ url: "/api/v1/events/{id}/milestones/{milestone_event_id}",
1627
+ ...options,
1628
+ headers: {
1629
+ "Content-Type": "application/json",
1630
+ ...options.headers
1631
+ }
1632
+ });
1633
+ }
1634
+ /**
1635
+ * Publish an event
1636
+ *
1637
+ * Publishes a new draft or promotes the current draft changes for a published event. Optionally sends a notification to the creator by providing a JSON body with notification options.
1638
+ */
1639
+ publish(options) {
1640
+ return (options.client ?? this.client).post({
1641
+ url: "/api/v1/events/{id}/publish",
1642
+ ...options,
1643
+ headers: {
1644
+ "Content-Type": "application/json",
1645
+ ...options.headers
1646
+ }
1647
+ });
1648
+ }
1649
+ /**
1650
+ * Remove from series (scope: this | future | all)
1651
+ */
1652
+ deleteSeries(options) {
1653
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/series", ...options });
1654
+ }
1655
+ /**
1656
+ * Get series rule and all occurrences for a recurring event
1657
+ */
1658
+ getSeries(options) {
1659
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/series", ...options });
1660
+ }
1661
+ /**
1662
+ * Update series fields. Cascades to occurrences without overrides.
1663
+ */
1664
+ patchSeries(options) {
1665
+ return (options.client ?? this.client).patch({
1666
+ url: "/api/v1/events/{id}/series",
1667
+ ...options,
1668
+ headers: {
1669
+ "Content-Type": "application/json",
1670
+ ...options.headers
1671
+ }
1672
+ });
1673
+ }
1674
+ /**
1675
+ * Convert an event into the anchor of a new recurring series
1676
+ */
1677
+ createSeries(options) {
1678
+ return (options.client ?? this.client).post({
1679
+ url: "/api/v1/events/{id}/series",
1680
+ ...options,
1681
+ headers: {
1682
+ "Content-Type": "application/json",
1683
+ ...options.headers
1684
+ }
1685
+ });
1686
+ }
1687
+ /**
1688
+ * Invite series manager
1689
+ *
1690
+ * Invites a user as series manager by email. Only the series owner can do this.
1691
+ */
1692
+ inviteSeriesManager(options) {
1693
+ return (options.client ?? this.client).post({
1694
+ url: "/api/v1/events/{id}/series/manager",
1695
+ ...options,
1696
+ headers: {
1697
+ "Content-Type": "application/json",
1698
+ ...options.headers
1699
+ }
1700
+ });
1701
+ }
1702
+ /**
1703
+ * List occurrences of the series this event belongs to (paginated)
1704
+ */
1705
+ listOccurrences(options) {
1706
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/series/occurrences", ...options });
1707
+ }
1708
+ /**
1709
+ * Publish series
1710
+ *
1711
+ * Publishes a series and all its occurrences. Optionally sends a notification to attendees.
1712
+ */
1713
+ publishSeries(options) {
1714
+ return (options.client ?? this.client).post({
1715
+ url: "/api/v1/events/{id}/series/publish",
1716
+ ...options,
1717
+ headers: {
1718
+ "Content-Type": "application/json",
1719
+ ...options.headers
1720
+ }
1721
+ });
1722
+ }
1723
+ /**
1724
+ * List spaces this event belongs to
1725
+ */
1726
+ listSpaces(options) {
1727
+ return (options.client ?? this.client).get({ url: "/api/v1/events/{id}/spaces", ...options });
1728
+ }
1729
+ /**
1730
+ * Add event to a space
1731
+ */
1732
+ addSpace(options) {
1733
+ return (options.client ?? this.client).post({
1734
+ url: "/api/v1/events/{id}/spaces",
1735
+ ...options,
1736
+ headers: {
1737
+ "Content-Type": "application/json",
1738
+ ...options.headers
1739
+ }
1740
+ });
1741
+ }
1742
+ /**
1743
+ * Remove event from a space
1744
+ */
1745
+ removeSpace(options) {
1746
+ return (options.client ?? this.client).delete({ url: "/api/v1/events/{id}/spaces/{space_id}", ...options });
1747
+ }
1748
+ };
1749
+ var Zitadel = class extends HeyApiClient {
1750
+ /**
1751
+ * Zitadel event webhook
1752
+ *
1753
+ * Receives Zitadel Actions v2 lifecycle events (user.human.added, user.removed, …). Secured by HMAC-SHA256 (ZITADEL-Signature header). Excluded from OIDC and tenant middleware — authentication is the signature itself.
1754
+ */
1755
+ webhook(options) {
1756
+ return (options.client ?? this.client).post({
1757
+ bodySerializer: null,
1758
+ url: "/api/v1/integrations/zitadel/webhook",
1759
+ ...options,
1760
+ headers: {
1761
+ "Content-Type": "application/octet-stream",
1762
+ ...options.headers
1763
+ }
1764
+ });
1765
+ }
1766
+ };
1767
+ var Integrations = class extends HeyApiClient {
1768
+ get zitadel() {
1769
+ return this._zitadel ?? (this._zitadel = new Zitadel({ client: this.client }));
1770
+ }
1771
+ };
1772
+ var Invites = class extends HeyApiClient {
1773
+ /**
1774
+ * List pending invites
1775
+ */
1776
+ list(options) {
1777
+ return (options.client ?? this.client).get({ url: "/api/v1/organizations/{id}/invites", ...options });
1778
+ }
1779
+ /**
1780
+ * Send an invite
1781
+ */
1782
+ create(options) {
1783
+ return (options.client ?? this.client).post({
1784
+ url: "/api/v1/organizations/{id}/invites",
1785
+ ...options,
1786
+ headers: {
1787
+ "Content-Type": "application/json",
1788
+ ...options.headers
1789
+ }
1790
+ });
1791
+ }
1792
+ /**
1793
+ * Revoke an invite
1794
+ */
1795
+ delete(options) {
1796
+ return (options.client ?? this.client).delete({ url: "/api/v1/organizations/{id}/invites/{inviteId}", ...options });
1797
+ }
1798
+ };
1799
+ var Organizations = class extends HeyApiClient {
1800
+ /**
1801
+ * List user's organizations
1802
+ */
1803
+ list(options) {
1804
+ return (options?.client ?? this.client).get({ url: "/api/v1/organizations", ...options });
1805
+ }
1806
+ /**
1807
+ * Create an organization
1808
+ */
1809
+ create(options) {
1810
+ return (options.client ?? this.client).post({
1811
+ url: "/api/v1/organizations",
1812
+ ...options,
1813
+ headers: {
1814
+ "Content-Type": "application/json",
1815
+ ...options.headers
1816
+ }
1817
+ });
1818
+ }
1819
+ /**
1820
+ * Archive (soft-delete) an organization
1821
+ */
1822
+ archive(options) {
1823
+ return (options.client ?? this.client).delete({ url: "/api/v1/organizations/{id}", ...options });
1824
+ }
1825
+ /**
1826
+ * Get an organization
1827
+ */
1828
+ get(options) {
1829
+ return (options.client ?? this.client).get({ url: "/api/v1/organizations/{id}", ...options });
1830
+ }
1831
+ /**
1832
+ * Update an organization
1833
+ */
1834
+ update(options) {
1835
+ return (options.client ?? this.client).put({
1836
+ url: "/api/v1/organizations/{id}",
1837
+ ...options,
1838
+ headers: {
1839
+ "Content-Type": "application/json",
1840
+ ...options.headers
1841
+ }
1842
+ });
1843
+ }
1844
+ get invites() {
1845
+ return this._invites ?? (this._invites = new Invites({ client: this.client }));
1846
+ }
1847
+ };
1848
+ var Permissions = class extends HeyApiClient {
1849
+ /**
1850
+ * List all assignable role bundles
1851
+ *
1852
+ * Returns every role bundle (org / event_manager / space_manager / token) with its permissions. UI uses this to render permission/bundle pickers without hardcoding lists.
1853
+ */
1854
+ listRoles(options) {
1855
+ return (options?.client ?? this.client).get({ url: "/api/v1/permissions/roles", ...options });
1856
+ }
1857
+ };
1858
+ var Places = class extends HeyApiClient {
1859
+ /**
1860
+ * List places
1861
+ */
1862
+ list(options) {
1863
+ return (options?.client ?? this.client).get({ url: "/api/v1/places", ...options });
1864
+ }
1865
+ /**
1866
+ * Create a place
1867
+ */
1868
+ create(options) {
1869
+ return (options.client ?? this.client).post({
1870
+ url: "/api/v1/places",
1871
+ ...options,
1872
+ headers: {
1873
+ "Content-Type": "application/json",
1874
+ ...options.headers
1875
+ }
1876
+ });
1877
+ }
1878
+ /**
1879
+ * Delete a place
1880
+ */
1881
+ delete(options) {
1882
+ return (options.client ?? this.client).delete({ url: "/api/v1/places/{id}", ...options });
1883
+ }
1884
+ /**
1885
+ * Get a place
1886
+ */
1887
+ get(options) {
1888
+ return (options.client ?? this.client).get({ url: "/api/v1/places/{id}", ...options });
1889
+ }
1890
+ /**
1891
+ * Update a place
1892
+ */
1893
+ update(options) {
1894
+ return (options.client ?? this.client).put({
1895
+ url: "/api/v1/places/{id}",
1896
+ ...options,
1897
+ headers: {
1898
+ "Content-Type": "application/json",
1899
+ ...options.headers
1900
+ }
1901
+ });
1902
+ }
1903
+ /**
1904
+ * Archive a place
1905
+ */
1906
+ archive(options) {
1907
+ return (options.client ?? this.client).patch({ url: "/api/v1/places/{id}/archive", ...options });
1908
+ }
1909
+ /**
1910
+ * Publish a place
1911
+ */
1912
+ publish(options) {
1913
+ return (options.client ?? this.client).patch({ url: "/api/v1/places/{id}/publish", ...options });
1914
+ }
1915
+ };
1916
+ var Me = class extends HeyApiClient {
1917
+ /**
1918
+ * Get own profile
1919
+ */
1920
+ get(options) {
1921
+ return (options?.client ?? this.client).get({ url: "/api/v1/profiles/me", ...options });
1922
+ }
1923
+ /**
1924
+ * Update own profile
1925
+ */
1926
+ update(options) {
1927
+ return (options.client ?? this.client).put({
1928
+ url: "/api/v1/profiles/me",
1929
+ ...options,
1930
+ headers: {
1931
+ "Content-Type": "application/json",
1932
+ ...options.headers
1933
+ }
1934
+ });
1935
+ }
1936
+ /**
1937
+ * Accept terms of service
1938
+ */
1939
+ acceptTerms(options) {
1940
+ return (options?.client ?? this.client).post({ url: "/api/v1/profiles/me/terms", ...options });
1941
+ }
1942
+ };
1943
+ var Profiles = class extends HeyApiClient {
1944
+ /**
1945
+ * List all profiles (admin only)
1946
+ */
1947
+ list(options) {
1948
+ return (options?.client ?? this.client).get({ url: "/api/v1/profiles", ...options });
1949
+ }
1950
+ /**
1951
+ * Search profiles by username or email
1952
+ */
1953
+ search(options) {
1954
+ return (options?.client ?? this.client).get({ url: "/api/v1/profiles/search", ...options });
1955
+ }
1956
+ /**
1957
+ * Get a profile by ID
1958
+ */
1959
+ get(options) {
1960
+ return (options.client ?? this.client).get({ url: "/api/v1/profiles/{id}", ...options });
1961
+ }
1962
+ get me() {
1963
+ return this._me ?? (this._me = new Me({ client: this.client }));
1964
+ }
1965
+ };
1966
+ var Announcements2 = class extends HeyApiClient {
1967
+ /**
1968
+ * List public announcements
1969
+ *
1970
+ * Returns published announcements from all spaces that the owning organisation has made publicly visible. No authentication required.
1971
+ */
1972
+ list(options) {
1973
+ return (options?.client ?? this.client).get({ url: "/api/v1/public/announcements", ...options });
1974
+ }
1975
+ };
1976
+ var Events2 = class extends HeyApiClient {
1977
+ /**
1978
+ * List public events
1979
+ *
1980
+ * Returns published events that the owning organisation has made publicly visible. No authentication required.
1981
+ */
1982
+ list(options) {
1983
+ return (options?.client ?? this.client).get({ url: "/api/v1/public/events", ...options });
1984
+ }
1985
+ /**
1986
+ * Get a public event
1987
+ *
1988
+ * Returns a single published public event. Returns 404 if the event is not found or is not publicly visible.
1989
+ */
1990
+ get(options) {
1991
+ return (options.client ?? this.client).get({ url: "/api/v1/public/events/{id}", ...options });
1992
+ }
1993
+ };
1994
+ var Spaces = class extends HeyApiClient {
1995
+ /**
1996
+ * List public spaces
1997
+ *
1998
+ * Returns published spaces that the owning organisation has made publicly visible. No authentication required.
1999
+ */
2000
+ list(options) {
2001
+ return (options?.client ?? this.client).get({ url: "/api/v1/public/spaces", ...options });
2002
+ }
2003
+ /**
2004
+ * Get a public space
2005
+ *
2006
+ * Returns the public live-space page payload. Returns 404 if the space is not found or is not publicly visible.
2007
+ */
2008
+ get(options) {
2009
+ return (options.client ?? this.client).get({ url: "/api/v1/public/spaces/{id}", ...options });
2010
+ }
2011
+ };
2012
+ var Public = class extends HeyApiClient {
2013
+ get announcements() {
2014
+ return this._announcements ?? (this._announcements = new Announcements2({ client: this.client }));
2015
+ }
2016
+ get events() {
2017
+ return this._events ?? (this._events = new Events2({ client: this.client }));
2018
+ }
2019
+ get spaces() {
2020
+ return this._spaces ?? (this._spaces = new Spaces({ client: this.client }));
2021
+ }
2022
+ };
2023
+ var Series = class extends HeyApiClient {
2024
+ /**
2025
+ * Accept series manager invite
2026
+ *
2027
+ * Accepts a pending series manager invite by token.
2028
+ */
2029
+ acceptManagerInvite(options) {
2030
+ return (options.client ?? this.client).post({
2031
+ url: "/api/v1/series/accept-manager-invite",
2032
+ ...options,
2033
+ headers: {
2034
+ "Content-Type": "application/json",
2035
+ ...options.headers
2036
+ }
2037
+ });
2038
+ }
2039
+ /**
2040
+ * List pending series manager invites
2041
+ *
2042
+ * Lists pending series manager invites for the current user.
2043
+ */
2044
+ listPendingManagerInvites(options) {
2045
+ return (options?.client ?? this.client).get({ url: "/api/v1/series/pending-manager-invites", ...options });
2046
+ }
2047
+ /**
2048
+ * Get series by ID with all occurrences
2049
+ */
2050
+ getById(options) {
2051
+ return (options.client ?? this.client).get({ url: "/api/v1/series/{id}", ...options });
2052
+ }
2053
+ /**
2054
+ * List series attendees
2055
+ */
2056
+ listAttendees(options) {
2057
+ return (options.client ?? this.client).get({ url: "/api/v1/series/{id}/attendees", ...options });
2058
+ }
2059
+ /**
2060
+ * Add attendee to series
2061
+ */
2062
+ addAttendee(options) {
2063
+ return (options.client ?? this.client).post({
2064
+ url: "/api/v1/series/{id}/attendees",
2065
+ ...options,
2066
+ headers: {
2067
+ "Content-Type": "application/json",
2068
+ ...options.headers
2069
+ }
2070
+ });
2071
+ }
2072
+ /**
2073
+ * Bulk add attendees to series
2074
+ */
2075
+ bulkAddAttendees(options) {
2076
+ return (options.client ?? this.client).post({
2077
+ url: "/api/v1/series/{id}/attendees/bulk",
2078
+ ...options,
2079
+ headers: {
2080
+ "Content-Type": "application/json",
2081
+ ...options.headers
2082
+ }
2083
+ });
2084
+ }
2085
+ /**
2086
+ * Remove attendee from series
2087
+ */
2088
+ removeAttendee(options) {
2089
+ return (options.client ?? this.client).delete({ url: "/api/v1/series/{id}/attendees/{contact_id}", ...options });
2090
+ }
2091
+ /**
2092
+ * Update series attendee status
2093
+ */
2094
+ updateAttendeeStatus(options) {
2095
+ return (options.client ?? this.client).patch({
2096
+ url: "/api/v1/series/{id}/attendees/{contact_id}",
2097
+ ...options,
2098
+ headers: {
2099
+ "Content-Type": "application/json",
2100
+ ...options.headers
2101
+ }
2102
+ });
2103
+ }
2104
+ /**
2105
+ * Check in a series attendee
2106
+ */
2107
+ checkInAttendee(options) {
2108
+ return (options.client ?? this.client).post({
2109
+ url: "/api/v1/series/{id}/attendees/{contact_id}/check-in",
2110
+ ...options,
2111
+ headers: {
2112
+ "Content-Type": "application/json",
2113
+ ...options.headers
2114
+ }
2115
+ });
2116
+ }
2117
+ /**
2118
+ * List documents linked to series
2119
+ */
2120
+ listDocuments(options) {
2121
+ return (options.client ?? this.client).get({ url: "/api/v1/series/{id}/documents", ...options });
2122
+ }
2123
+ /**
2124
+ * Unlink document from series
2125
+ */
2126
+ removeDocument(options) {
2127
+ return (options.client ?? this.client).delete({ url: "/api/v1/series/{id}/documents/{document_id}", ...options });
2128
+ }
2129
+ /**
2130
+ * Link document to series
2131
+ */
2132
+ addDocument(options) {
2133
+ return (options.client ?? this.client).post({
2134
+ url: "/api/v1/series/{id}/documents/{document_id}",
2135
+ ...options,
2136
+ headers: {
2137
+ "Content-Type": "application/json",
2138
+ ...options.headers
2139
+ }
2140
+ });
2141
+ }
2142
+ /**
2143
+ * List cross-reference links for series
2144
+ */
2145
+ listLinks(options) {
2146
+ return (options.client ?? this.client).get({ url: "/api/v1/series/{id}/links", ...options });
2147
+ }
2148
+ /**
2149
+ * Link event to series
2150
+ */
2151
+ addLink(options) {
2152
+ return (options.client ?? this.client).post({
2153
+ url: "/api/v1/series/{id}/links",
2154
+ ...options,
2155
+ headers: {
2156
+ "Content-Type": "application/json",
2157
+ ...options.headers
2158
+ }
2159
+ });
2160
+ }
2161
+ /**
2162
+ * Remove cross-reference link from series
2163
+ */
2164
+ removeLink(options) {
2165
+ return (options.client ?? this.client).delete({ url: "/api/v1/series/{id}/links/{target_id}", ...options });
2166
+ }
2167
+ /**
2168
+ * List series milestones
2169
+ */
2170
+ listMilestones(options) {
2171
+ return (options.client ?? this.client).get({ url: "/api/v1/series/{id}/milestones", ...options });
2172
+ }
2173
+ /**
2174
+ * Add milestone to series
2175
+ */
2176
+ addMilestone(options) {
2177
+ return (options.client ?? this.client).post({
2178
+ url: "/api/v1/series/{id}/milestones",
2179
+ ...options,
2180
+ headers: {
2181
+ "Content-Type": "application/json",
2182
+ ...options.headers
2183
+ }
2184
+ });
2185
+ }
2186
+ /**
2187
+ * Remove milestone from series
2188
+ */
2189
+ removeMilestone(options) {
2190
+ return (options.client ?? this.client).delete({ url: "/api/v1/series/{id}/milestones/{milestone_event_id}", ...options });
2191
+ }
2192
+ /**
2193
+ * Update series milestone lifecycle
2194
+ */
2195
+ patchMilestoneLifecycle(options) {
2196
+ return (options.client ?? this.client).patch({
2197
+ url: "/api/v1/series/{id}/milestones/{milestone_event_id}",
2198
+ ...options,
2199
+ headers: {
2200
+ "Content-Type": "application/json",
2201
+ ...options.headers
2202
+ }
2203
+ });
2204
+ }
2205
+ /**
2206
+ * Update series milestone sequence
2207
+ */
2208
+ updateMilestone(options) {
2209
+ return (options.client ?? this.client).put({
2210
+ url: "/api/v1/series/{id}/milestones/{milestone_event_id}",
2211
+ ...options,
2212
+ headers: {
2213
+ "Content-Type": "application/json",
2214
+ ...options.headers
2215
+ }
2216
+ });
2217
+ }
2218
+ };
2219
+ var Spaces2 = class extends HeyApiClient {
2220
+ /**
2221
+ * List spaces
2222
+ */
2223
+ list(options) {
2224
+ return (options?.client ?? this.client).get({ url: "/api/v1/spaces", ...options });
2225
+ }
2226
+ /**
2227
+ * Create a space
2228
+ */
2229
+ create(options) {
2230
+ return (options.client ?? this.client).post({
2231
+ url: "/api/v1/spaces",
2232
+ ...options,
2233
+ headers: {
2234
+ "Content-Type": "application/json",
2235
+ ...options.headers
2236
+ }
2237
+ });
2238
+ }
2239
+ /**
2240
+ * List all assignable space manager permissions
2241
+ */
2242
+ managerPermissions(options) {
2243
+ return (options?.client ?? this.client).get({ url: "/api/v1/spaces/manager-permissions", ...options });
2244
+ }
2245
+ /**
2246
+ * Accept a space manager invitation
2247
+ */
2248
+ acceptManagerInvite(options) {
2249
+ return (options.client ?? this.client).post({
2250
+ url: "/api/v1/spaces/managers/accept",
2251
+ ...options,
2252
+ headers: {
2253
+ "Content-Type": "application/json",
2254
+ ...options.headers
2255
+ }
2256
+ });
2257
+ }
2258
+ /**
2259
+ * List pending space manager invitations for the current user
2260
+ */
2261
+ listPendingManagerInvites(options) {
2262
+ return (options?.client ?? this.client).get({ url: "/api/v1/spaces/managers/pending", ...options });
2263
+ }
2264
+ /**
2265
+ * Delete a space
2266
+ */
2267
+ delete(options) {
2268
+ return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}", ...options });
2269
+ }
2270
+ /**
2271
+ * Get a space
2272
+ */
2273
+ get(options) {
2274
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}", ...options });
2275
+ }
2276
+ /**
2277
+ * Partially update a space (merge-patch)
2278
+ */
2279
+ patch(options) {
2280
+ return (options.client ?? this.client).patch({
2281
+ url: "/api/v1/spaces/{id}",
2282
+ ...options,
2283
+ headers: {
2284
+ "Content-Type": "application/json",
2285
+ ...options.headers
2286
+ }
2287
+ });
2288
+ }
2289
+ /**
2290
+ * Update a space
2291
+ */
2292
+ update(options) {
2293
+ return (options.client ?? this.client).put({
2294
+ url: "/api/v1/spaces/{id}",
2295
+ ...options,
2296
+ headers: {
2297
+ "Content-Type": "application/json",
2298
+ ...options.headers
2299
+ }
2300
+ });
2301
+ }
2302
+ /**
2303
+ * List recent activity in a space
2304
+ */
2305
+ listActivity(options) {
2306
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/activity", ...options });
2307
+ }
2308
+ /**
2309
+ * List date-paginated activity logs in a space
2310
+ */
2311
+ listActivityLog(options) {
2312
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/activity-log", ...options });
2313
+ }
2314
+ /**
2315
+ * Get analytics for a space
2316
+ */
2317
+ getAnalytics(options) {
2318
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/analytics", ...options });
2319
+ }
2320
+ /**
2321
+ * List announcements in a space
2322
+ */
2323
+ listAnnouncements(options) {
2324
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/announcements", ...options });
2325
+ }
2326
+ /**
2327
+ * Link an announcement to a space
2328
+ */
2329
+ addAnnouncement(options) {
2330
+ return (options.client ?? this.client).post({
2331
+ url: "/api/v1/spaces/{id}/announcements",
2332
+ ...options,
2333
+ headers: {
2334
+ "Content-Type": "application/json",
2335
+ ...options.headers
2336
+ }
2337
+ });
2338
+ }
2339
+ /**
2340
+ * Remove an announcement from a space
2341
+ */
2342
+ removeAnnouncement(options) {
2343
+ return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/announcements/{announcement_id}", ...options });
2344
+ }
2345
+ /**
2346
+ * Archive a space
2347
+ */
2348
+ archive(options) {
2349
+ return (options.client ?? this.client).post({ url: "/api/v1/spaces/{id}/archive", ...options });
2350
+ }
2351
+ /**
2352
+ * List child spaces (sub-spaces) of a space
2353
+ */
2354
+ listChildren(options) {
2355
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/children", ...options });
2356
+ }
2357
+ /**
2358
+ * List contacts in a space
2359
+ */
2360
+ listContacts(options) {
2361
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/contacts", ...options });
2362
+ }
2363
+ /**
2364
+ * Add a contact to a space
2365
+ */
2366
+ addContact(options) {
2367
+ return (options.client ?? this.client).post({
2368
+ url: "/api/v1/spaces/{id}/contacts",
2369
+ ...options,
2370
+ headers: {
2371
+ "Content-Type": "application/json",
2372
+ ...options.headers
2373
+ }
2374
+ });
2375
+ }
2376
+ /**
2377
+ * Remove a contact from a space
2378
+ */
2379
+ removeContact(options) {
2380
+ return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/contacts/{contact_id}", ...options });
2381
+ }
2382
+ /**
2383
+ * Discard draft, keep published version
2384
+ */
2385
+ discard(options) {
2386
+ return (options.client ?? this.client).post({ url: "/api/v1/spaces/{id}/discard", ...options });
2387
+ }
2388
+ /**
2389
+ * Get draft version of a space
2390
+ */
2391
+ getDraft(options) {
2392
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/draft", ...options });
2393
+ }
2394
+ /**
2395
+ * Start editing (creates draft clone)
2396
+ */
2397
+ startEdit(options) {
2398
+ return (options.client ?? this.client).post({ url: "/api/v1/spaces/{id}/edit", ...options });
2399
+ }
2400
+ /**
2401
+ * List events in a space
2402
+ */
2403
+ listEvents(options) {
2404
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/events", ...options });
2405
+ }
2406
+ /**
2407
+ * Add an event to a space
2408
+ */
2409
+ addEvent(options) {
2410
+ return (options.client ?? this.client).post({
2411
+ url: "/api/v1/spaces/{id}/events",
2412
+ ...options,
2413
+ headers: {
2414
+ "Content-Type": "application/json",
2415
+ ...options.headers
2416
+ }
2417
+ });
2418
+ }
2419
+ /**
2420
+ * Remove an event from a space
2421
+ */
2422
+ removeEvent(options) {
2423
+ return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/events/{event_id}", ...options });
2424
+ }
2425
+ /**
2426
+ * List managers for a space
2427
+ */
2428
+ listManagers(options) {
2429
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/managers", ...options });
2430
+ }
2431
+ /**
2432
+ * Add a manager to a space
2433
+ */
2434
+ addManager(options) {
2435
+ return (options.client ?? this.client).post({
2436
+ url: "/api/v1/spaces/{id}/managers",
2437
+ ...options,
2438
+ headers: {
2439
+ "Content-Type": "application/json",
2440
+ ...options.headers
2441
+ }
2442
+ });
2443
+ }
2444
+ /**
2445
+ * Invite a user to become a space manager by email
2446
+ */
2447
+ inviteManager(options) {
2448
+ return (options.client ?? this.client).post({
2449
+ url: "/api/v1/spaces/{id}/managers/invite",
2450
+ ...options,
2451
+ headers: {
2452
+ "Content-Type": "application/json",
2453
+ ...options.headers
2454
+ }
2455
+ });
2456
+ }
2457
+ /**
2458
+ * Remove a manager from a space
2459
+ */
2460
+ removeManager(options) {
2461
+ return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/managers/{user_id}", ...options });
2462
+ }
2463
+ /**
2464
+ * Get a single space manager
2465
+ */
2466
+ getManager(options) {
2467
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/managers/{user_id}", ...options });
2468
+ }
2469
+ /**
2470
+ * Update a space manager's permissions
2471
+ */
2472
+ updateManager(options) {
2473
+ return (options.client ?? this.client).put({
2474
+ url: "/api/v1/spaces/{id}/managers/{user_id}",
2475
+ ...options,
2476
+ headers: {
2477
+ "Content-Type": "application/json",
2478
+ ...options.headers
2479
+ }
2480
+ });
2481
+ }
2482
+ /**
2483
+ * List space members
2484
+ */
2485
+ listMembers(options) {
2486
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/members", ...options });
2487
+ }
2488
+ /**
2489
+ * Add a member to a space
2490
+ */
2491
+ addMember(options) {
2492
+ return (options.client ?? this.client).post({
2493
+ url: "/api/v1/spaces/{id}/members",
2494
+ ...options,
2495
+ headers: {
2496
+ "Content-Type": "application/json",
2497
+ ...options.headers
2498
+ }
2499
+ });
2500
+ }
2501
+ /**
2502
+ * Remove a member from a space
2503
+ */
2504
+ removeMember(options) {
2505
+ return (options.client ?? this.client).delete({ url: "/api/v1/spaces/{id}/members/{user_id}", ...options });
2506
+ }
2507
+ /**
2508
+ * Publish a space
2509
+ *
2510
+ * Publishes a new draft or promotes the current draft changes for a published space. Optionally sends a notification to the creator by providing a JSON body with notification options.
2511
+ */
2512
+ publish(options) {
2513
+ return (options.client ?? this.client).post({
2514
+ url: "/api/v1/spaces/{id}/publish",
2515
+ ...options,
2516
+ headers: {
2517
+ "Content-Type": "application/json",
2518
+ ...options.headers
2519
+ }
2520
+ });
2521
+ }
2522
+ /**
2523
+ * Get settings for a space
2524
+ */
2525
+ getSettings(options) {
2526
+ return (options.client ?? this.client).get({ url: "/api/v1/spaces/{id}/settings", ...options });
2527
+ }
2528
+ /**
2529
+ * Partially update settings for a space
2530
+ */
2531
+ patchSettings(options) {
2532
+ return (options.client ?? this.client).patch({
2533
+ url: "/api/v1/spaces/{id}/settings",
2534
+ ...options,
2535
+ headers: {
2536
+ "Content-Type": "application/json",
2537
+ ...options.headers
2538
+ }
2539
+ });
2540
+ }
2541
+ };
2542
+ var _Linebundle = class _Linebundle extends HeyApiClient {
2543
+ constructor(args) {
2544
+ super(args);
2545
+ _Linebundle.__registry.set(this, args?.key);
2546
+ }
2547
+ /**
2548
+ * Liveness check
2549
+ *
2550
+ * Returns 200 if the process is running.
2551
+ */
2552
+ liveness(options) {
2553
+ return (options?.client ?? this.client).get({ url: "/health", ...options });
2554
+ }
2555
+ /**
2556
+ * Readiness check
2557
+ *
2558
+ * Returns 200 if all downstream dependencies are healthy.
2559
+ */
2560
+ readiness(options) {
2561
+ return (options?.client ?? this.client).get({ url: "/health/ready", ...options });
2562
+ }
2563
+ get analytics() {
2564
+ return this._analytics ?? (this._analytics = new Analytics({ client: this.client }));
2565
+ }
2566
+ get announcements() {
2567
+ return this._announcements ?? (this._announcements = new Announcements({ client: this.client }));
2568
+ }
2569
+ get audit() {
2570
+ return this._audit ?? (this._audit = new Audit({ client: this.client }));
2571
+ }
2572
+ get auth() {
2573
+ return this._auth ?? (this._auth = new Auth({ client: this.client }));
2574
+ }
2575
+ get automation() {
2576
+ return this._automation ?? (this._automation = new Automation({ client: this.client }));
2577
+ }
2578
+ get bookings() {
2579
+ return this._bookings ?? (this._bookings = new Bookings({ client: this.client }));
2580
+ }
2581
+ get contacts() {
2582
+ return this._contacts ?? (this._contacts = new Contacts({ client: this.client }));
2583
+ }
2584
+ get credentials() {
2585
+ return this._credentials ?? (this._credentials = new Credentials({ client: this.client }));
2586
+ }
2587
+ get events() {
2588
+ return this._events ?? (this._events = new Events({ client: this.client }));
2589
+ }
2590
+ get integrations() {
2591
+ return this._integrations ?? (this._integrations = new Integrations({ client: this.client }));
2592
+ }
2593
+ get organizations() {
2594
+ return this._organizations ?? (this._organizations = new Organizations({ client: this.client }));
2595
+ }
2596
+ get permissions() {
2597
+ return this._permissions ?? (this._permissions = new Permissions({ client: this.client }));
2598
+ }
2599
+ get places() {
2600
+ return this._places ?? (this._places = new Places({ client: this.client }));
2601
+ }
2602
+ get profiles() {
2603
+ return this._profiles ?? (this._profiles = new Profiles({ client: this.client }));
2604
+ }
2605
+ get public() {
2606
+ return this._public ?? (this._public = new Public({ client: this.client }));
2607
+ }
2608
+ get series() {
2609
+ return this._series ?? (this._series = new Series({ client: this.client }));
2610
+ }
2611
+ get spaces() {
2612
+ return this._spaces ?? (this._spaces = new Spaces2({ client: this.client }));
2613
+ }
2614
+ };
2615
+ _Linebundle.__registry = new HeyApiRegistry();
2616
+ var Linebundle = _Linebundle;
2617
+
2618
+ // node_modules/@hey-api/client-fetch/dist/index.js
2619
+ var A = async (s, r) => {
2620
+ let e = typeof r == "function" ? await r(s) : r;
2621
+ if (e) return s.scheme === "bearer" ? `Bearer ${e}` : s.scheme === "basic" ? `Basic ${btoa(e)}` : e;
2622
+ };
2623
+ var O = { bodySerializer: (s) => JSON.stringify(s, (r, e) => typeof e == "bigint" ? e.toString() : e) };
2624
+ var U = { $body_: "body", $headers_: "headers", $path_: "path", $query_: "query" };
2625
+ var D = Object.entries(U);
2626
+ var B = (s) => {
2627
+ switch (s) {
2628
+ case "label":
2629
+ return ".";
2630
+ case "matrix":
2631
+ return ";";
2632
+ case "simple":
2633
+ return ",";
2634
+ default:
2635
+ return "&";
2636
+ }
2637
+ };
2638
+ var N = (s) => {
2639
+ switch (s) {
2640
+ case "form":
2641
+ return ",";
2642
+ case "pipeDelimited":
2643
+ return "|";
2644
+ case "spaceDelimited":
2645
+ return "%20";
2646
+ default:
2647
+ return ",";
2648
+ }
2649
+ };
2650
+ var Q = (s) => {
2651
+ switch (s) {
2652
+ case "label":
2653
+ return ".";
2654
+ case "matrix":
2655
+ return ";";
2656
+ case "simple":
2657
+ return ",";
2658
+ default:
2659
+ return "&";
2660
+ }
2661
+ };
2662
+ var S = ({ allowReserved: s, explode: r, name: e, style: a, value: i }) => {
2663
+ if (!r) {
2664
+ let t = (s ? i : i.map((l) => encodeURIComponent(l))).join(N(a));
2665
+ switch (a) {
2666
+ case "label":
2667
+ return `.${t}`;
2668
+ case "matrix":
2669
+ return `;${e}=${t}`;
2670
+ case "simple":
2671
+ return t;
2672
+ default:
2673
+ return `${e}=${t}`;
2674
+ }
2675
+ }
2676
+ let o = B(a), n = i.map((t) => a === "label" || a === "simple" ? s ? t : encodeURIComponent(t) : m({ allowReserved: s, name: e, value: t })).join(o);
2677
+ return a === "label" || a === "matrix" ? o + n : n;
2678
+ };
2679
+ var m = ({ allowReserved: s, name: r, value: e }) => {
2680
+ if (e == null) return "";
2681
+ if (typeof e == "object") throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");
2682
+ return `${r}=${s ? e : encodeURIComponent(e)}`;
2683
+ };
2684
+ var q = ({ allowReserved: s, explode: r, name: e, style: a, value: i, valueOnly: o }) => {
2685
+ if (i instanceof Date) return o ? i.toISOString() : `${e}=${i.toISOString()}`;
2686
+ if (a !== "deepObject" && !r) {
2687
+ let l = [];
2688
+ Object.entries(i).forEach(([p, d]) => {
2689
+ l = [...l, p, s ? d : encodeURIComponent(d)];
2690
+ });
2691
+ let u = l.join(",");
2692
+ switch (a) {
2693
+ case "form":
2694
+ return `${e}=${u}`;
2695
+ case "label":
2696
+ return `.${u}`;
2697
+ case "matrix":
2698
+ return `;${e}=${u}`;
2699
+ default:
2700
+ return u;
2701
+ }
2702
+ }
2703
+ let n = Q(a), t = Object.entries(i).map(([l, u]) => m({ allowReserved: s, name: a === "deepObject" ? `${e}[${l}]` : l, value: u })).join(n);
2704
+ return a === "label" || a === "matrix" ? n + t : t;
2705
+ };
2706
+ var J = /\{[^{}]+\}/g;
2707
+ var M = ({ path: s, url: r }) => {
2708
+ let e = r, a = r.match(J);
2709
+ if (a) for (let i of a) {
2710
+ let o = false, n = i.substring(1, i.length - 1), t = "simple";
2711
+ n.endsWith("*") && (o = true, n = n.substring(0, n.length - 1)), n.startsWith(".") ? (n = n.substring(1), t = "label") : n.startsWith(";") && (n = n.substring(1), t = "matrix");
2712
+ let l = s[n];
2713
+ if (l == null) continue;
2714
+ if (Array.isArray(l)) {
2715
+ e = e.replace(i, S({ explode: o, name: n, style: t, value: l }));
2716
+ continue;
2717
+ }
2718
+ if (typeof l == "object") {
2719
+ e = e.replace(i, q({ explode: o, name: n, style: t, value: l, valueOnly: true }));
2720
+ continue;
2721
+ }
2722
+ if (t === "matrix") {
2723
+ e = e.replace(i, `;${m({ name: n, value: l })}`);
2724
+ continue;
2725
+ }
2726
+ let u = encodeURIComponent(t === "label" ? `.${l}` : l);
2727
+ e = e.replace(i, u);
2728
+ }
2729
+ return e;
2730
+ };
2731
+ var k = ({ allowReserved: s, array: r, object: e } = {}) => (i) => {
2732
+ let o = [];
2733
+ if (i && typeof i == "object") for (let n in i) {
2734
+ let t = i[n];
2735
+ if (t != null) if (Array.isArray(t)) {
2736
+ let l = S({ allowReserved: s, explode: true, name: n, style: "form", value: t, ...r });
2737
+ l && o.push(l);
2738
+ } else if (typeof t == "object") {
2739
+ let l = q({ allowReserved: s, explode: true, name: n, style: "deepObject", value: t, ...e });
2740
+ l && o.push(l);
2741
+ } else {
2742
+ let l = m({ allowReserved: s, name: n, value: t });
2743
+ l && o.push(l);
2744
+ }
2745
+ }
2746
+ return o.join("&");
2747
+ };
2748
+ var E = (s) => {
2749
+ if (!s) return "stream";
2750
+ let r = s.split(";")[0]?.trim();
2751
+ if (r) {
2752
+ if (r.startsWith("application/json") || r.endsWith("+json")) return "json";
2753
+ if (r === "multipart/form-data") return "formData";
2754
+ if (["application/", "audio/", "image/", "video/"].some((e) => r.startsWith(e))) return "blob";
2755
+ if (r.startsWith("text/")) return "text";
2756
+ }
2757
+ };
2758
+ var $ = async ({ security: s, ...r }) => {
2759
+ for (let e of s) {
2760
+ let a = await A(e, r.auth);
2761
+ if (!a) continue;
2762
+ let i = e.name ?? "Authorization";
2763
+ switch (e.in) {
2764
+ case "query":
2765
+ r.query || (r.query = {}), r.query[i] = a;
2766
+ break;
2767
+ case "cookie":
2768
+ r.headers.append("Cookie", `${i}=${a}`);
2769
+ break;
2770
+ case "header":
2771
+ default:
2772
+ r.headers.set(i, a);
2773
+ break;
2774
+ }
2775
+ return;
2776
+ }
2777
+ };
2778
+ var C = (s) => L({ baseUrl: s.baseUrl, path: s.path, query: s.query, querySerializer: typeof s.querySerializer == "function" ? s.querySerializer : k(s.querySerializer), url: s.url });
2779
+ var L = ({ baseUrl: s, path: r, query: e, querySerializer: a, url: i }) => {
2780
+ let o = i.startsWith("/") ? i : `/${i}`, n = (s ?? "") + o;
2781
+ r && (n = M({ path: r, url: n }));
2782
+ let t = e ? a(e) : "";
2783
+ return t.startsWith("?") && (t = t.substring(1)), t && (n += `?${t}`), n;
2784
+ };
2785
+ var x = (s, r) => {
2786
+ let e = { ...s, ...r };
2787
+ return e.baseUrl?.endsWith("/") && (e.baseUrl = e.baseUrl.substring(0, e.baseUrl.length - 1)), e.headers = j(s.headers, r.headers), e;
2788
+ };
2789
+ var j = (...s) => {
2790
+ let r = new Headers();
2791
+ for (let e of s) {
2792
+ if (!e || typeof e != "object") continue;
2793
+ let a = e instanceof Headers ? e.entries() : Object.entries(e);
2794
+ for (let [i, o] of a) if (o === null) r.delete(i);
2795
+ else if (Array.isArray(o)) for (let n of o) r.append(i, n);
2796
+ else o !== void 0 && r.set(i, typeof o == "object" ? JSON.stringify(o) : o);
2797
+ }
2798
+ return r;
2799
+ };
2800
+ var g = class {
2801
+ constructor() {
2802
+ __publicField(this, "_fns");
2803
+ this._fns = [];
2804
+ }
2805
+ clear() {
2806
+ this._fns = [];
2807
+ }
2808
+ getInterceptorIndex(r) {
2809
+ return typeof r == "number" ? this._fns[r] ? r : -1 : this._fns.indexOf(r);
2810
+ }
2811
+ exists(r) {
2812
+ let e = this.getInterceptorIndex(r);
2813
+ return !!this._fns[e];
2814
+ }
2815
+ eject(r) {
2816
+ let e = this.getInterceptorIndex(r);
2817
+ this._fns[e] && (this._fns[e] = null);
2818
+ }
2819
+ update(r, e) {
2820
+ let a = this.getInterceptorIndex(r);
2821
+ return this._fns[a] ? (this._fns[a] = e, r) : false;
2822
+ }
2823
+ use(r) {
2824
+ return this._fns = [...this._fns, r], this._fns.length - 1;
2825
+ }
2826
+ };
2827
+ var v = () => ({ error: new g(), request: new g(), response: new g() });
2828
+ var V = k({ allowReserved: false, array: { explode: true, style: "form" }, object: { explode: true, style: "deepObject" } });
2829
+ var F = { "Content-Type": "application/json" };
2830
+ var w = (s = {}) => ({ ...O, headers: F, parseAs: "auto", querySerializer: V, ...s });
2831
+ var G = (s = {}) => {
2832
+ let r = x(w(), s), e = () => ({ ...r }), a = (n) => (r = x(r, n), e()), i = v(), o = async (n) => {
2833
+ let t = { ...r, ...n, fetch: n.fetch ?? r.fetch ?? globalThis.fetch, headers: j(r.headers, n.headers) };
2834
+ t.security && await $({ ...t, security: t.security }), t.body && t.bodySerializer && (t.body = t.bodySerializer(t.body)), (t.body === void 0 || t.body === "") && t.headers.delete("Content-Type");
2835
+ let l = C(t), u = { redirect: "follow", ...t }, p = new Request(l, u);
2836
+ for (let f of i.request._fns) f && (p = await f(p, t));
2837
+ let d = t.fetch, c = await d(p);
2838
+ for (let f of i.response._fns) f && (c = await f(c, p, t));
2839
+ let b = { request: p, response: c };
2840
+ if (c.ok) {
2841
+ if (c.status === 204 || c.headers.get("Content-Length") === "0") return t.responseStyle === "data" ? {} : { data: {}, ...b };
2842
+ let f = (t.parseAs === "auto" ? E(c.headers.get("Content-Type")) : t.parseAs) ?? "json";
2843
+ if (f === "stream") return t.responseStyle === "data" ? c.body : { data: c.body, ...b };
2844
+ let h = await c[f]();
2845
+ return f === "json" && (t.responseValidator && await t.responseValidator(h), t.responseTransformer && (h = await t.responseTransformer(h))), t.responseStyle === "data" ? h : { data: h, ...b };
2846
+ }
2847
+ let R = await c.text();
2848
+ try {
2849
+ R = JSON.parse(R);
2850
+ } catch {
2851
+ }
2852
+ let y = R;
2853
+ for (let f of i.error._fns) f && (y = await f(R, c, p, t));
2854
+ if (y = y || {}, t.throwOnError) throw y;
2855
+ return t.responseStyle === "data" ? void 0 : { error: y, ...b };
2856
+ };
2857
+ return { buildUrl: C, connect: (n) => o({ ...n, method: "CONNECT" }), delete: (n) => o({ ...n, method: "DELETE" }), get: (n) => o({ ...n, method: "GET" }), getConfig: e, head: (n) => o({ ...n, method: "HEAD" }), interceptors: i, options: (n) => o({ ...n, method: "OPTIONS" }), patch: (n) => o({ ...n, method: "PATCH" }), post: (n) => o({ ...n, method: "POST" }), put: (n) => o({ ...n, method: "PUT" }), request: o, setConfig: a, trace: (n) => o({ ...n, method: "TRACE" }) };
2858
+ };
2859
+
2860
+ // src/create.ts
2861
+ function createLinebundle({
2862
+ token,
2863
+ orgId,
2864
+ baseUrl
2865
+ }) {
2866
+ return new Linebundle({
2867
+ client: G({
2868
+ baseUrl: baseUrl ?? "https://api.linebundle.com",
2869
+ headers: {
2870
+ Authorization: `Bearer ${token}`,
2871
+ ...orgId ? { "X-Org-ID": orgId } : {}
2872
+ }
2873
+ })
2874
+ });
2875
+ }
2876
+ export {
2877
+ Analytics,
2878
+ Announcements,
2879
+ Announcements2,
2880
+ Audit,
2881
+ Auth,
2882
+ Automation,
2883
+ Bookings,
2884
+ Contacts,
2885
+ Credentials,
2886
+ Events,
2887
+ Events2,
2888
+ Integrations,
2889
+ Invites,
2890
+ Linebundle,
2891
+ Me,
2892
+ Organizations,
2893
+ Permissions,
2894
+ Places,
2895
+ Profiles,
2896
+ Public,
2897
+ Series,
2898
+ Spaces,
2899
+ Spaces2,
2900
+ Zitadel,
2901
+ client,
2902
+ createLinebundle
2903
+ };
3
2904
  //# sourceMappingURL=index.js.map