@datviet/nbp-sdk 0.0.317

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 (74) hide show
  1. package/README.md +121 -0
  2. package/auth.d.ts +54 -0
  3. package/auth.js +213 -0
  4. package/client.d.ts +7 -0
  5. package/client.js +25 -0
  6. package/gen/client/client.gen.d.ts +2 -0
  7. package/gen/client/client.gen.js +165 -0
  8. package/gen/client/index.d.ts +7 -0
  9. package/gen/client/index.js +5 -0
  10. package/gen/client/types.gen.d.ts +127 -0
  11. package/gen/client/types.gen.js +2 -0
  12. package/gen/client/utils.gen.d.ts +38 -0
  13. package/gen/client/utils.gen.js +226 -0
  14. package/gen/client.gen.d.ts +12 -0
  15. package/gen/client.gen.js +5 -0
  16. package/gen/core/auth.gen.d.ts +18 -0
  17. package/gen/core/auth.gen.js +14 -0
  18. package/gen/core/bodySerializer.gen.d.ts +17 -0
  19. package/gen/core/bodySerializer.gen.js +57 -0
  20. package/gen/core/params.gen.d.ts +33 -0
  21. package/gen/core/params.gen.js +89 -0
  22. package/gen/core/pathSerializer.gen.d.ts +33 -0
  23. package/gen/core/pathSerializer.gen.js +106 -0
  24. package/gen/core/serverSentEvents.gen.d.ts +59 -0
  25. package/gen/core/serverSentEvents.gen.js +117 -0
  26. package/gen/core/types.gen.d.ts +78 -0
  27. package/gen/core/types.gen.js +2 -0
  28. package/gen/core/utils.gen.d.ts +14 -0
  29. package/gen/core/utils.gen.js +69 -0
  30. package/gen/sdk.gen.d.ts +403 -0
  31. package/gen/sdk.gen.js +881 -0
  32. package/gen/types.gen.d.ts +3372 -0
  33. package/gen/types.gen.js +2 -0
  34. package/index.d.ts +10 -0
  35. package/index.js +16 -0
  36. package/package.json +47 -0
  37. package/server.d.ts +23 -0
  38. package/server.js +94 -0
  39. package/v2/client.d.ts +7 -0
  40. package/v2/client.js +27 -0
  41. package/v2/gen/client/client.gen.d.ts +2 -0
  42. package/v2/gen/client/client.gen.js +225 -0
  43. package/v2/gen/client/index.d.ts +8 -0
  44. package/v2/gen/client/index.js +6 -0
  45. package/v2/gen/client/types.gen.d.ts +117 -0
  46. package/v2/gen/client/types.gen.js +2 -0
  47. package/v2/gen/client/utils.gen.d.ts +33 -0
  48. package/v2/gen/client/utils.gen.js +226 -0
  49. package/v2/gen/client.gen.d.ts +12 -0
  50. package/v2/gen/client.gen.js +3 -0
  51. package/v2/gen/core/auth.gen.d.ts +18 -0
  52. package/v2/gen/core/auth.gen.js +14 -0
  53. package/v2/gen/core/bodySerializer.gen.d.ts +25 -0
  54. package/v2/gen/core/bodySerializer.gen.js +57 -0
  55. package/v2/gen/core/params.gen.d.ts +43 -0
  56. package/v2/gen/core/params.gen.js +102 -0
  57. package/v2/gen/core/pathSerializer.gen.d.ts +33 -0
  58. package/v2/gen/core/pathSerializer.gen.js +106 -0
  59. package/v2/gen/core/queryKeySerializer.gen.d.ts +18 -0
  60. package/v2/gen/core/queryKeySerializer.gen.js +93 -0
  61. package/v2/gen/core/serverSentEvents.gen.d.ts +71 -0
  62. package/v2/gen/core/serverSentEvents.gen.js +131 -0
  63. package/v2/gen/core/types.gen.d.ts +78 -0
  64. package/v2/gen/core/types.gen.js +2 -0
  65. package/v2/gen/core/utils.gen.d.ts +19 -0
  66. package/v2/gen/core/utils.gen.js +87 -0
  67. package/v2/gen/sdk.gen.d.ts +2959 -0
  68. package/v2/gen/sdk.gen.js +4537 -0
  69. package/v2/gen/types.gen.d.ts +9316 -0
  70. package/v2/gen/types.gen.js +2 -0
  71. package/v2/index.d.ts +10 -0
  72. package/v2/index.js +16 -0
  73. package/v2/server.d.ts +23 -0
  74. package/v2/server.js +94 -0
@@ -0,0 +1,4537 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client } from "./client.gen.js";
3
+ import { buildClientParams } from "./client/index.js";
4
+ class HeyApiClient {
5
+ client;
6
+ constructor(args) {
7
+ this.client = args?.client ?? client;
8
+ }
9
+ }
10
+ class HeyApiRegistry {
11
+ defaultKey = "default";
12
+ instances = new Map();
13
+ get(key) {
14
+ const instance = this.instances.get(key ?? this.defaultKey);
15
+ if (!instance) {
16
+ throw new Error(`No SDK client found. Create one with "new OpencodeClient()" to fix this error.`);
17
+ }
18
+ return instance;
19
+ }
20
+ set(value, key) {
21
+ this.instances.set(key ?? this.defaultKey, value);
22
+ }
23
+ }
24
+ export class Global extends HeyApiClient {
25
+ /**
26
+ * Get health
27
+ *
28
+ * Get health information about the NBP server.
29
+ */
30
+ health(options) {
31
+ return (options?.client ?? this.client).get({
32
+ url: "/global/health",
33
+ ...options,
34
+ });
35
+ }
36
+ /**
37
+ * Get global events
38
+ *
39
+ * Subscribe to global events from the NBP system using server-sent events.
40
+ */
41
+ event(options) {
42
+ return (options?.client ?? this.client).sse.get({
43
+ url: "/global/event",
44
+ ...options,
45
+ });
46
+ }
47
+ /**
48
+ * Dispose instance
49
+ *
50
+ * Clean up and dispose all NBP instances, releasing all resources.
51
+ */
52
+ dispose(options) {
53
+ return (options?.client ?? this.client).post({
54
+ url: "/global/dispose",
55
+ ...options,
56
+ });
57
+ }
58
+ }
59
+ export class ApiKeys extends HeyApiClient {
60
+ /**
61
+ * List workspace API keys
62
+ *
63
+ * List active API keys (prefix only — the raw key is never returned again)
64
+ */
65
+ list(parameters, options) {
66
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
67
+ return (options?.client ?? this.client).get({
68
+ url: "/workspaces/{id}/api-keys",
69
+ ...options,
70
+ ...params,
71
+ });
72
+ }
73
+ /**
74
+ * Create workspace API key
75
+ *
76
+ * Create an API key. The raw key is returned ONCE and cannot be retrieved later.
77
+ */
78
+ create(parameters, options) {
79
+ const params = buildClientParams([parameters], [
80
+ {
81
+ args: [
82
+ { in: "path", key: "id" },
83
+ { in: "body", key: "name" },
84
+ { in: "body", key: "role" },
85
+ ],
86
+ },
87
+ ]);
88
+ return (options?.client ?? this.client).post({
89
+ url: "/workspaces/{id}/api-keys",
90
+ ...options,
91
+ ...params,
92
+ headers: {
93
+ "Content-Type": "application/json",
94
+ ...options?.headers,
95
+ ...params.headers,
96
+ },
97
+ });
98
+ }
99
+ /**
100
+ * Revoke workspace API key
101
+ *
102
+ * Revoke an API key. Requests using it fail immediately.
103
+ */
104
+ revoke(parameters, options) {
105
+ const params = buildClientParams([parameters], [
106
+ {
107
+ args: [
108
+ { in: "path", key: "id" },
109
+ { in: "path", key: "keyId" },
110
+ ],
111
+ },
112
+ ]);
113
+ return (options?.client ?? this.client).delete({
114
+ url: "/workspaces/{id}/api-keys/{keyId}",
115
+ ...options,
116
+ ...params,
117
+ });
118
+ }
119
+ }
120
+ export class Origins extends HeyApiClient {
121
+ /**
122
+ * List allowed browser origins
123
+ *
124
+ * Origins allowed to call the API from a browser with this workspace's credentials
125
+ */
126
+ list(parameters, options) {
127
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
128
+ return (options?.client ?? this.client).get({
129
+ url: "/workspaces/{id}/integrations/origins",
130
+ ...options,
131
+ ...params,
132
+ });
133
+ }
134
+ /**
135
+ * Replace allowed browser origins
136
+ *
137
+ * Replace the whole list. Only https:// (or http:// on localhost) is accepted.
138
+ */
139
+ replace(parameters, options) {
140
+ const params = buildClientParams([parameters], [
141
+ {
142
+ args: [
143
+ { in: "path", key: "id" },
144
+ { in: "body", key: "origins" },
145
+ ],
146
+ },
147
+ ]);
148
+ return (options?.client ?? this.client).put({
149
+ url: "/workspaces/{id}/integrations/origins",
150
+ ...options,
151
+ ...params,
152
+ headers: {
153
+ "Content-Type": "application/json",
154
+ ...options?.headers,
155
+ ...params.headers,
156
+ },
157
+ });
158
+ }
159
+ }
160
+ export class Integrations extends HeyApiClient {
161
+ origins = new Origins({ client: this.client });
162
+ }
163
+ export class Workspaces extends HeyApiClient {
164
+ /**
165
+ * List workspaces
166
+ *
167
+ * Get all workspaces the current user has access to
168
+ */
169
+ list(options) {
170
+ return (options?.client ?? this.client).get({
171
+ url: "/workspaces",
172
+ ...options,
173
+ });
174
+ }
175
+ /**
176
+ * Create workspace
177
+ *
178
+ * Create a new workspace with the current user as owner
179
+ */
180
+ create(parameters, options) {
181
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "name" }] }]);
182
+ return (options?.client ?? this.client).post({
183
+ url: "/workspaces",
184
+ ...options,
185
+ ...params,
186
+ headers: {
187
+ "Content-Type": "application/json",
188
+ ...options?.headers,
189
+ ...params.headers,
190
+ },
191
+ });
192
+ }
193
+ /**
194
+ * Get workspace
195
+ *
196
+ * Get details of a specific workspace
197
+ */
198
+ get(parameters, options) {
199
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
200
+ return (options?.client ?? this.client).get({
201
+ url: "/workspaces/{id}",
202
+ ...options,
203
+ ...params,
204
+ });
205
+ }
206
+ /**
207
+ * Update workspace
208
+ *
209
+ * Update workspace name (owner/admin only)
210
+ */
211
+ update(parameters, options) {
212
+ const params = buildClientParams([parameters], [
213
+ {
214
+ args: [
215
+ { in: "path", key: "id" },
216
+ { in: "body", key: "name" },
217
+ ],
218
+ },
219
+ ]);
220
+ return (options?.client ?? this.client).patch({
221
+ url: "/workspaces/{id}",
222
+ ...options,
223
+ ...params,
224
+ headers: {
225
+ "Content-Type": "application/json",
226
+ ...options?.headers,
227
+ ...params.headers,
228
+ },
229
+ });
230
+ }
231
+ /**
232
+ * Workspace usage
233
+ *
234
+ * Plan limits and current usage (listings, clients, sessions) for a workspace
235
+ */
236
+ usage(parameters, options) {
237
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
238
+ return (options?.client ?? this.client).get({
239
+ url: "/workspaces/{id}/usage",
240
+ ...options,
241
+ ...params,
242
+ });
243
+ }
244
+ apiKeys = new ApiKeys({ client: this.client });
245
+ integrations = new Integrations({ client: this.client });
246
+ }
247
+ export class Project extends HeyApiClient {
248
+ /**
249
+ * List all projects
250
+ *
251
+ * Get a list of projects that have been opened with NBP.
252
+ */
253
+ list(parameters, options) {
254
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
255
+ return (options?.client ?? this.client).get({
256
+ url: "/project",
257
+ ...options,
258
+ ...params,
259
+ });
260
+ }
261
+ /**
262
+ * Get current project
263
+ *
264
+ * Retrieve the currently active project that NBP is working with.
265
+ */
266
+ current(parameters, options) {
267
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
268
+ return (options?.client ?? this.client).get({
269
+ url: "/project/current",
270
+ ...options,
271
+ ...params,
272
+ });
273
+ }
274
+ /**
275
+ * Update project
276
+ *
277
+ * Update project properties such as name, icon and color.
278
+ */
279
+ update(parameters, options) {
280
+ const params = buildClientParams([parameters], [
281
+ {
282
+ args: [
283
+ { in: "path", key: "projectID" },
284
+ { in: "query", key: "directory" },
285
+ { in: "body", key: "name" },
286
+ { in: "body", key: "icon" },
287
+ ],
288
+ },
289
+ ]);
290
+ return (options?.client ?? this.client).patch({
291
+ url: "/project/{projectID}",
292
+ ...options,
293
+ ...params,
294
+ headers: {
295
+ "Content-Type": "application/json",
296
+ ...options?.headers,
297
+ ...params.headers,
298
+ },
299
+ });
300
+ }
301
+ }
302
+ export class Cache extends HeyApiClient {
303
+ /**
304
+ * Invalidate subscription cache
305
+ *
306
+ * Invalidate cached subscription data for a workspace. Called by Console after Stripe webhook.
307
+ */
308
+ invalidate(parameters, options) {
309
+ const params = buildClientParams([parameters], [
310
+ {
311
+ args: [
312
+ { in: "query", key: "directory" },
313
+ { in: "body", key: "workspaceId" },
314
+ ],
315
+ },
316
+ ]);
317
+ return (options?.client ?? this.client).post({
318
+ url: "/internal/cache/invalidate",
319
+ ...options,
320
+ ...params,
321
+ headers: {
322
+ "Content-Type": "application/json",
323
+ ...options?.headers,
324
+ ...params.headers,
325
+ },
326
+ });
327
+ }
328
+ /**
329
+ * Invalidate all subscription caches
330
+ *
331
+ * Clear all cached subscription data. Use sparingly.
332
+ */
333
+ invalidateAll(parameters, options) {
334
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
335
+ return (options?.client ?? this.client).post({
336
+ url: "/internal/cache/invalidate-all",
337
+ ...options,
338
+ ...params,
339
+ });
340
+ }
341
+ /**
342
+ * Get cache statistics
343
+ *
344
+ * Get subscription cache statistics for debugging.
345
+ */
346
+ stats(parameters, options) {
347
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
348
+ return (options?.client ?? this.client).get({
349
+ url: "/internal/cache/stats",
350
+ ...options,
351
+ ...params,
352
+ });
353
+ }
354
+ }
355
+ export class Accounts extends HeyApiClient {
356
+ /**
357
+ * List all accounts
358
+ *
359
+ * List all accounts with features. Used by Console admin.
360
+ */
361
+ list(parameters, options) {
362
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
363
+ return (options?.client ?? this.client).get({
364
+ url: "/internal/accounts",
365
+ ...options,
366
+ ...params,
367
+ });
368
+ }
369
+ /**
370
+ * Update account features
371
+ *
372
+ * Toggle account features (outTrinh, etc.). Used by Console admin.
373
+ */
374
+ updateFeatures(parameters, options) {
375
+ const params = buildClientParams([parameters], [
376
+ {
377
+ args: [
378
+ { in: "path", key: "id" },
379
+ { in: "query", key: "directory" },
380
+ { in: "body", key: "outTrinh" },
381
+ ],
382
+ },
383
+ ]);
384
+ return (options?.client ?? this.client).put({
385
+ url: "/internal/accounts/{id}/features",
386
+ ...options,
387
+ ...params,
388
+ headers: {
389
+ "Content-Type": "application/json",
390
+ ...options?.headers,
391
+ ...params.headers,
392
+ },
393
+ });
394
+ }
395
+ }
396
+ export class Internal extends HeyApiClient {
397
+ /**
398
+ * Email lifecycle segments
399
+ *
400
+ * Users bucketed by map-access expiry (VN days): 1Y at -14/-3/-1, 1M/3M at -3, trial expired yesterday. Called daily by the Ankapong email cron.
401
+ */
402
+ emailSegments(parameters, options) {
403
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
404
+ return (options?.client ?? this.client).get({
405
+ url: "/internal/email-segments",
406
+ ...options,
407
+ ...params,
408
+ });
409
+ }
410
+ cache = new Cache({ client: this.client });
411
+ accounts = new Accounts({ client: this.client });
412
+ }
413
+ export class Listings extends HeyApiClient {
414
+ /**
415
+ * Get listings statistics
416
+ *
417
+ * Get aggregate statistics about listings
418
+ */
419
+ stats(parameters, options) {
420
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
421
+ return (options?.client ?? this.client).get({
422
+ url: "/nbp/listings/stats",
423
+ ...options,
424
+ ...params,
425
+ });
426
+ }
427
+ /**
428
+ * List listings
429
+ *
430
+ * Get listings with optional filters for category, price range, area, etc.
431
+ */
432
+ list(parameters, options) {
433
+ const params = buildClientParams([parameters], [
434
+ {
435
+ args: [
436
+ { in: "query", key: "directory" },
437
+ { in: "query", key: "propertyId" },
438
+ { in: "query", key: "status" },
439
+ { in: "query", key: "minPrice" },
440
+ { in: "query", key: "maxPrice" },
441
+ { in: "query", key: "ward" },
442
+ { in: "query", key: "provinceId" },
443
+ { in: "query", key: "districtId" },
444
+ { in: "query", key: "wardId" },
445
+ { in: "query", key: "category" },
446
+ { in: "query", key: "property_type" },
447
+ { in: "query", key: "location_type" },
448
+ { in: "query", key: "legal_status" },
449
+ { in: "query", key: "building_condition" },
450
+ { in: "query", key: "furnishing_status" },
451
+ { in: "query", key: "facing_direction" },
452
+ { in: "query", key: "planning_status" },
453
+ { in: "query", key: "district" },
454
+ { in: "query", key: "street" },
455
+ { in: "query", key: "minArea" },
456
+ { in: "query", key: "maxArea" },
457
+ { in: "query", key: "bedrooms" },
458
+ { in: "query", key: "bathrooms" },
459
+ { in: "query", key: "floors" },
460
+ { in: "query", key: "minWidth" },
461
+ { in: "query", key: "maxWidth" },
462
+ { in: "query", key: "minLength" },
463
+ { in: "query", key: "maxLength" },
464
+ { in: "query", key: "createdBy" },
465
+ { in: "query", key: "updatedAt" },
466
+ { in: "query", key: "updatedWithinDays" },
467
+ { in: "query", key: "phone" },
468
+ { in: "query", key: "priceDirection" },
469
+ { in: "query", key: "hasPhotos" },
470
+ { in: "query", key: "source" },
471
+ { in: "query", key: "search" },
472
+ { in: "query", key: "sortBy" },
473
+ { in: "query", key: "sortDirection" },
474
+ { in: "query", key: "limit" },
475
+ { in: "query", key: "offset" },
476
+ { in: "query", key: "bboxMinLat" },
477
+ { in: "query", key: "bboxMaxLat" },
478
+ { in: "query", key: "bboxMinLon" },
479
+ { in: "query", key: "bboxMaxLon" },
480
+ ],
481
+ },
482
+ ]);
483
+ return (options?.client ?? this.client).get({
484
+ url: "/nbp/listings",
485
+ ...options,
486
+ ...params,
487
+ });
488
+ }
489
+ /**
490
+ * Create listing
491
+ *
492
+ * Create a new property listing
493
+ */
494
+ create(parameters, options) {
495
+ const params = buildClientParams([parameters], [
496
+ {
497
+ args: [
498
+ { in: "query", key: "directory" },
499
+ { in: "body", key: "propertyId" },
500
+ { in: "body", key: "code" },
501
+ { in: "body", key: "price" },
502
+ { in: "body", key: "openPrice" },
503
+ { in: "body", key: "ward" },
504
+ { in: "body", key: "status" },
505
+ { in: "body", key: "tags" },
506
+ { in: "body", key: "contacts" },
507
+ { in: "body", key: "createdAt" },
508
+ { in: "body", key: "updatedAt" },
509
+ { in: "body", key: "createdBy" },
510
+ { in: "body", key: "divisionId" },
511
+ { in: "body", key: "oldDivisionId" },
512
+ { in: "body", key: "provinceId" },
513
+ { in: "body", key: "districtId" },
514
+ { in: "body", key: "wardId" },
515
+ ],
516
+ },
517
+ ]);
518
+ return (options?.client ?? this.client).post({
519
+ url: "/nbp/listings",
520
+ ...options,
521
+ ...params,
522
+ headers: {
523
+ "Content-Type": "application/json",
524
+ ...options?.headers,
525
+ ...params.headers,
526
+ },
527
+ });
528
+ }
529
+ /**
530
+ * Get listing geo points
531
+ *
532
+ * Columnar geo data for map pins. Returns all geocoded listings.
533
+ */
534
+ geo(parameters, options) {
535
+ const params = buildClientParams([parameters], [
536
+ {
537
+ args: [
538
+ { in: "query", key: "directory" },
539
+ { in: "query", key: "category" },
540
+ { in: "query", key: "status" },
541
+ { in: "query", key: "property_type" },
542
+ { in: "query", key: "location_type" },
543
+ { in: "query", key: "minPrice" },
544
+ { in: "query", key: "maxPrice" },
545
+ { in: "query", key: "provinceId" },
546
+ { in: "query", key: "districtId" },
547
+ { in: "query", key: "wardId" },
548
+ { in: "query", key: "search" },
549
+ { in: "query", key: "bboxMinLat" },
550
+ { in: "query", key: "bboxMaxLat" },
551
+ { in: "query", key: "bboxMinLon" },
552
+ { in: "query", key: "bboxMaxLon" },
553
+ ],
554
+ },
555
+ ]);
556
+ return (options?.client ?? this.client).get({
557
+ url: "/nbp/listings/geo",
558
+ ...options,
559
+ ...params,
560
+ });
561
+ }
562
+ /**
563
+ * Get aggregated map clusters
564
+ *
565
+ * GROUP BY province/district/ward; returns count + AVG centroid + bounds per cell. Level chosen from zoom (province <10, district 10-12, ward ≥13).
566
+ */
567
+ clusters(parameters, options) {
568
+ const params = buildClientParams([parameters], [
569
+ {
570
+ args: [
571
+ { in: "query", key: "directory" },
572
+ { in: "query", key: "zoom" },
573
+ { in: "query", key: "category" },
574
+ { in: "query", key: "status" },
575
+ { in: "query", key: "property_type" },
576
+ { in: "query", key: "location_type" },
577
+ { in: "query", key: "minPrice" },
578
+ { in: "query", key: "maxPrice" },
579
+ { in: "query", key: "provinceId" },
580
+ { in: "query", key: "districtId" },
581
+ { in: "query", key: "wardId" },
582
+ { in: "query", key: "bboxMinLat" },
583
+ { in: "query", key: "bboxMaxLat" },
584
+ { in: "query", key: "bboxMinLon" },
585
+ { in: "query", key: "bboxMaxLon" },
586
+ ],
587
+ },
588
+ ]);
589
+ return (options?.client ?? this.client).get({
590
+ url: "/nbp/listings/clusters",
591
+ ...options,
592
+ ...params,
593
+ });
594
+ }
595
+ /**
596
+ * Get listing image URLs by codes
597
+ *
598
+ * Batch lookup full CDN URLs for listings referenced by code (e.g. TS-67106). Used by chat UI to render inline thumbnails without leaking URLs into AI context.
599
+ */
600
+ imagesByCodes(parameters, options) {
601
+ const params = buildClientParams([parameters], [
602
+ {
603
+ args: [
604
+ { in: "query", key: "directory" },
605
+ { in: "body", key: "codes" },
606
+ { in: "body", key: "size" },
607
+ ],
608
+ },
609
+ ]);
610
+ return (options?.client ?? this.client).post({
611
+ url: "/nbp/listings/images-by-codes",
612
+ ...options,
613
+ ...params,
614
+ headers: {
615
+ "Content-Type": "application/json",
616
+ ...options?.headers,
617
+ ...params.headers,
618
+ },
619
+ });
620
+ }
621
+ /**
622
+ * Delete listing
623
+ *
624
+ * Delete a listing
625
+ */
626
+ delete(parameters, options) {
627
+ const params = buildClientParams([parameters], [
628
+ {
629
+ args: [
630
+ { in: "path", key: "id" },
631
+ { in: "query", key: "directory" },
632
+ ],
633
+ },
634
+ ]);
635
+ return (options?.client ?? this.client).delete({
636
+ url: "/nbp/listings/{id}",
637
+ ...options,
638
+ ...params,
639
+ });
640
+ }
641
+ /**
642
+ * Get listing
643
+ *
644
+ * Get a single listing by ID
645
+ */
646
+ get(parameters, options) {
647
+ const params = buildClientParams([parameters], [
648
+ {
649
+ args: [
650
+ { in: "path", key: "id" },
651
+ { in: "query", key: "directory" },
652
+ ],
653
+ },
654
+ ]);
655
+ return (options?.client ?? this.client).get({
656
+ url: "/nbp/listings/{id}",
657
+ ...options,
658
+ ...params,
659
+ });
660
+ }
661
+ /**
662
+ * Update listing
663
+ *
664
+ * Update an existing listing
665
+ */
666
+ update(parameters, options) {
667
+ const params = buildClientParams([parameters], [
668
+ {
669
+ args: [
670
+ { in: "path", key: "id" },
671
+ { in: "query", key: "directory" },
672
+ { in: "body", key: "propertyId" },
673
+ { in: "body", key: "code" },
674
+ { in: "body", key: "price" },
675
+ { in: "body", key: "openPrice" },
676
+ { in: "body", key: "ward" },
677
+ { in: "body", key: "status" },
678
+ { in: "body", key: "tags" },
679
+ { in: "body", key: "contacts" },
680
+ { in: "body", key: "createdAt" },
681
+ { in: "body", key: "updatedAt" },
682
+ { in: "body", key: "createdBy" },
683
+ { in: "body", key: "divisionId" },
684
+ { in: "body", key: "oldDivisionId" },
685
+ { in: "body", key: "provinceId" },
686
+ { in: "body", key: "districtId" },
687
+ { in: "body", key: "wardId" },
688
+ ],
689
+ },
690
+ ]);
691
+ return (options?.client ?? this.client).put({
692
+ url: "/nbp/listings/{id}",
693
+ ...options,
694
+ ...params,
695
+ headers: {
696
+ "Content-Type": "application/json",
697
+ ...options?.headers,
698
+ ...params.headers,
699
+ },
700
+ });
701
+ }
702
+ /**
703
+ * Update listing location
704
+ *
705
+ * Set the geographic coordinates for a listing's property
706
+ */
707
+ updateLocation(parameters, options) {
708
+ const params = buildClientParams([parameters], [
709
+ {
710
+ args: [
711
+ { in: "path", key: "id" },
712
+ { in: "query", key: "directory" },
713
+ { in: "body", key: "lat" },
714
+ { in: "body", key: "lon" },
715
+ ],
716
+ },
717
+ ]);
718
+ return (options?.client ?? this.client).put({
719
+ url: "/nbp/listings/{id}/location",
720
+ ...options,
721
+ ...params,
722
+ headers: {
723
+ "Content-Type": "application/json",
724
+ ...options?.headers,
725
+ ...params.headers,
726
+ },
727
+ });
728
+ }
729
+ /**
730
+ * Unmask listing phone
731
+ *
732
+ * Reveal + persist the real phone of a masked crawler-sourced listing (owner/admin).
733
+ */
734
+ unmaskPhone(parameters, options) {
735
+ const params = buildClientParams([parameters], [
736
+ {
737
+ args: [
738
+ { in: "path", key: "id" },
739
+ { in: "query", key: "directory" },
740
+ ],
741
+ },
742
+ ]);
743
+ return (options?.client ?? this.client).post({
744
+ url: "/nbp/listings/{id}/unmask-phone",
745
+ ...options,
746
+ ...params,
747
+ });
748
+ }
749
+ /**
750
+ * Add listing interaction
751
+ *
752
+ * Add an interaction log to a listing (seller-side timeline)
753
+ */
754
+ addInteraction(parameters, options) {
755
+ const params = buildClientParams([parameters], [
756
+ {
757
+ args: [
758
+ { in: "path", key: "id" },
759
+ { in: "query", key: "directory" },
760
+ { in: "body", key: "date" },
761
+ { in: "body", key: "type" },
762
+ { in: "body", key: "with_whom" },
763
+ { in: "body", key: "notes" },
764
+ { in: "body", key: "outcome" },
765
+ { in: "body", key: "insights" },
766
+ ],
767
+ },
768
+ ]);
769
+ return (options?.client ?? this.client).post({
770
+ url: "/nbp/listings/{id}/interactions",
771
+ ...options,
772
+ ...params,
773
+ headers: {
774
+ "Content-Type": "application/json",
775
+ ...options?.headers,
776
+ ...params.headers,
777
+ },
778
+ });
779
+ }
780
+ /**
781
+ * Execute SQL query
782
+ *
783
+ * Execute a raw SQL query on the listings database
784
+ */
785
+ query(parameters, options) {
786
+ const params = buildClientParams([parameters], [
787
+ {
788
+ args: [
789
+ { in: "query", key: "directory" },
790
+ { in: "body", key: "sql" },
791
+ ],
792
+ },
793
+ ]);
794
+ return (options?.client ?? this.client).post({
795
+ url: "/nbp/listings/query",
796
+ ...options,
797
+ ...params,
798
+ headers: {
799
+ "Content-Type": "application/json",
800
+ ...options?.headers,
801
+ ...params.headers,
802
+ },
803
+ });
804
+ }
805
+ /**
806
+ * Bulk upsert listings
807
+ *
808
+ * Idempotent batch insert/update of listings. Matches existing records by tags.source.external_id (default) or code. Server normalizes enum values, runs Properties.findOrCreate for dedup, and resolves divisions automatically. Max 500 records/call.
809
+ */
810
+ bulkUpsert(parameters, options) {
811
+ const params = buildClientParams([parameters], [
812
+ {
813
+ args: [
814
+ { in: "query", key: "directory" },
815
+ { in: "body", key: "records" },
816
+ { in: "body", key: "idempotency_key" },
817
+ { in: "body", key: "dry_run" },
818
+ ],
819
+ },
820
+ ]);
821
+ return (options?.client ?? this.client).post({
822
+ url: "/nbp/listings/bulk-upsert",
823
+ ...options,
824
+ ...params,
825
+ headers: {
826
+ "Content-Type": "application/json",
827
+ ...options?.headers,
828
+ ...params.headers,
829
+ },
830
+ });
831
+ }
832
+ /**
833
+ * Find matching clients for a listing
834
+ *
835
+ * Find clients whose budget matches the listing price
836
+ */
837
+ matches(parameters, options) {
838
+ const params = buildClientParams([parameters], [
839
+ {
840
+ args: [
841
+ { in: "path", key: "id" },
842
+ { in: "query", key: "directory" },
843
+ ],
844
+ },
845
+ ]);
846
+ return (options?.client ?? this.client).get({
847
+ url: "/nbp/listings/{id}/matches",
848
+ ...options,
849
+ ...params,
850
+ });
851
+ }
852
+ /**
853
+ * Export listings data as JSON
854
+ *
855
+ * Returns masked listing data + column definitions for client-side file generation. Owner/admin only.
856
+ */
857
+ exportData(parameters, options) {
858
+ const params = buildClientParams([parameters], [
859
+ {
860
+ args: [
861
+ { in: "query", key: "directory" },
862
+ { in: "body", key: "propertyId" },
863
+ { in: "body", key: "status" },
864
+ { in: "body", key: "minPrice" },
865
+ { in: "body", key: "maxPrice" },
866
+ { in: "body", key: "ward" },
867
+ { in: "body", key: "provinceId" },
868
+ { in: "body", key: "districtId" },
869
+ { in: "body", key: "wardId" },
870
+ { in: "body", key: "category" },
871
+ { in: "body", key: "property_type" },
872
+ { in: "body", key: "location_type" },
873
+ { in: "body", key: "legal_status" },
874
+ { in: "body", key: "building_condition" },
875
+ { in: "body", key: "furnishing_status" },
876
+ { in: "body", key: "facing_direction" },
877
+ { in: "body", key: "planning_status" },
878
+ { in: "body", key: "district" },
879
+ { in: "body", key: "street" },
880
+ { in: "body", key: "minArea" },
881
+ { in: "body", key: "maxArea" },
882
+ { in: "body", key: "bedrooms" },
883
+ { in: "body", key: "bathrooms" },
884
+ { in: "body", key: "floors" },
885
+ { in: "body", key: "minWidth" },
886
+ { in: "body", key: "maxWidth" },
887
+ { in: "body", key: "minLength" },
888
+ { in: "body", key: "maxLength" },
889
+ { in: "body", key: "createdBy" },
890
+ { in: "body", key: "updatedAt" },
891
+ { in: "body", key: "updatedWithinDays" },
892
+ { in: "body", key: "phone" },
893
+ { in: "body", key: "priceDirection" },
894
+ { in: "body", key: "hasPhotos" },
895
+ { in: "body", key: "source" },
896
+ { in: "body", key: "search" },
897
+ { in: "body", key: "sortBy" },
898
+ { in: "body", key: "sortDirection" },
899
+ { in: "body", key: "limit" },
900
+ { in: "body", key: "offset" },
901
+ { in: "body", key: "bboxMinLat" },
902
+ { in: "body", key: "bboxMaxLat" },
903
+ { in: "body", key: "bboxMinLon" },
904
+ { in: "body", key: "bboxMaxLon" },
905
+ ],
906
+ },
907
+ ]);
908
+ return (options?.client ?? this.client).post({
909
+ url: "/nbp/listings/export-data",
910
+ ...options,
911
+ ...params,
912
+ headers: {
913
+ "Content-Type": "application/json",
914
+ ...options?.headers,
915
+ ...params.headers,
916
+ },
917
+ });
918
+ }
919
+ /**
920
+ * Export listings to Excel
921
+ *
922
+ * Export listings matching filters to .xlsx file. Use mode=s3 for large datasets (returns presigned download URL).
923
+ */
924
+ export(parameters, options) {
925
+ const params = buildClientParams([parameters], [
926
+ {
927
+ args: [
928
+ { in: "query", key: "directory" },
929
+ { in: "body", key: "propertyId" },
930
+ { in: "body", key: "status" },
931
+ { in: "body", key: "minPrice" },
932
+ { in: "body", key: "maxPrice" },
933
+ { in: "body", key: "ward" },
934
+ { in: "body", key: "provinceId" },
935
+ { in: "body", key: "districtId" },
936
+ { in: "body", key: "wardId" },
937
+ { in: "body", key: "category" },
938
+ { in: "body", key: "property_type" },
939
+ { in: "body", key: "location_type" },
940
+ { in: "body", key: "legal_status" },
941
+ { in: "body", key: "building_condition" },
942
+ { in: "body", key: "furnishing_status" },
943
+ { in: "body", key: "facing_direction" },
944
+ { in: "body", key: "planning_status" },
945
+ { in: "body", key: "district" },
946
+ { in: "body", key: "street" },
947
+ { in: "body", key: "minArea" },
948
+ { in: "body", key: "maxArea" },
949
+ { in: "body", key: "bedrooms" },
950
+ { in: "body", key: "bathrooms" },
951
+ { in: "body", key: "floors" },
952
+ { in: "body", key: "minWidth" },
953
+ { in: "body", key: "maxWidth" },
954
+ { in: "body", key: "minLength" },
955
+ { in: "body", key: "maxLength" },
956
+ { in: "body", key: "createdBy" },
957
+ { in: "body", key: "updatedAt" },
958
+ { in: "body", key: "updatedWithinDays" },
959
+ { in: "body", key: "phone" },
960
+ { in: "body", key: "priceDirection" },
961
+ { in: "body", key: "hasPhotos" },
962
+ { in: "body", key: "source" },
963
+ { in: "body", key: "search" },
964
+ { in: "body", key: "sortBy" },
965
+ { in: "body", key: "sortDirection" },
966
+ { in: "body", key: "limit" },
967
+ { in: "body", key: "offset" },
968
+ { in: "body", key: "bboxMinLat" },
969
+ { in: "body", key: "bboxMaxLat" },
970
+ { in: "body", key: "bboxMinLon" },
971
+ { in: "body", key: "bboxMaxLon" },
972
+ { in: "body", key: "mode" },
973
+ ],
974
+ },
975
+ ]);
976
+ return (options?.client ?? this.client).post({
977
+ url: "/nbp/listings/export",
978
+ ...options,
979
+ ...params,
980
+ headers: {
981
+ "Content-Type": "application/json",
982
+ ...options?.headers,
983
+ ...params.headers,
984
+ },
985
+ });
986
+ }
987
+ /**
988
+ * Save custom listing tags
989
+ *
990
+ * Full replace custom listing tag definitions (admin only)
991
+ */
992
+ save(parameters, options) {
993
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
994
+ return (options?.client ?? this.client).put({
995
+ url: "/nbp/tags/listings",
996
+ ...options,
997
+ ...params,
998
+ });
999
+ }
1000
+ /**
1001
+ * Get default listing tags
1002
+ *
1003
+ * Get embedded default listing tag definitions
1004
+ */
1005
+ defaults(parameters, options) {
1006
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1007
+ return (options?.client ?? this.client).get({
1008
+ url: "/nbp/tags/listings/defaults",
1009
+ ...options,
1010
+ ...params,
1011
+ });
1012
+ }
1013
+ /**
1014
+ * Reset listing tags to defaults
1015
+ *
1016
+ * Remove custom listing tags, revert to embedded defaults (admin only)
1017
+ */
1018
+ reset(parameters, options) {
1019
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1020
+ return (options?.client ?? this.client).post({
1021
+ url: "/nbp/tags/listings/reset",
1022
+ ...options,
1023
+ ...params,
1024
+ });
1025
+ }
1026
+ /**
1027
+ * Get listing audit history
1028
+ *
1029
+ * Get audit trail for a specific listing
1030
+ */
1031
+ history(parameters, options) {
1032
+ const params = buildClientParams([parameters], [
1033
+ {
1034
+ args: [
1035
+ { in: "path", key: "id" },
1036
+ { in: "query", key: "directory" },
1037
+ ],
1038
+ },
1039
+ ]);
1040
+ return (options?.client ?? this.client).get({
1041
+ url: "/nbp/listings/{id}/history",
1042
+ ...options,
1043
+ ...params,
1044
+ });
1045
+ }
1046
+ }
1047
+ export class Properties extends HeyApiClient {
1048
+ /**
1049
+ * List properties
1050
+ *
1051
+ * Get properties with optional filters
1052
+ */
1053
+ list(parameters, options) {
1054
+ const params = buildClientParams([parameters], [
1055
+ {
1056
+ args: [
1057
+ { in: "query", key: "directory" },
1058
+ { in: "query", key: "ward" },
1059
+ { in: "query", key: "district" },
1060
+ { in: "query", key: "propertyType" },
1061
+ { in: "query", key: "search" },
1062
+ { in: "query", key: "limit" },
1063
+ { in: "query", key: "offset" },
1064
+ ],
1065
+ },
1066
+ ]);
1067
+ return (options?.client ?? this.client).get({
1068
+ url: "/nbp/properties",
1069
+ ...options,
1070
+ ...params,
1071
+ });
1072
+ }
1073
+ /**
1074
+ * Create property
1075
+ *
1076
+ * Create a new property
1077
+ */
1078
+ create(parameters, options) {
1079
+ const params = buildClientParams([parameters], [
1080
+ {
1081
+ args: [
1082
+ { in: "query", key: "directory" },
1083
+ { in: "body", key: "propertyType" },
1084
+ { in: "body", key: "district" },
1085
+ { in: "body", key: "ward" },
1086
+ { in: "body", key: "street" },
1087
+ { in: "body", key: "houseNumber" },
1088
+ { in: "body", key: "buildingName" },
1089
+ { in: "body", key: "unitNumber" },
1090
+ { in: "body", key: "lotNumber" },
1091
+ { in: "body", key: "floorNumber" },
1092
+ { in: "body", key: "roomNumber" },
1093
+ { in: "body", key: "address" },
1094
+ { in: "body", key: "tags" },
1095
+ { in: "body", key: "divisionId" },
1096
+ { in: "body", key: "oldDivisionId" },
1097
+ { in: "body", key: "geom" },
1098
+ { in: "body", key: "provinceId" },
1099
+ { in: "body", key: "districtId" },
1100
+ { in: "body", key: "wardId" },
1101
+ ],
1102
+ },
1103
+ ]);
1104
+ return (options?.client ?? this.client).post({
1105
+ url: "/nbp/properties",
1106
+ ...options,
1107
+ ...params,
1108
+ headers: {
1109
+ "Content-Type": "application/json",
1110
+ ...options?.headers,
1111
+ ...params.headers,
1112
+ },
1113
+ });
1114
+ }
1115
+ /**
1116
+ * Delete property
1117
+ *
1118
+ * Delete a property
1119
+ */
1120
+ delete(parameters, options) {
1121
+ const params = buildClientParams([parameters], [
1122
+ {
1123
+ args: [
1124
+ { in: "path", key: "id" },
1125
+ { in: "query", key: "directory" },
1126
+ ],
1127
+ },
1128
+ ]);
1129
+ return (options?.client ?? this.client).delete({
1130
+ url: "/nbp/properties/{id}",
1131
+ ...options,
1132
+ ...params,
1133
+ });
1134
+ }
1135
+ /**
1136
+ * Get property
1137
+ *
1138
+ * Get a single property by ID
1139
+ */
1140
+ get(parameters, options) {
1141
+ const params = buildClientParams([parameters], [
1142
+ {
1143
+ args: [
1144
+ { in: "path", key: "id" },
1145
+ { in: "query", key: "directory" },
1146
+ ],
1147
+ },
1148
+ ]);
1149
+ return (options?.client ?? this.client).get({
1150
+ url: "/nbp/properties/{id}",
1151
+ ...options,
1152
+ ...params,
1153
+ });
1154
+ }
1155
+ /**
1156
+ * Update property
1157
+ *
1158
+ * Update an existing property
1159
+ */
1160
+ update(parameters, options) {
1161
+ const params = buildClientParams([parameters], [
1162
+ {
1163
+ args: [
1164
+ { in: "path", key: "id" },
1165
+ { in: "query", key: "directory" },
1166
+ { in: "body", key: "propertyType" },
1167
+ { in: "body", key: "district" },
1168
+ { in: "body", key: "ward" },
1169
+ { in: "body", key: "street" },
1170
+ { in: "body", key: "houseNumber" },
1171
+ { in: "body", key: "buildingName" },
1172
+ { in: "body", key: "unitNumber" },
1173
+ { in: "body", key: "lotNumber" },
1174
+ { in: "body", key: "floorNumber" },
1175
+ { in: "body", key: "roomNumber" },
1176
+ { in: "body", key: "address" },
1177
+ { in: "body", key: "tags" },
1178
+ { in: "body", key: "divisionId" },
1179
+ { in: "body", key: "oldDivisionId" },
1180
+ { in: "body", key: "geom" },
1181
+ { in: "body", key: "geomAccuracy" },
1182
+ { in: "body", key: "provinceId" },
1183
+ { in: "body", key: "districtId" },
1184
+ { in: "body", key: "wardId" },
1185
+ ],
1186
+ },
1187
+ ]);
1188
+ return (options?.client ?? this.client).put({
1189
+ url: "/nbp/properties/{id}",
1190
+ ...options,
1191
+ ...params,
1192
+ headers: {
1193
+ "Content-Type": "application/json",
1194
+ ...options?.headers,
1195
+ ...params.headers,
1196
+ },
1197
+ });
1198
+ }
1199
+ /**
1200
+ * Get listings for property
1201
+ *
1202
+ * Get all listings (transaction history) associated with a property
1203
+ */
1204
+ listings(parameters, options) {
1205
+ const params = buildClientParams([parameters], [
1206
+ {
1207
+ args: [
1208
+ { in: "path", key: "id" },
1209
+ { in: "query", key: "directory" },
1210
+ ],
1211
+ },
1212
+ ]);
1213
+ return (options?.client ?? this.client).get({
1214
+ url: "/nbp/properties/{id}/listings",
1215
+ ...options,
1216
+ ...params,
1217
+ });
1218
+ }
1219
+ listings2 = new Listings({ client: this.client });
1220
+ }
1221
+ export class Search extends HeyApiClient {
1222
+ /**
1223
+ * Quick search for autocomplete
1224
+ *
1225
+ * Fast autocomplete search across listings and clients
1226
+ */
1227
+ quick(parameters, options) {
1228
+ const params = buildClientParams([parameters], [
1229
+ {
1230
+ args: [
1231
+ { in: "query", key: "directory" },
1232
+ { in: "query", key: "q" },
1233
+ { in: "query", key: "limit" },
1234
+ ],
1235
+ },
1236
+ ]);
1237
+ return (options?.client ?? this.client).get({
1238
+ url: "/nbp/search/quick",
1239
+ ...options,
1240
+ ...params,
1241
+ });
1242
+ }
1243
+ /**
1244
+ * Search listings
1245
+ *
1246
+ * Search listings with filters
1247
+ */
1248
+ listings(parameters, options) {
1249
+ const params = buildClientParams([parameters], [
1250
+ {
1251
+ args: [
1252
+ { in: "query", key: "directory" },
1253
+ { in: "query", key: "q" },
1254
+ { in: "query", key: "category" },
1255
+ { in: "query", key: "minPrice" },
1256
+ { in: "query", key: "maxPrice" },
1257
+ { in: "query", key: "limit" },
1258
+ { in: "query", key: "offset" },
1259
+ ],
1260
+ },
1261
+ ]);
1262
+ return (options?.client ?? this.client).get({
1263
+ url: "/nbp/search/listings",
1264
+ ...options,
1265
+ ...params,
1266
+ });
1267
+ }
1268
+ /**
1269
+ * Search clients
1270
+ *
1271
+ * Search clients with filters
1272
+ */
1273
+ clients(parameters, options) {
1274
+ const params = buildClientParams([parameters], [
1275
+ {
1276
+ args: [
1277
+ { in: "query", key: "directory" },
1278
+ { in: "query", key: "q" },
1279
+ { in: "query", key: "readiness" },
1280
+ { in: "query", key: "status" },
1281
+ { in: "query", key: "limit" },
1282
+ { in: "query", key: "offset" },
1283
+ ],
1284
+ },
1285
+ ]);
1286
+ return (options?.client ?? this.client).get({
1287
+ url: "/nbp/search/clients",
1288
+ ...options,
1289
+ ...params,
1290
+ });
1291
+ }
1292
+ /**
1293
+ * Global search
1294
+ *
1295
+ * Search across listings and clients
1296
+ */
1297
+ global(parameters, options) {
1298
+ const params = buildClientParams([parameters], [
1299
+ {
1300
+ args: [
1301
+ { in: "query", key: "directory" },
1302
+ { in: "query", key: "q" },
1303
+ { in: "query", key: "types" },
1304
+ { in: "query", key: "limit" },
1305
+ { in: "query", key: "offset" },
1306
+ ],
1307
+ },
1308
+ ]);
1309
+ return (options?.client ?? this.client).get({
1310
+ url: "/nbp/search",
1311
+ ...options,
1312
+ ...params,
1313
+ });
1314
+ }
1315
+ }
1316
+ export class Clients extends HeyApiClient {
1317
+ /**
1318
+ * Find matching listings for a client
1319
+ *
1320
+ * Find listings whose price matches the client budget
1321
+ */
1322
+ matches(parameters, options) {
1323
+ const params = buildClientParams([parameters], [
1324
+ {
1325
+ args: [
1326
+ { in: "path", key: "id" },
1327
+ { in: "query", key: "directory" },
1328
+ ],
1329
+ },
1330
+ ]);
1331
+ return (options?.client ?? this.client).get({
1332
+ url: "/nbp/clients/{id}/matches",
1333
+ ...options,
1334
+ ...params,
1335
+ });
1336
+ }
1337
+ /**
1338
+ * Get clients statistics
1339
+ *
1340
+ * Get aggregate statistics about clients
1341
+ */
1342
+ stats(parameters, options) {
1343
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1344
+ return (options?.client ?? this.client).get({
1345
+ url: "/nbp/clients/stats",
1346
+ ...options,
1347
+ ...params,
1348
+ });
1349
+ }
1350
+ /**
1351
+ * Get hot clients
1352
+ *
1353
+ * Get clients with hot readiness level
1354
+ */
1355
+ hot(parameters, options) {
1356
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1357
+ return (options?.client ?? this.client).get({
1358
+ url: "/nbp/clients/hot",
1359
+ ...options,
1360
+ ...params,
1361
+ });
1362
+ }
1363
+ /**
1364
+ * Global interactions feed
1365
+ *
1366
+ * Every interaction across the owner's clients, newest first
1367
+ */
1368
+ interactionsFeed(parameters, options) {
1369
+ const params = buildClientParams([parameters], [
1370
+ {
1371
+ args: [
1372
+ { in: "query", key: "directory" },
1373
+ { in: "query", key: "limit" },
1374
+ ],
1375
+ },
1376
+ ]);
1377
+ return (options?.client ?? this.client).get({
1378
+ url: "/nbp/clients/interactions",
1379
+ ...options,
1380
+ ...params,
1381
+ });
1382
+ }
1383
+ /**
1384
+ * List clients
1385
+ *
1386
+ * Get clients with optional filters
1387
+ */
1388
+ list(parameters, options) {
1389
+ const params = buildClientParams([parameters], [
1390
+ {
1391
+ args: [
1392
+ { in: "query", key: "directory" },
1393
+ { in: "query", key: "status" },
1394
+ { in: "query", key: "readiness" },
1395
+ { in: "query", key: "type" },
1396
+ { in: "query", key: "name" },
1397
+ { in: "query", key: "phone" },
1398
+ { in: "query", key: "source_channel" },
1399
+ { in: "query", key: "referrer" },
1400
+ { in: "query", key: "district" },
1401
+ { in: "query", key: "relatedTo" },
1402
+ { in: "query", key: "minBudget" },
1403
+ { in: "query", key: "maxBudget" },
1404
+ { in: "query", key: "search" },
1405
+ { in: "query", key: "limit" },
1406
+ { in: "query", key: "offset" },
1407
+ ],
1408
+ },
1409
+ ]);
1410
+ return (options?.client ?? this.client).get({
1411
+ url: "/nbp/clients",
1412
+ ...options,
1413
+ ...params,
1414
+ });
1415
+ }
1416
+ /**
1417
+ * Create client
1418
+ *
1419
+ * Create a new client
1420
+ */
1421
+ create(parameters, options) {
1422
+ const params = buildClientParams([parameters], [
1423
+ {
1424
+ args: [
1425
+ { in: "query", key: "directory" },
1426
+ { in: "body", key: "name" },
1427
+ { in: "body", key: "phone" },
1428
+ { in: "body", key: "type" },
1429
+ { in: "body", key: "contactId" },
1430
+ { in: "body", key: "status" },
1431
+ { in: "body", key: "readiness" },
1432
+ { in: "body", key: "tags" },
1433
+ ],
1434
+ },
1435
+ ]);
1436
+ return (options?.client ?? this.client).post({
1437
+ url: "/nbp/clients",
1438
+ ...options,
1439
+ ...params,
1440
+ headers: {
1441
+ "Content-Type": "application/json",
1442
+ ...options?.headers,
1443
+ ...params.headers,
1444
+ },
1445
+ });
1446
+ }
1447
+ /**
1448
+ * Delete client
1449
+ *
1450
+ * Delete a client
1451
+ */
1452
+ delete(parameters, options) {
1453
+ const params = buildClientParams([parameters], [
1454
+ {
1455
+ args: [
1456
+ { in: "path", key: "id" },
1457
+ { in: "query", key: "directory" },
1458
+ ],
1459
+ },
1460
+ ]);
1461
+ return (options?.client ?? this.client).delete({
1462
+ url: "/nbp/clients/{id}",
1463
+ ...options,
1464
+ ...params,
1465
+ });
1466
+ }
1467
+ /**
1468
+ * Get client
1469
+ *
1470
+ * Get a single client by ID
1471
+ */
1472
+ get(parameters, options) {
1473
+ const params = buildClientParams([parameters], [
1474
+ {
1475
+ args: [
1476
+ { in: "path", key: "id" },
1477
+ { in: "query", key: "directory" },
1478
+ ],
1479
+ },
1480
+ ]);
1481
+ return (options?.client ?? this.client).get({
1482
+ url: "/nbp/clients/{id}",
1483
+ ...options,
1484
+ ...params,
1485
+ });
1486
+ }
1487
+ /**
1488
+ * Update client
1489
+ *
1490
+ * Update an existing client
1491
+ */
1492
+ update(parameters, options) {
1493
+ const params = buildClientParams([parameters], [
1494
+ {
1495
+ args: [
1496
+ { in: "path", key: "id" },
1497
+ { in: "query", key: "directory" },
1498
+ { in: "body", key: "name" },
1499
+ { in: "body", key: "phone" },
1500
+ { in: "body", key: "type" },
1501
+ { in: "body", key: "contactId" },
1502
+ { in: "body", key: "status" },
1503
+ { in: "body", key: "readiness" },
1504
+ { in: "body", key: "tags" },
1505
+ ],
1506
+ },
1507
+ ]);
1508
+ return (options?.client ?? this.client).put({
1509
+ url: "/nbp/clients/{id}",
1510
+ ...options,
1511
+ ...params,
1512
+ headers: {
1513
+ "Content-Type": "application/json",
1514
+ ...options?.headers,
1515
+ ...params.headers,
1516
+ },
1517
+ });
1518
+ }
1519
+ /**
1520
+ * Add client interaction
1521
+ *
1522
+ * Add an interaction log to a client
1523
+ */
1524
+ addInteraction(parameters, options) {
1525
+ const params = buildClientParams([parameters], [
1526
+ {
1527
+ args: [
1528
+ { in: "path", key: "id" },
1529
+ { in: "query", key: "directory" },
1530
+ { in: "body", key: "date" },
1531
+ { in: "body", key: "type" },
1532
+ { in: "body", key: "notes" },
1533
+ { in: "body", key: "summary" },
1534
+ { in: "body", key: "insights" },
1535
+ { in: "body", key: "listing_codes" },
1536
+ ],
1537
+ },
1538
+ ]);
1539
+ return (options?.client ?? this.client).post({
1540
+ url: "/nbp/clients/{id}/interactions",
1541
+ ...options,
1542
+ ...params,
1543
+ headers: {
1544
+ "Content-Type": "application/json",
1545
+ ...options?.headers,
1546
+ ...params.headers,
1547
+ },
1548
+ });
1549
+ }
1550
+ /**
1551
+ * Export clients to Excel
1552
+ *
1553
+ * Export clients matching filters to .xlsx file
1554
+ */
1555
+ export(parameters, options) {
1556
+ const params = buildClientParams([parameters], [
1557
+ {
1558
+ args: [
1559
+ { in: "query", key: "directory" },
1560
+ { in: "body", key: "status" },
1561
+ { in: "body", key: "readiness" },
1562
+ { in: "body", key: "type" },
1563
+ { in: "body", key: "name" },
1564
+ { in: "body", key: "phone" },
1565
+ { in: "body", key: "source_channel" },
1566
+ { in: "body", key: "referrer" },
1567
+ { in: "body", key: "district" },
1568
+ { in: "body", key: "relatedTo" },
1569
+ { in: "body", key: "minBudget" },
1570
+ { in: "body", key: "maxBudget" },
1571
+ { in: "body", key: "search" },
1572
+ { in: "body", key: "limit" },
1573
+ { in: "body", key: "offset" },
1574
+ ],
1575
+ },
1576
+ ]);
1577
+ return (options?.client ?? this.client).post({
1578
+ url: "/nbp/clients/export",
1579
+ ...options,
1580
+ ...params,
1581
+ headers: {
1582
+ "Content-Type": "application/json",
1583
+ ...options?.headers,
1584
+ ...params.headers,
1585
+ },
1586
+ });
1587
+ }
1588
+ /**
1589
+ * Save custom client tags
1590
+ *
1591
+ * Full replace custom client tag definitions (admin only)
1592
+ */
1593
+ save(parameters, options) {
1594
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1595
+ return (options?.client ?? this.client).put({
1596
+ url: "/nbp/tags/clients",
1597
+ ...options,
1598
+ ...params,
1599
+ });
1600
+ }
1601
+ /**
1602
+ * Get default client tags
1603
+ *
1604
+ * Get embedded default client tag definitions
1605
+ */
1606
+ defaults(parameters, options) {
1607
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1608
+ return (options?.client ?? this.client).get({
1609
+ url: "/nbp/tags/clients/defaults",
1610
+ ...options,
1611
+ ...params,
1612
+ });
1613
+ }
1614
+ /**
1615
+ * Reset client tags to defaults
1616
+ *
1617
+ * Remove custom client tags, revert to embedded defaults (admin only)
1618
+ */
1619
+ reset(parameters, options) {
1620
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1621
+ return (options?.client ?? this.client).post({
1622
+ url: "/nbp/tags/clients/reset",
1623
+ ...options,
1624
+ ...params,
1625
+ });
1626
+ }
1627
+ /**
1628
+ * Get client audit history
1629
+ *
1630
+ * Get audit trail for a specific client
1631
+ */
1632
+ history(parameters, options) {
1633
+ const params = buildClientParams([parameters], [
1634
+ {
1635
+ args: [
1636
+ { in: "path", key: "id" },
1637
+ { in: "query", key: "directory" },
1638
+ ],
1639
+ },
1640
+ ]);
1641
+ return (options?.client ?? this.client).get({
1642
+ url: "/nbp/clients/{id}/history",
1643
+ ...options,
1644
+ ...params,
1645
+ });
1646
+ }
1647
+ }
1648
+ export class Tasks extends HeyApiClient {
1649
+ /**
1650
+ * Tasks due today + overdue
1651
+ */
1652
+ today(parameters, options) {
1653
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1654
+ return (options?.client ?? this.client).get({
1655
+ url: "/nbp/tasks/today",
1656
+ ...options,
1657
+ ...params,
1658
+ });
1659
+ }
1660
+ /**
1661
+ * List tasks
1662
+ */
1663
+ list(parameters, options) {
1664
+ const params = buildClientParams([parameters], [
1665
+ {
1666
+ args: [
1667
+ { in: "query", key: "directory" },
1668
+ { in: "query", key: "status" },
1669
+ { in: "query", key: "clientId" },
1670
+ { in: "query", key: "listingId" },
1671
+ { in: "query", key: "limit" },
1672
+ { in: "query", key: "offset" },
1673
+ ],
1674
+ },
1675
+ ]);
1676
+ return (options?.client ?? this.client).get({
1677
+ url: "/nbp/tasks",
1678
+ ...options,
1679
+ ...params,
1680
+ });
1681
+ }
1682
+ /**
1683
+ * Create task
1684
+ */
1685
+ create(parameters, options) {
1686
+ const params = buildClientParams([parameters], [
1687
+ {
1688
+ args: [
1689
+ { in: "query", key: "directory" },
1690
+ { in: "body", key: "type" },
1691
+ { in: "body", key: "title" },
1692
+ { in: "body", key: "dueAt" },
1693
+ { in: "body", key: "status" },
1694
+ { in: "body", key: "note" },
1695
+ { in: "body", key: "clientId" },
1696
+ { in: "body", key: "listingId" },
1697
+ ],
1698
+ },
1699
+ ]);
1700
+ return (options?.client ?? this.client).post({
1701
+ url: "/nbp/tasks",
1702
+ ...options,
1703
+ ...params,
1704
+ headers: {
1705
+ "Content-Type": "application/json",
1706
+ ...options?.headers,
1707
+ ...params.headers,
1708
+ },
1709
+ });
1710
+ }
1711
+ /**
1712
+ * Delete task
1713
+ */
1714
+ delete(parameters, options) {
1715
+ const params = buildClientParams([parameters], [
1716
+ {
1717
+ args: [
1718
+ { in: "path", key: "id" },
1719
+ { in: "query", key: "directory" },
1720
+ ],
1721
+ },
1722
+ ]);
1723
+ return (options?.client ?? this.client).delete({
1724
+ url: "/nbp/tasks/{id}",
1725
+ ...options,
1726
+ ...params,
1727
+ });
1728
+ }
1729
+ /**
1730
+ * Get task
1731
+ */
1732
+ get(parameters, options) {
1733
+ const params = buildClientParams([parameters], [
1734
+ {
1735
+ args: [
1736
+ { in: "path", key: "id" },
1737
+ { in: "query", key: "directory" },
1738
+ ],
1739
+ },
1740
+ ]);
1741
+ return (options?.client ?? this.client).get({
1742
+ url: "/nbp/tasks/{id}",
1743
+ ...options,
1744
+ ...params,
1745
+ });
1746
+ }
1747
+ /**
1748
+ * Update task
1749
+ */
1750
+ update(parameters, options) {
1751
+ const params = buildClientParams([parameters], [
1752
+ {
1753
+ args: [
1754
+ { in: "path", key: "id" },
1755
+ { in: "query", key: "directory" },
1756
+ { in: "body", key: "type" },
1757
+ { in: "body", key: "title" },
1758
+ { in: "body", key: "dueAt" },
1759
+ { in: "body", key: "status" },
1760
+ { in: "body", key: "note" },
1761
+ { in: "body", key: "clientId" },
1762
+ { in: "body", key: "listingId" },
1763
+ ],
1764
+ },
1765
+ ]);
1766
+ return (options?.client ?? this.client).put({
1767
+ url: "/nbp/tasks/{id}",
1768
+ ...options,
1769
+ ...params,
1770
+ headers: {
1771
+ "Content-Type": "application/json",
1772
+ ...options?.headers,
1773
+ ...params.headers,
1774
+ },
1775
+ });
1776
+ }
1777
+ }
1778
+ export class ClientRelations extends HeyApiClient {
1779
+ /**
1780
+ * List a client's relationships
1781
+ */
1782
+ list(parameters, options) {
1783
+ const params = buildClientParams([parameters], [
1784
+ {
1785
+ args: [
1786
+ { in: "path", key: "id" },
1787
+ { in: "query", key: "directory" },
1788
+ ],
1789
+ },
1790
+ ]);
1791
+ return (options?.client ?? this.client).get({
1792
+ url: "/nbp/clients/{id}/relations",
1793
+ ...options,
1794
+ ...params,
1795
+ });
1796
+ }
1797
+ /**
1798
+ * Add a client relationship
1799
+ */
1800
+ create(parameters, options) {
1801
+ const params = buildClientParams([parameters], [
1802
+ {
1803
+ args: [
1804
+ { in: "path", key: "id" },
1805
+ { in: "query", key: "directory" },
1806
+ { in: "body", key: "clientB" },
1807
+ { in: "body", key: "type" },
1808
+ { in: "body", key: "note" },
1809
+ ],
1810
+ },
1811
+ ]);
1812
+ return (options?.client ?? this.client).post({
1813
+ url: "/nbp/clients/{id}/relations",
1814
+ ...options,
1815
+ ...params,
1816
+ headers: {
1817
+ "Content-Type": "application/json",
1818
+ ...options?.headers,
1819
+ ...params.headers,
1820
+ },
1821
+ });
1822
+ }
1823
+ /**
1824
+ * Delete a client relationship
1825
+ */
1826
+ delete(parameters, options) {
1827
+ const params = buildClientParams([parameters], [
1828
+ {
1829
+ args: [
1830
+ { in: "path", key: "id" },
1831
+ { in: "query", key: "directory" },
1832
+ ],
1833
+ },
1834
+ ]);
1835
+ return (options?.client ?? this.client).delete({
1836
+ url: "/nbp/client-relations/{id}",
1837
+ ...options,
1838
+ ...params,
1839
+ });
1840
+ }
1841
+ }
1842
+ export class Contacts extends HeyApiClient {
1843
+ /**
1844
+ * Listings for a contact phone (360°)
1845
+ */
1846
+ listings(parameters, options) {
1847
+ const params = buildClientParams([parameters], [
1848
+ {
1849
+ args: [
1850
+ { in: "query", key: "directory" },
1851
+ { in: "query", key: "phone" },
1852
+ ],
1853
+ },
1854
+ ]);
1855
+ return (options?.client ?? this.client).get({
1856
+ url: "/nbp/contacts/listings",
1857
+ ...options,
1858
+ ...params,
1859
+ });
1860
+ }
1861
+ /**
1862
+ * All phones of a person
1863
+ */
1864
+ phones(parameters, options) {
1865
+ const params = buildClientParams([parameters], [
1866
+ {
1867
+ args: [
1868
+ { in: "query", key: "directory" },
1869
+ { in: "query", key: "phone" },
1870
+ ],
1871
+ },
1872
+ ]);
1873
+ return (options?.client ?? this.client).get({
1874
+ url: "/nbp/contacts/phones",
1875
+ ...options,
1876
+ ...params,
1877
+ });
1878
+ }
1879
+ /**
1880
+ * Link an alternate phone to a person
1881
+ */
1882
+ phoneLink(parameters, options) {
1883
+ const params = buildClientParams([parameters], [
1884
+ {
1885
+ args: [
1886
+ { in: "query", key: "directory" },
1887
+ { in: "body", key: "anchorPhone" },
1888
+ { in: "body", key: "addPhone" },
1889
+ { in: "body", key: "name" },
1890
+ ],
1891
+ },
1892
+ ]);
1893
+ return (options?.client ?? this.client).post({
1894
+ url: "/nbp/contacts/phone-link",
1895
+ ...options,
1896
+ ...params,
1897
+ headers: {
1898
+ "Content-Type": "application/json",
1899
+ ...options?.headers,
1900
+ ...params.headers,
1901
+ },
1902
+ });
1903
+ }
1904
+ /**
1905
+ * Detach a phone from its person
1906
+ */
1907
+ phoneUnlink(parameters, options) {
1908
+ const params = buildClientParams([parameters], [
1909
+ {
1910
+ args: [
1911
+ { in: "query", key: "directory" },
1912
+ { in: "body", key: "phone" },
1913
+ ],
1914
+ },
1915
+ ]);
1916
+ return (options?.client ?? this.client).post({
1917
+ url: "/nbp/contacts/phone-unlink",
1918
+ ...options,
1919
+ ...params,
1920
+ headers: {
1921
+ "Content-Type": "application/json",
1922
+ ...options?.headers,
1923
+ ...params.headers,
1924
+ },
1925
+ });
1926
+ }
1927
+ }
1928
+ export class Tags extends HeyApiClient {
1929
+ /**
1930
+ * Get listing tags
1931
+ *
1932
+ * Get listing tag definitions (custom or defaults)
1933
+ */
1934
+ listings(parameters, options) {
1935
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1936
+ return (options?.client ?? this.client).get({
1937
+ url: "/nbp/tags/listings",
1938
+ ...options,
1939
+ ...params,
1940
+ });
1941
+ }
1942
+ /**
1943
+ * Get client tags
1944
+ *
1945
+ * Get client tag definitions (custom or defaults)
1946
+ */
1947
+ clients(parameters, options) {
1948
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1949
+ return (options?.client ?? this.client).get({
1950
+ url: "/nbp/tags/clients",
1951
+ ...options,
1952
+ ...params,
1953
+ });
1954
+ }
1955
+ listings2 = new Listings({ client: this.client });
1956
+ clients2 = new Clients({ client: this.client });
1957
+ }
1958
+ export class Views extends HeyApiClient {
1959
+ /**
1960
+ * Get resolved view config
1961
+ *
1962
+ * Get view config with 3-level resolution: personal > workspace > embedded default
1963
+ */
1964
+ get(parameters, options) {
1965
+ const params = buildClientParams([parameters], [
1966
+ {
1967
+ args: [
1968
+ { in: "path", key: "entityType" },
1969
+ { in: "query", key: "directory" },
1970
+ ],
1971
+ },
1972
+ ]);
1973
+ return (options?.client ?? this.client).get({
1974
+ url: "/nbp/views/{entityType}",
1975
+ ...options,
1976
+ ...params,
1977
+ });
1978
+ }
1979
+ /**
1980
+ * Save personal view override
1981
+ *
1982
+ * Save personal view configuration (overrides workspace default)
1983
+ */
1984
+ savePersonal(parameters, options) {
1985
+ const params = buildClientParams([parameters], [
1986
+ {
1987
+ args: [
1988
+ { in: "path", key: "entityType" },
1989
+ { in: "query", key: "directory" },
1990
+ ],
1991
+ },
1992
+ ]);
1993
+ return (options?.client ?? this.client).put({
1994
+ url: "/nbp/views/{entityType}",
1995
+ ...options,
1996
+ ...params,
1997
+ });
1998
+ }
1999
+ /**
2000
+ * Save workspace view default
2001
+ *
2002
+ * Save workspace-level default view configuration (admin only)
2003
+ */
2004
+ saveWorkspace(parameters, options) {
2005
+ const params = buildClientParams([parameters], [
2006
+ {
2007
+ args: [
2008
+ { in: "path", key: "entityType" },
2009
+ { in: "query", key: "directory" },
2010
+ ],
2011
+ },
2012
+ ]);
2013
+ return (options?.client ?? this.client).put({
2014
+ url: "/nbp/views/{entityType}/workspace",
2015
+ ...options,
2016
+ ...params,
2017
+ });
2018
+ }
2019
+ /**
2020
+ * Reset personal view to workspace/default
2021
+ *
2022
+ * Remove personal view override, falling back to workspace default or embedded
2023
+ */
2024
+ resetPersonal(parameters, options) {
2025
+ const params = buildClientParams([parameters], [
2026
+ {
2027
+ args: [
2028
+ { in: "path", key: "entityType" },
2029
+ { in: "query", key: "directory" },
2030
+ ],
2031
+ },
2032
+ ]);
2033
+ return (options?.client ?? this.client).post({
2034
+ url: "/nbp/views/{entityType}/reset",
2035
+ ...options,
2036
+ ...params,
2037
+ });
2038
+ }
2039
+ }
2040
+ export class Divisions extends HeyApiClient {
2041
+ /**
2042
+ * List divisions
2043
+ *
2044
+ * List Vietnamese administrative divisions (provinces, districts, wards) with optional parent filter
2045
+ */
2046
+ list(parameters, options) {
2047
+ const params = buildClientParams([parameters], [
2048
+ {
2049
+ args: [
2050
+ { in: "query", key: "directory" },
2051
+ { in: "query", key: "type" },
2052
+ { in: "query", key: "parentId" },
2053
+ { in: "query", key: "version" },
2054
+ { in: "query", key: "active" },
2055
+ ],
2056
+ },
2057
+ ]);
2058
+ return (options?.client ?? this.client).get({
2059
+ url: "/nbp/divisions",
2060
+ ...options,
2061
+ ...params,
2062
+ });
2063
+ }
2064
+ }
2065
+ export class Danger extends HeyApiClient {
2066
+ /**
2067
+ * Request purge confirmation
2068
+ *
2069
+ * Request a confirmation token to purge all listings and properties. Owner only. Token expires in 5 minutes.
2070
+ */
2071
+ purgeRequest(parameters, options) {
2072
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2073
+ return (options?.client ?? this.client).post({
2074
+ url: "/nbp/danger/purge-data",
2075
+ ...options,
2076
+ ...params,
2077
+ });
2078
+ }
2079
+ /**
2080
+ * Confirm and execute purge
2081
+ *
2082
+ * Execute purge of all listings and properties. Requires valid confirmation token and exact workspace slug.
2083
+ */
2084
+ purgeConfirm(parameters, options) {
2085
+ const params = buildClientParams([parameters], [
2086
+ {
2087
+ args: [
2088
+ { in: "query", key: "directory" },
2089
+ { in: "body", key: "confirmationToken" },
2090
+ { in: "body", key: "workspaceSlug" },
2091
+ ],
2092
+ },
2093
+ ]);
2094
+ return (options?.client ?? this.client).post({
2095
+ url: "/nbp/danger/purge-data/confirm",
2096
+ ...options,
2097
+ ...params,
2098
+ headers: {
2099
+ "Content-Type": "application/json",
2100
+ ...options?.headers,
2101
+ ...params.headers,
2102
+ },
2103
+ });
2104
+ }
2105
+ }
2106
+ export class Nbp extends HeyApiClient {
2107
+ listings = new Listings({ client: this.client });
2108
+ properties = new Properties({ client: this.client });
2109
+ search = new Search({ client: this.client });
2110
+ clients = new Clients({ client: this.client });
2111
+ tasks = new Tasks({ client: this.client });
2112
+ clientRelations = new ClientRelations({ client: this.client });
2113
+ contacts = new Contacts({ client: this.client });
2114
+ tags = new Tags({ client: this.client });
2115
+ views = new Views({ client: this.client });
2116
+ divisions = new Divisions({ client: this.client });
2117
+ danger = new Danger({ client: this.client });
2118
+ }
2119
+ export class Agent extends HeyApiClient {
2120
+ /**
2121
+ * List agents
2122
+ *
2123
+ * Get a list of all available AI agents in the NBP system.
2124
+ */
2125
+ list(parameters, options) {
2126
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2127
+ return (options?.client ?? this.client).get({
2128
+ url: "/agent",
2129
+ ...options,
2130
+ ...params,
2131
+ });
2132
+ }
2133
+ /**
2134
+ * Get cloud agent statistics
2135
+ *
2136
+ * Get statistics about active cloud AI sessions.
2137
+ */
2138
+ stats(parameters, options) {
2139
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2140
+ return (options?.client ?? this.client).get({
2141
+ url: "/agent/stats",
2142
+ ...options,
2143
+ ...params,
2144
+ });
2145
+ }
2146
+ }
2147
+ export class Pty extends HeyApiClient {
2148
+ /**
2149
+ * List PTY sessions
2150
+ *
2151
+ * Get a list of all active pseudo-terminal (PTY) sessions managed by NBP.
2152
+ */
2153
+ list(parameters, options) {
2154
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2155
+ return (options?.client ?? this.client).get({
2156
+ url: "/pty",
2157
+ ...options,
2158
+ ...params,
2159
+ });
2160
+ }
2161
+ /**
2162
+ * Create PTY session
2163
+ *
2164
+ * Create a new pseudo-terminal (PTY) session for running shell commands and processes.
2165
+ */
2166
+ create(parameters, options) {
2167
+ const params = buildClientParams([parameters], [
2168
+ {
2169
+ args: [
2170
+ { in: "query", key: "directory" },
2171
+ { in: "body", key: "command" },
2172
+ { in: "body", key: "args" },
2173
+ { in: "body", key: "cwd" },
2174
+ { in: "body", key: "title" },
2175
+ { in: "body", key: "env" },
2176
+ ],
2177
+ },
2178
+ ]);
2179
+ return (options?.client ?? this.client).post({
2180
+ url: "/pty",
2181
+ ...options,
2182
+ ...params,
2183
+ headers: {
2184
+ "Content-Type": "application/json",
2185
+ ...options?.headers,
2186
+ ...params.headers,
2187
+ },
2188
+ });
2189
+ }
2190
+ /**
2191
+ * Remove PTY session
2192
+ *
2193
+ * Remove and terminate a specific pseudo-terminal (PTY) session.
2194
+ */
2195
+ remove(parameters, options) {
2196
+ const params = buildClientParams([parameters], [
2197
+ {
2198
+ args: [
2199
+ { in: "path", key: "ptyID" },
2200
+ { in: "query", key: "directory" },
2201
+ ],
2202
+ },
2203
+ ]);
2204
+ return (options?.client ?? this.client).delete({
2205
+ url: "/pty/{ptyID}",
2206
+ ...options,
2207
+ ...params,
2208
+ });
2209
+ }
2210
+ /**
2211
+ * Get PTY session
2212
+ *
2213
+ * Retrieve detailed information about a specific pseudo-terminal (PTY) session.
2214
+ */
2215
+ get(parameters, options) {
2216
+ const params = buildClientParams([parameters], [
2217
+ {
2218
+ args: [
2219
+ { in: "path", key: "ptyID" },
2220
+ { in: "query", key: "directory" },
2221
+ ],
2222
+ },
2223
+ ]);
2224
+ return (options?.client ?? this.client).get({
2225
+ url: "/pty/{ptyID}",
2226
+ ...options,
2227
+ ...params,
2228
+ });
2229
+ }
2230
+ /**
2231
+ * Update PTY session
2232
+ *
2233
+ * Update properties of an existing pseudo-terminal (PTY) session.
2234
+ */
2235
+ update(parameters, options) {
2236
+ const params = buildClientParams([parameters], [
2237
+ {
2238
+ args: [
2239
+ { in: "path", key: "ptyID" },
2240
+ { in: "query", key: "directory" },
2241
+ { in: "body", key: "title" },
2242
+ { in: "body", key: "size" },
2243
+ ],
2244
+ },
2245
+ ]);
2246
+ return (options?.client ?? this.client).put({
2247
+ url: "/pty/{ptyID}",
2248
+ ...options,
2249
+ ...params,
2250
+ headers: {
2251
+ "Content-Type": "application/json",
2252
+ ...options?.headers,
2253
+ ...params.headers,
2254
+ },
2255
+ });
2256
+ }
2257
+ /**
2258
+ * Connect to PTY session
2259
+ *
2260
+ * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
2261
+ */
2262
+ connect(parameters, options) {
2263
+ const params = buildClientParams([parameters], [
2264
+ {
2265
+ args: [
2266
+ { in: "path", key: "ptyID" },
2267
+ { in: "query", key: "directory" },
2268
+ ],
2269
+ },
2270
+ ]);
2271
+ return (options?.client ?? this.client).get({
2272
+ url: "/pty/{ptyID}/connect",
2273
+ ...options,
2274
+ ...params,
2275
+ });
2276
+ }
2277
+ }
2278
+ export class Config extends HeyApiClient {
2279
+ /**
2280
+ * Get configuration
2281
+ *
2282
+ * Retrieve the current NBP configuration settings and preferences.
2283
+ */
2284
+ get(parameters, options) {
2285
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2286
+ return (options?.client ?? this.client).get({
2287
+ url: "/config",
2288
+ ...options,
2289
+ ...params,
2290
+ });
2291
+ }
2292
+ /**
2293
+ * Update configuration
2294
+ *
2295
+ * Update NBP configuration settings and preferences.
2296
+ */
2297
+ update(parameters, options) {
2298
+ const params = buildClientParams([parameters], [
2299
+ {
2300
+ args: [
2301
+ { in: "query", key: "directory" },
2302
+ { key: "config", map: "body" },
2303
+ ],
2304
+ },
2305
+ ]);
2306
+ return (options?.client ?? this.client).patch({
2307
+ url: "/config",
2308
+ ...options,
2309
+ ...params,
2310
+ headers: {
2311
+ "Content-Type": "application/json",
2312
+ ...options?.headers,
2313
+ ...params.headers,
2314
+ },
2315
+ });
2316
+ }
2317
+ /**
2318
+ * List config providers
2319
+ *
2320
+ * Get a list of all configured AI providers and their default models.
2321
+ */
2322
+ providers(parameters, options) {
2323
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2324
+ return (options?.client ?? this.client).get({
2325
+ url: "/config/providers",
2326
+ ...options,
2327
+ ...params,
2328
+ });
2329
+ }
2330
+ }
2331
+ export class Tool extends HeyApiClient {
2332
+ /**
2333
+ * List tool IDs
2334
+ *
2335
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
2336
+ */
2337
+ ids(parameters, options) {
2338
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2339
+ return (options?.client ?? this.client).get({
2340
+ url: "/experimental/tool/ids",
2341
+ ...options,
2342
+ ...params,
2343
+ });
2344
+ }
2345
+ /**
2346
+ * List tools
2347
+ *
2348
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
2349
+ */
2350
+ list(parameters, options) {
2351
+ const params = buildClientParams([parameters], [
2352
+ {
2353
+ args: [
2354
+ { in: "query", key: "directory" },
2355
+ { in: "query", key: "provider" },
2356
+ { in: "query", key: "model" },
2357
+ ],
2358
+ },
2359
+ ]);
2360
+ return (options?.client ?? this.client).get({
2361
+ url: "/experimental/tool",
2362
+ ...options,
2363
+ ...params,
2364
+ });
2365
+ }
2366
+ }
2367
+ export class Instance extends HeyApiClient {
2368
+ /**
2369
+ * Dispose instance
2370
+ *
2371
+ * Clean up and dispose the current NBP instance, releasing all resources.
2372
+ */
2373
+ dispose(parameters, options) {
2374
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2375
+ return (options?.client ?? this.client).post({
2376
+ url: "/instance/dispose",
2377
+ ...options,
2378
+ ...params,
2379
+ });
2380
+ }
2381
+ }
2382
+ export class Path extends HeyApiClient {
2383
+ /**
2384
+ * Get paths
2385
+ *
2386
+ * Retrieve the current working directory and related path information for the NBP instance.
2387
+ */
2388
+ get(parameters, options) {
2389
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2390
+ return (options?.client ?? this.client).get({
2391
+ url: "/path",
2392
+ ...options,
2393
+ ...params,
2394
+ });
2395
+ }
2396
+ }
2397
+ export class Worktree extends HeyApiClient {
2398
+ /**
2399
+ * List worktrees
2400
+ *
2401
+ * List all sandbox worktrees for the current project.
2402
+ */
2403
+ list(parameters, options) {
2404
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2405
+ return (options?.client ?? this.client).get({
2406
+ url: "/experimental/worktree",
2407
+ ...options,
2408
+ ...params,
2409
+ });
2410
+ }
2411
+ /**
2412
+ * Create worktree
2413
+ *
2414
+ * Create a new git worktree for the current project.
2415
+ */
2416
+ create(parameters, options) {
2417
+ const params = buildClientParams([parameters], [
2418
+ {
2419
+ args: [
2420
+ { in: "query", key: "directory" },
2421
+ { in: "body", key: "name" },
2422
+ ],
2423
+ },
2424
+ ]);
2425
+ return (options?.client ?? this.client).post({
2426
+ url: "/experimental/worktree",
2427
+ ...options,
2428
+ ...params,
2429
+ headers: {
2430
+ "Content-Type": "application/json",
2431
+ ...options?.headers,
2432
+ ...params.headers,
2433
+ },
2434
+ });
2435
+ }
2436
+ }
2437
+ export class Vcs extends HeyApiClient {
2438
+ /**
2439
+ * Get VCS info
2440
+ *
2441
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
2442
+ */
2443
+ get(parameters, options) {
2444
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2445
+ return (options?.client ?? this.client).get({
2446
+ url: "/vcs",
2447
+ ...options,
2448
+ ...params,
2449
+ });
2450
+ }
2451
+ }
2452
+ export class Session extends HeyApiClient {
2453
+ /**
2454
+ * Get AI usage
2455
+ *
2456
+ * Get current AI token and session usage with tier limits.
2457
+ */
2458
+ usage(parameters, options) {
2459
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2460
+ return (options?.client ?? this.client).get({
2461
+ url: "/session/usage",
2462
+ ...options,
2463
+ ...params,
2464
+ });
2465
+ }
2466
+ /**
2467
+ * List sessions
2468
+ *
2469
+ * Get a list of all NBP sessions, sorted by most recently updated.
2470
+ */
2471
+ list(parameters, options) {
2472
+ const params = buildClientParams([parameters], [
2473
+ {
2474
+ args: [
2475
+ { in: "query", key: "directory" },
2476
+ { in: "query", key: "start" },
2477
+ { in: "query", key: "search" },
2478
+ { in: "query", key: "limit" },
2479
+ ],
2480
+ },
2481
+ ]);
2482
+ return (options?.client ?? this.client).get({
2483
+ url: "/session",
2484
+ ...options,
2485
+ ...params,
2486
+ });
2487
+ }
2488
+ /**
2489
+ * Create session
2490
+ *
2491
+ * Create a new NBP session for interacting with AI assistants and managing conversations.
2492
+ */
2493
+ create(parameters, options) {
2494
+ const params = buildClientParams([parameters], [
2495
+ {
2496
+ args: [
2497
+ { in: "query", key: "directory" },
2498
+ { in: "body", key: "parentID" },
2499
+ { in: "body", key: "title" },
2500
+ { in: "body", key: "permission" },
2501
+ ],
2502
+ },
2503
+ ]);
2504
+ return (options?.client ?? this.client).post({
2505
+ url: "/session",
2506
+ ...options,
2507
+ ...params,
2508
+ headers: {
2509
+ "Content-Type": "application/json",
2510
+ ...options?.headers,
2511
+ ...params.headers,
2512
+ },
2513
+ });
2514
+ }
2515
+ /**
2516
+ * Get session status
2517
+ *
2518
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
2519
+ */
2520
+ status(parameters, options) {
2521
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2522
+ return (options?.client ?? this.client).get({
2523
+ url: "/session/status",
2524
+ ...options,
2525
+ ...params,
2526
+ });
2527
+ }
2528
+ /**
2529
+ * Delete session
2530
+ *
2531
+ * Delete a session and permanently remove all associated data, including messages and history.
2532
+ */
2533
+ delete(parameters, options) {
2534
+ const params = buildClientParams([parameters], [
2535
+ {
2536
+ args: [
2537
+ { in: "path", key: "sessionID" },
2538
+ { in: "query", key: "directory" },
2539
+ ],
2540
+ },
2541
+ ]);
2542
+ return (options?.client ?? this.client).delete({
2543
+ url: "/session/{sessionID}",
2544
+ ...options,
2545
+ ...params,
2546
+ });
2547
+ }
2548
+ /**
2549
+ * Get session
2550
+ *
2551
+ * Retrieve detailed information about a specific NBP session.
2552
+ */
2553
+ get(parameters, options) {
2554
+ const params = buildClientParams([parameters], [
2555
+ {
2556
+ args: [
2557
+ { in: "path", key: "sessionID" },
2558
+ { in: "query", key: "directory" },
2559
+ ],
2560
+ },
2561
+ ]);
2562
+ return (options?.client ?? this.client).get({
2563
+ url: "/session/{sessionID}",
2564
+ ...options,
2565
+ ...params,
2566
+ });
2567
+ }
2568
+ /**
2569
+ * Update session
2570
+ *
2571
+ * Update properties of an existing session, such as title or other metadata.
2572
+ */
2573
+ update(parameters, options) {
2574
+ const params = buildClientParams([parameters], [
2575
+ {
2576
+ args: [
2577
+ { in: "path", key: "sessionID" },
2578
+ { in: "query", key: "directory" },
2579
+ { in: "body", key: "title" },
2580
+ { in: "body", key: "time" },
2581
+ ],
2582
+ },
2583
+ ]);
2584
+ return (options?.client ?? this.client).patch({
2585
+ url: "/session/{sessionID}",
2586
+ ...options,
2587
+ ...params,
2588
+ headers: {
2589
+ "Content-Type": "application/json",
2590
+ ...options?.headers,
2591
+ ...params.headers,
2592
+ },
2593
+ });
2594
+ }
2595
+ /**
2596
+ * Get session children
2597
+ *
2598
+ * Retrieve all child sessions that were forked from the specified parent session.
2599
+ */
2600
+ children(parameters, options) {
2601
+ const params = buildClientParams([parameters], [
2602
+ {
2603
+ args: [
2604
+ { in: "path", key: "sessionID" },
2605
+ { in: "query", key: "directory" },
2606
+ ],
2607
+ },
2608
+ ]);
2609
+ return (options?.client ?? this.client).get({
2610
+ url: "/session/{sessionID}/children",
2611
+ ...options,
2612
+ ...params,
2613
+ });
2614
+ }
2615
+ /**
2616
+ * Get session todos
2617
+ *
2618
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
2619
+ */
2620
+ todo(parameters, options) {
2621
+ const params = buildClientParams([parameters], [
2622
+ {
2623
+ args: [
2624
+ { in: "path", key: "sessionID" },
2625
+ { in: "query", key: "directory" },
2626
+ ],
2627
+ },
2628
+ ]);
2629
+ return (options?.client ?? this.client).get({
2630
+ url: "/session/{sessionID}/todo",
2631
+ ...options,
2632
+ ...params,
2633
+ });
2634
+ }
2635
+ /**
2636
+ * Initialize session
2637
+ *
2638
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
2639
+ */
2640
+ init(parameters, options) {
2641
+ const params = buildClientParams([parameters], [
2642
+ {
2643
+ args: [
2644
+ { in: "path", key: "sessionID" },
2645
+ { in: "query", key: "directory" },
2646
+ { in: "body", key: "modelID" },
2647
+ { in: "body", key: "providerID" },
2648
+ { in: "body", key: "messageID" },
2649
+ ],
2650
+ },
2651
+ ]);
2652
+ return (options?.client ?? this.client).post({
2653
+ url: "/session/{sessionID}/init",
2654
+ ...options,
2655
+ ...params,
2656
+ headers: {
2657
+ "Content-Type": "application/json",
2658
+ ...options?.headers,
2659
+ ...params.headers,
2660
+ },
2661
+ });
2662
+ }
2663
+ /**
2664
+ * Fork session
2665
+ *
2666
+ * Create a new session by forking an existing session at a specific message point.
2667
+ */
2668
+ fork(parameters, options) {
2669
+ const params = buildClientParams([parameters], [
2670
+ {
2671
+ args: [
2672
+ { in: "path", key: "sessionID" },
2673
+ { in: "query", key: "directory" },
2674
+ { in: "body", key: "messageID" },
2675
+ ],
2676
+ },
2677
+ ]);
2678
+ return (options?.client ?? this.client).post({
2679
+ url: "/session/{sessionID}/fork",
2680
+ ...options,
2681
+ ...params,
2682
+ headers: {
2683
+ "Content-Type": "application/json",
2684
+ ...options?.headers,
2685
+ ...params.headers,
2686
+ },
2687
+ });
2688
+ }
2689
+ /**
2690
+ * Abort session
2691
+ *
2692
+ * Abort an active session and stop any ongoing AI processing or command execution.
2693
+ */
2694
+ abort(parameters, options) {
2695
+ const params = buildClientParams([parameters], [
2696
+ {
2697
+ args: [
2698
+ { in: "path", key: "sessionID" },
2699
+ { in: "query", key: "directory" },
2700
+ ],
2701
+ },
2702
+ ]);
2703
+ return (options?.client ?? this.client).post({
2704
+ url: "/session/{sessionID}/abort",
2705
+ ...options,
2706
+ ...params,
2707
+ });
2708
+ }
2709
+ /**
2710
+ * Unshare session
2711
+ *
2712
+ * Remove the shareable link for a session, making it private again.
2713
+ */
2714
+ unshare(parameters, options) {
2715
+ const params = buildClientParams([parameters], [
2716
+ {
2717
+ args: [
2718
+ { in: "path", key: "sessionID" },
2719
+ { in: "query", key: "directory" },
2720
+ ],
2721
+ },
2722
+ ]);
2723
+ return (options?.client ?? this.client).delete({
2724
+ url: "/session/{sessionID}/share",
2725
+ ...options,
2726
+ ...params,
2727
+ });
2728
+ }
2729
+ /**
2730
+ * Share session
2731
+ *
2732
+ * Create a shareable link for a session, allowing others to view the conversation.
2733
+ */
2734
+ share(parameters, options) {
2735
+ const params = buildClientParams([parameters], [
2736
+ {
2737
+ args: [
2738
+ { in: "path", key: "sessionID" },
2739
+ { in: "query", key: "directory" },
2740
+ ],
2741
+ },
2742
+ ]);
2743
+ return (options?.client ?? this.client).post({
2744
+ url: "/session/{sessionID}/share",
2745
+ ...options,
2746
+ ...params,
2747
+ });
2748
+ }
2749
+ /**
2750
+ * Get message diff
2751
+ *
2752
+ * Get the file changes (diff) that resulted from a specific user message in the session.
2753
+ */
2754
+ diff(parameters, options) {
2755
+ const params = buildClientParams([parameters], [
2756
+ {
2757
+ args: [
2758
+ { in: "path", key: "sessionID" },
2759
+ { in: "query", key: "directory" },
2760
+ { in: "query", key: "messageID" },
2761
+ ],
2762
+ },
2763
+ ]);
2764
+ return (options?.client ?? this.client).get({
2765
+ url: "/session/{sessionID}/diff",
2766
+ ...options,
2767
+ ...params,
2768
+ });
2769
+ }
2770
+ /**
2771
+ * Summarize session
2772
+ *
2773
+ * Generate a concise summary of the session using AI compaction to preserve key information.
2774
+ */
2775
+ summarize(parameters, options) {
2776
+ const params = buildClientParams([parameters], [
2777
+ {
2778
+ args: [
2779
+ { in: "path", key: "sessionID" },
2780
+ { in: "query", key: "directory" },
2781
+ { in: "body", key: "providerID" },
2782
+ { in: "body", key: "modelID" },
2783
+ { in: "body", key: "auto" },
2784
+ ],
2785
+ },
2786
+ ]);
2787
+ return (options?.client ?? this.client).post({
2788
+ url: "/session/{sessionID}/summarize",
2789
+ ...options,
2790
+ ...params,
2791
+ headers: {
2792
+ "Content-Type": "application/json",
2793
+ ...options?.headers,
2794
+ ...params.headers,
2795
+ },
2796
+ });
2797
+ }
2798
+ /**
2799
+ * Get session messages
2800
+ *
2801
+ * Retrieve all messages in a session, including user prompts and AI responses.
2802
+ */
2803
+ messages(parameters, options) {
2804
+ const params = buildClientParams([parameters], [
2805
+ {
2806
+ args: [
2807
+ { in: "path", key: "sessionID" },
2808
+ { in: "query", key: "directory" },
2809
+ { in: "query", key: "limit" },
2810
+ ],
2811
+ },
2812
+ ]);
2813
+ return (options?.client ?? this.client).get({
2814
+ url: "/session/{sessionID}/message",
2815
+ ...options,
2816
+ ...params,
2817
+ });
2818
+ }
2819
+ /**
2820
+ * Send message
2821
+ *
2822
+ * Create and send a new message to a session, streaming the AI response.
2823
+ */
2824
+ prompt(parameters, options) {
2825
+ const params = buildClientParams([parameters], [
2826
+ {
2827
+ args: [
2828
+ { in: "path", key: "sessionID" },
2829
+ { in: "query", key: "directory" },
2830
+ { in: "body", key: "messageID" },
2831
+ { in: "body", key: "model" },
2832
+ { in: "body", key: "agent" },
2833
+ { in: "body", key: "noReply" },
2834
+ { in: "body", key: "tools" },
2835
+ { in: "body", key: "system" },
2836
+ { in: "body", key: "variant" },
2837
+ { in: "body", key: "parts" },
2838
+ ],
2839
+ },
2840
+ ]);
2841
+ return (options?.client ?? this.client).post({
2842
+ url: "/session/{sessionID}/message",
2843
+ ...options,
2844
+ ...params,
2845
+ headers: {
2846
+ "Content-Type": "application/json",
2847
+ ...options?.headers,
2848
+ ...params.headers,
2849
+ },
2850
+ });
2851
+ }
2852
+ /**
2853
+ * Get message
2854
+ *
2855
+ * Retrieve a specific message from a session by its message ID.
2856
+ */
2857
+ message(parameters, options) {
2858
+ const params = buildClientParams([parameters], [
2859
+ {
2860
+ args: [
2861
+ { in: "path", key: "sessionID" },
2862
+ { in: "path", key: "messageID" },
2863
+ { in: "query", key: "directory" },
2864
+ ],
2865
+ },
2866
+ ]);
2867
+ return (options?.client ?? this.client).get({
2868
+ url: "/session/{sessionID}/message/{messageID}",
2869
+ ...options,
2870
+ ...params,
2871
+ });
2872
+ }
2873
+ /**
2874
+ * Send async message
2875
+ *
2876
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
2877
+ */
2878
+ promptAsync(parameters, options) {
2879
+ const params = buildClientParams([parameters], [
2880
+ {
2881
+ args: [
2882
+ { in: "path", key: "sessionID" },
2883
+ { in: "query", key: "directory" },
2884
+ { in: "body", key: "messageID" },
2885
+ { in: "body", key: "model" },
2886
+ { in: "body", key: "agent" },
2887
+ { in: "body", key: "noReply" },
2888
+ { in: "body", key: "tools" },
2889
+ { in: "body", key: "system" },
2890
+ { in: "body", key: "variant" },
2891
+ { in: "body", key: "parts" },
2892
+ ],
2893
+ },
2894
+ ]);
2895
+ return (options?.client ?? this.client).post({
2896
+ url: "/session/{sessionID}/prompt_async",
2897
+ ...options,
2898
+ ...params,
2899
+ headers: {
2900
+ "Content-Type": "application/json",
2901
+ ...options?.headers,
2902
+ ...params.headers,
2903
+ },
2904
+ });
2905
+ }
2906
+ /**
2907
+ * Send command
2908
+ *
2909
+ * Send a new command to a session for execution by the AI assistant.
2910
+ */
2911
+ command(parameters, options) {
2912
+ const params = buildClientParams([parameters], [
2913
+ {
2914
+ args: [
2915
+ { in: "path", key: "sessionID" },
2916
+ { in: "query", key: "directory" },
2917
+ { in: "body", key: "messageID" },
2918
+ { in: "body", key: "agent" },
2919
+ { in: "body", key: "model" },
2920
+ { in: "body", key: "arguments" },
2921
+ { in: "body", key: "command" },
2922
+ { in: "body", key: "variant" },
2923
+ { in: "body", key: "parts" },
2924
+ ],
2925
+ },
2926
+ ]);
2927
+ return (options?.client ?? this.client).post({
2928
+ url: "/session/{sessionID}/command",
2929
+ ...options,
2930
+ ...params,
2931
+ headers: {
2932
+ "Content-Type": "application/json",
2933
+ ...options?.headers,
2934
+ ...params.headers,
2935
+ },
2936
+ });
2937
+ }
2938
+ /**
2939
+ * Run shell command
2940
+ *
2941
+ * Execute a shell command within the session context and return the AI's response.
2942
+ */
2943
+ shell(parameters, options) {
2944
+ const params = buildClientParams([parameters], [
2945
+ {
2946
+ args: [
2947
+ { in: "path", key: "sessionID" },
2948
+ { in: "query", key: "directory" },
2949
+ { in: "body", key: "agent" },
2950
+ { in: "body", key: "model" },
2951
+ { in: "body", key: "command" },
2952
+ ],
2953
+ },
2954
+ ]);
2955
+ return (options?.client ?? this.client).post({
2956
+ url: "/session/{sessionID}/shell",
2957
+ ...options,
2958
+ ...params,
2959
+ headers: {
2960
+ "Content-Type": "application/json",
2961
+ ...options?.headers,
2962
+ ...params.headers,
2963
+ },
2964
+ });
2965
+ }
2966
+ /**
2967
+ * Revert message
2968
+ *
2969
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
2970
+ */
2971
+ revert(parameters, options) {
2972
+ const params = buildClientParams([parameters], [
2973
+ {
2974
+ args: [
2975
+ { in: "path", key: "sessionID" },
2976
+ { in: "query", key: "directory" },
2977
+ { in: "body", key: "messageID" },
2978
+ { in: "body", key: "partID" },
2979
+ ],
2980
+ },
2981
+ ]);
2982
+ return (options?.client ?? this.client).post({
2983
+ url: "/session/{sessionID}/revert",
2984
+ ...options,
2985
+ ...params,
2986
+ headers: {
2987
+ "Content-Type": "application/json",
2988
+ ...options?.headers,
2989
+ ...params.headers,
2990
+ },
2991
+ });
2992
+ }
2993
+ /**
2994
+ * Restore reverted messages
2995
+ *
2996
+ * Restore all previously reverted messages in a session.
2997
+ */
2998
+ unrevert(parameters, options) {
2999
+ const params = buildClientParams([parameters], [
3000
+ {
3001
+ args: [
3002
+ { in: "path", key: "sessionID" },
3003
+ { in: "query", key: "directory" },
3004
+ ],
3005
+ },
3006
+ ]);
3007
+ return (options?.client ?? this.client).post({
3008
+ url: "/session/{sessionID}/unrevert",
3009
+ ...options,
3010
+ ...params,
3011
+ });
3012
+ }
3013
+ }
3014
+ export class Part extends HeyApiClient {
3015
+ /**
3016
+ * Delete a part from a message
3017
+ */
3018
+ delete(parameters, options) {
3019
+ const params = buildClientParams([parameters], [
3020
+ {
3021
+ args: [
3022
+ { in: "path", key: "sessionID" },
3023
+ { in: "path", key: "messageID" },
3024
+ { in: "path", key: "partID" },
3025
+ { in: "query", key: "directory" },
3026
+ ],
3027
+ },
3028
+ ]);
3029
+ return (options?.client ?? this.client).delete({
3030
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
3031
+ ...options,
3032
+ ...params,
3033
+ });
3034
+ }
3035
+ /**
3036
+ * Update a part in a message
3037
+ */
3038
+ update(parameters, options) {
3039
+ const params = buildClientParams([parameters], [
3040
+ {
3041
+ args: [
3042
+ { in: "path", key: "sessionID" },
3043
+ { in: "path", key: "messageID" },
3044
+ { in: "path", key: "partID" },
3045
+ { in: "query", key: "directory" },
3046
+ { key: "part", map: "body" },
3047
+ ],
3048
+ },
3049
+ ]);
3050
+ return (options?.client ?? this.client).patch({
3051
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
3052
+ ...options,
3053
+ ...params,
3054
+ headers: {
3055
+ "Content-Type": "application/json",
3056
+ ...options?.headers,
3057
+ ...params.headers,
3058
+ },
3059
+ });
3060
+ }
3061
+ }
3062
+ export class Permission extends HeyApiClient {
3063
+ /**
3064
+ * Respond to permission
3065
+ *
3066
+ * Approve or deny a permission request from the AI assistant.
3067
+ *
3068
+ * @deprecated
3069
+ */
3070
+ respond(parameters, options) {
3071
+ const params = buildClientParams([parameters], [
3072
+ {
3073
+ args: [
3074
+ { in: "path", key: "sessionID" },
3075
+ { in: "path", key: "permissionID" },
3076
+ { in: "query", key: "directory" },
3077
+ { in: "body", key: "response" },
3078
+ ],
3079
+ },
3080
+ ]);
3081
+ return (options?.client ?? this.client).post({
3082
+ url: "/session/{sessionID}/permissions/{permissionID}",
3083
+ ...options,
3084
+ ...params,
3085
+ headers: {
3086
+ "Content-Type": "application/json",
3087
+ ...options?.headers,
3088
+ ...params.headers,
3089
+ },
3090
+ });
3091
+ }
3092
+ /**
3093
+ * Respond to permission request
3094
+ *
3095
+ * Approve or deny a permission request from the AI assistant.
3096
+ */
3097
+ reply(parameters, options) {
3098
+ const params = buildClientParams([parameters], [
3099
+ {
3100
+ args: [
3101
+ { in: "path", key: "requestID" },
3102
+ { in: "query", key: "directory" },
3103
+ { in: "body", key: "reply" },
3104
+ { in: "body", key: "message" },
3105
+ ],
3106
+ },
3107
+ ]);
3108
+ return (options?.client ?? this.client).post({
3109
+ url: "/permission/{requestID}/reply",
3110
+ ...options,
3111
+ ...params,
3112
+ headers: {
3113
+ "Content-Type": "application/json",
3114
+ ...options?.headers,
3115
+ ...params.headers,
3116
+ },
3117
+ });
3118
+ }
3119
+ /**
3120
+ * List pending permissions
3121
+ *
3122
+ * Get all pending permission requests across all sessions.
3123
+ */
3124
+ list(parameters, options) {
3125
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3126
+ return (options?.client ?? this.client).get({
3127
+ url: "/permission",
3128
+ ...options,
3129
+ ...params,
3130
+ });
3131
+ }
3132
+ }
3133
+ export class Question extends HeyApiClient {
3134
+ /**
3135
+ * List pending questions
3136
+ *
3137
+ * Get all pending question requests across all sessions.
3138
+ */
3139
+ list(parameters, options) {
3140
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3141
+ return (options?.client ?? this.client).get({
3142
+ url: "/question",
3143
+ ...options,
3144
+ ...params,
3145
+ });
3146
+ }
3147
+ /**
3148
+ * Reply to question request
3149
+ *
3150
+ * Provide answers to a question request from the AI assistant.
3151
+ */
3152
+ reply(parameters, options) {
3153
+ const params = buildClientParams([parameters], [
3154
+ {
3155
+ args: [
3156
+ { in: "path", key: "requestID" },
3157
+ { in: "query", key: "directory" },
3158
+ { in: "body", key: "answers" },
3159
+ ],
3160
+ },
3161
+ ]);
3162
+ return (options?.client ?? this.client).post({
3163
+ url: "/question/{requestID}/reply",
3164
+ ...options,
3165
+ ...params,
3166
+ headers: {
3167
+ "Content-Type": "application/json",
3168
+ ...options?.headers,
3169
+ ...params.headers,
3170
+ },
3171
+ });
3172
+ }
3173
+ /**
3174
+ * Reject question request
3175
+ *
3176
+ * Reject a question request from the AI assistant.
3177
+ */
3178
+ reject(parameters, options) {
3179
+ const params = buildClientParams([parameters], [
3180
+ {
3181
+ args: [
3182
+ { in: "path", key: "requestID" },
3183
+ { in: "query", key: "directory" },
3184
+ ],
3185
+ },
3186
+ ]);
3187
+ return (options?.client ?? this.client).post({
3188
+ url: "/question/{requestID}/reject",
3189
+ ...options,
3190
+ ...params,
3191
+ });
3192
+ }
3193
+ }
3194
+ export class Command extends HeyApiClient {
3195
+ /**
3196
+ * List commands
3197
+ *
3198
+ * Get a list of all available commands in the NBP system.
3199
+ */
3200
+ list(parameters, options) {
3201
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3202
+ return (options?.client ?? this.client).get({
3203
+ url: "/command",
3204
+ ...options,
3205
+ ...params,
3206
+ });
3207
+ }
3208
+ }
3209
+ export class Oauth extends HeyApiClient {
3210
+ /**
3211
+ * OAuth authorize
3212
+ *
3213
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
3214
+ */
3215
+ authorize(parameters, options) {
3216
+ const params = buildClientParams([parameters], [
3217
+ {
3218
+ args: [
3219
+ { in: "path", key: "providerID" },
3220
+ { in: "query", key: "directory" },
3221
+ { in: "body", key: "method" },
3222
+ ],
3223
+ },
3224
+ ]);
3225
+ return (options?.client ?? this.client).post({
3226
+ url: "/provider/{providerID}/oauth/authorize",
3227
+ ...options,
3228
+ ...params,
3229
+ headers: {
3230
+ "Content-Type": "application/json",
3231
+ ...options?.headers,
3232
+ ...params.headers,
3233
+ },
3234
+ });
3235
+ }
3236
+ /**
3237
+ * OAuth callback
3238
+ *
3239
+ * Handle the OAuth callback from a provider after user authorization.
3240
+ */
3241
+ callback(parameters, options) {
3242
+ const params = buildClientParams([parameters], [
3243
+ {
3244
+ args: [
3245
+ { in: "path", key: "providerID" },
3246
+ { in: "query", key: "directory" },
3247
+ { in: "body", key: "method" },
3248
+ { in: "body", key: "code" },
3249
+ ],
3250
+ },
3251
+ ]);
3252
+ return (options?.client ?? this.client).post({
3253
+ url: "/provider/{providerID}/oauth/callback",
3254
+ ...options,
3255
+ ...params,
3256
+ headers: {
3257
+ "Content-Type": "application/json",
3258
+ ...options?.headers,
3259
+ ...params.headers,
3260
+ },
3261
+ });
3262
+ }
3263
+ }
3264
+ export class Provider extends HeyApiClient {
3265
+ /**
3266
+ * List providers
3267
+ *
3268
+ * Get a list of all available AI providers, including both available and connected ones.
3269
+ */
3270
+ list(parameters, options) {
3271
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3272
+ return (options?.client ?? this.client).get({
3273
+ url: "/provider",
3274
+ ...options,
3275
+ ...params,
3276
+ });
3277
+ }
3278
+ /**
3279
+ * Get provider auth methods
3280
+ *
3281
+ * Retrieve available authentication methods for all AI providers.
3282
+ */
3283
+ auth(parameters, options) {
3284
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3285
+ return (options?.client ?? this.client).get({
3286
+ url: "/provider/auth",
3287
+ ...options,
3288
+ ...params,
3289
+ });
3290
+ }
3291
+ oauth = new Oauth({ client: this.client });
3292
+ }
3293
+ export class Find extends HeyApiClient {
3294
+ /**
3295
+ * Find text
3296
+ *
3297
+ * Search for text patterns across files in the project using ripgrep.
3298
+ */
3299
+ text(parameters, options) {
3300
+ const params = buildClientParams([parameters], [
3301
+ {
3302
+ args: [
3303
+ { in: "query", key: "directory" },
3304
+ { in: "query", key: "pattern" },
3305
+ ],
3306
+ },
3307
+ ]);
3308
+ return (options?.client ?? this.client).get({
3309
+ url: "/find",
3310
+ ...options,
3311
+ ...params,
3312
+ });
3313
+ }
3314
+ /**
3315
+ * Find files
3316
+ *
3317
+ * Search for files or directories by name or pattern in the project directory.
3318
+ */
3319
+ files(parameters, options) {
3320
+ const params = buildClientParams([parameters], [
3321
+ {
3322
+ args: [
3323
+ { in: "query", key: "directory" },
3324
+ { in: "query", key: "query" },
3325
+ { in: "query", key: "dirs" },
3326
+ { in: "query", key: "type" },
3327
+ { in: "query", key: "limit" },
3328
+ ],
3329
+ },
3330
+ ]);
3331
+ return (options?.client ?? this.client).get({
3332
+ url: "/find/file",
3333
+ ...options,
3334
+ ...params,
3335
+ });
3336
+ }
3337
+ /**
3338
+ * Find symbols
3339
+ *
3340
+ * Search for workspace symbols like functions, classes, and variables using LSP.
3341
+ */
3342
+ symbols(parameters, options) {
3343
+ const params = buildClientParams([parameters], [
3344
+ {
3345
+ args: [
3346
+ { in: "query", key: "directory" },
3347
+ { in: "query", key: "query" },
3348
+ ],
3349
+ },
3350
+ ]);
3351
+ return (options?.client ?? this.client).get({
3352
+ url: "/find/symbol",
3353
+ ...options,
3354
+ ...params,
3355
+ });
3356
+ }
3357
+ }
3358
+ export class File extends HeyApiClient {
3359
+ /**
3360
+ * List files
3361
+ *
3362
+ * List files and directories in a specified path.
3363
+ */
3364
+ list(parameters, options) {
3365
+ const params = buildClientParams([parameters], [
3366
+ {
3367
+ args: [
3368
+ { in: "query", key: "directory" },
3369
+ { in: "query", key: "path" },
3370
+ ],
3371
+ },
3372
+ ]);
3373
+ return (options?.client ?? this.client).get({
3374
+ url: "/file",
3375
+ ...options,
3376
+ ...params,
3377
+ });
3378
+ }
3379
+ /**
3380
+ * Read file
3381
+ *
3382
+ * Read the content of a specified file.
3383
+ */
3384
+ read(parameters, options) {
3385
+ const params = buildClientParams([parameters], [
3386
+ {
3387
+ args: [
3388
+ { in: "query", key: "directory" },
3389
+ { in: "query", key: "path" },
3390
+ ],
3391
+ },
3392
+ ]);
3393
+ return (options?.client ?? this.client).get({
3394
+ url: "/file/content",
3395
+ ...options,
3396
+ ...params,
3397
+ });
3398
+ }
3399
+ /**
3400
+ * Get file status
3401
+ *
3402
+ * Get the git status of all files in the project.
3403
+ */
3404
+ status(parameters, options) {
3405
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3406
+ return (options?.client ?? this.client).get({
3407
+ url: "/file/status",
3408
+ ...options,
3409
+ ...params,
3410
+ });
3411
+ }
3412
+ }
3413
+ export class App extends HeyApiClient {
3414
+ /**
3415
+ * Write log
3416
+ *
3417
+ * Write a log entry to the server logs with specified level and metadata.
3418
+ */
3419
+ log(parameters, options) {
3420
+ const params = buildClientParams([parameters], [
3421
+ {
3422
+ args: [
3423
+ { in: "query", key: "directory" },
3424
+ { in: "body", key: "service" },
3425
+ { in: "body", key: "level" },
3426
+ { in: "body", key: "message" },
3427
+ { in: "body", key: "extra" },
3428
+ ],
3429
+ },
3430
+ ]);
3431
+ return (options?.client ?? this.client).post({
3432
+ url: "/log",
3433
+ ...options,
3434
+ ...params,
3435
+ headers: {
3436
+ "Content-Type": "application/json",
3437
+ ...options?.headers,
3438
+ ...params.headers,
3439
+ },
3440
+ });
3441
+ }
3442
+ }
3443
+ export class Auth extends HeyApiClient {
3444
+ /**
3445
+ * Remove MCP OAuth
3446
+ *
3447
+ * Remove OAuth credentials for an MCP server
3448
+ */
3449
+ remove(parameters, options) {
3450
+ const params = buildClientParams([parameters], [
3451
+ {
3452
+ args: [
3453
+ { in: "path", key: "name" },
3454
+ { in: "query", key: "directory" },
3455
+ ],
3456
+ },
3457
+ ]);
3458
+ return (options?.client ?? this.client).delete({
3459
+ url: "/mcp/{name}/auth",
3460
+ ...options,
3461
+ ...params,
3462
+ });
3463
+ }
3464
+ /**
3465
+ * Start MCP OAuth
3466
+ *
3467
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
3468
+ */
3469
+ start(parameters, options) {
3470
+ const params = buildClientParams([parameters], [
3471
+ {
3472
+ args: [
3473
+ { in: "path", key: "name" },
3474
+ { in: "query", key: "directory" },
3475
+ ],
3476
+ },
3477
+ ]);
3478
+ return (options?.client ?? this.client).post({
3479
+ url: "/mcp/{name}/auth",
3480
+ ...options,
3481
+ ...params,
3482
+ });
3483
+ }
3484
+ /**
3485
+ * Complete MCP OAuth
3486
+ *
3487
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
3488
+ */
3489
+ callback(parameters, options) {
3490
+ const params = buildClientParams([parameters], [
3491
+ {
3492
+ args: [
3493
+ { in: "path", key: "name" },
3494
+ { in: "query", key: "directory" },
3495
+ { in: "body", key: "code" },
3496
+ ],
3497
+ },
3498
+ ]);
3499
+ return (options?.client ?? this.client).post({
3500
+ url: "/mcp/{name}/auth/callback",
3501
+ ...options,
3502
+ ...params,
3503
+ headers: {
3504
+ "Content-Type": "application/json",
3505
+ ...options?.headers,
3506
+ ...params.headers,
3507
+ },
3508
+ });
3509
+ }
3510
+ /**
3511
+ * Authenticate MCP OAuth
3512
+ *
3513
+ * Start OAuth flow and wait for callback (opens browser)
3514
+ */
3515
+ authenticate(parameters, options) {
3516
+ const params = buildClientParams([parameters], [
3517
+ {
3518
+ args: [
3519
+ { in: "path", key: "name" },
3520
+ { in: "query", key: "directory" },
3521
+ ],
3522
+ },
3523
+ ]);
3524
+ return (options?.client ?? this.client).post({
3525
+ url: "/mcp/{name}/auth/authenticate",
3526
+ ...options,
3527
+ ...params,
3528
+ });
3529
+ }
3530
+ /**
3531
+ * Set auth credentials
3532
+ *
3533
+ * Set authentication credentials
3534
+ */
3535
+ set(parameters, options) {
3536
+ const params = buildClientParams([parameters], [
3537
+ {
3538
+ args: [
3539
+ { in: "path", key: "providerID" },
3540
+ { in: "query", key: "directory" },
3541
+ { key: "auth", map: "body" },
3542
+ ],
3543
+ },
3544
+ ]);
3545
+ return (options?.client ?? this.client).put({
3546
+ url: "/auth/{providerID}",
3547
+ ...options,
3548
+ ...params,
3549
+ headers: {
3550
+ "Content-Type": "application/json",
3551
+ ...options?.headers,
3552
+ ...params.headers,
3553
+ },
3554
+ });
3555
+ }
3556
+ }
3557
+ export class Mcp extends HeyApiClient {
3558
+ /**
3559
+ * Get MCP status
3560
+ *
3561
+ * Get the status of all Model Context Protocol (MCP) servers.
3562
+ */
3563
+ status(parameters, options) {
3564
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3565
+ return (options?.client ?? this.client).get({
3566
+ url: "/mcp",
3567
+ ...options,
3568
+ ...params,
3569
+ });
3570
+ }
3571
+ /**
3572
+ * Add MCP server
3573
+ *
3574
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
3575
+ */
3576
+ add(parameters, options) {
3577
+ const params = buildClientParams([parameters], [
3578
+ {
3579
+ args: [
3580
+ { in: "query", key: "directory" },
3581
+ { in: "body", key: "name" },
3582
+ { in: "body", key: "config" },
3583
+ ],
3584
+ },
3585
+ ]);
3586
+ return (options?.client ?? this.client).post({
3587
+ url: "/mcp",
3588
+ ...options,
3589
+ ...params,
3590
+ headers: {
3591
+ "Content-Type": "application/json",
3592
+ ...options?.headers,
3593
+ ...params.headers,
3594
+ },
3595
+ });
3596
+ }
3597
+ /**
3598
+ * Connect an MCP server
3599
+ */
3600
+ connect(parameters, options) {
3601
+ const params = buildClientParams([parameters], [
3602
+ {
3603
+ args: [
3604
+ { in: "path", key: "name" },
3605
+ { in: "query", key: "directory" },
3606
+ ],
3607
+ },
3608
+ ]);
3609
+ return (options?.client ?? this.client).post({
3610
+ url: "/mcp/{name}/connect",
3611
+ ...options,
3612
+ ...params,
3613
+ });
3614
+ }
3615
+ /**
3616
+ * Disconnect an MCP server
3617
+ */
3618
+ disconnect(parameters, options) {
3619
+ const params = buildClientParams([parameters], [
3620
+ {
3621
+ args: [
3622
+ { in: "path", key: "name" },
3623
+ { in: "query", key: "directory" },
3624
+ ],
3625
+ },
3626
+ ]);
3627
+ return (options?.client ?? this.client).post({
3628
+ url: "/mcp/{name}/disconnect",
3629
+ ...options,
3630
+ ...params,
3631
+ });
3632
+ }
3633
+ auth = new Auth({ client: this.client });
3634
+ }
3635
+ export class Resource extends HeyApiClient {
3636
+ /**
3637
+ * Get MCP resources
3638
+ *
3639
+ * Get all available MCP resources from connected servers. Optionally filter by name.
3640
+ */
3641
+ list(parameters, options) {
3642
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3643
+ return (options?.client ?? this.client).get({
3644
+ url: "/experimental/resource",
3645
+ ...options,
3646
+ ...params,
3647
+ });
3648
+ }
3649
+ }
3650
+ export class Experimental extends HeyApiClient {
3651
+ resource = new Resource({ client: this.client });
3652
+ }
3653
+ export class Lsp extends HeyApiClient {
3654
+ /**
3655
+ * Get LSP status
3656
+ *
3657
+ * Get LSP server status
3658
+ */
3659
+ status(parameters, options) {
3660
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3661
+ return (options?.client ?? this.client).get({
3662
+ url: "/lsp",
3663
+ ...options,
3664
+ ...params,
3665
+ });
3666
+ }
3667
+ }
3668
+ export class Formatter extends HeyApiClient {
3669
+ /**
3670
+ * Get formatter status
3671
+ *
3672
+ * Get formatter status
3673
+ */
3674
+ status(parameters, options) {
3675
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3676
+ return (options?.client ?? this.client).get({
3677
+ url: "/formatter",
3678
+ ...options,
3679
+ ...params,
3680
+ });
3681
+ }
3682
+ }
3683
+ export class Event extends HeyApiClient {
3684
+ /**
3685
+ * Subscribe to events
3686
+ *
3687
+ * Get events
3688
+ */
3689
+ subscribe(parameters, options) {
3690
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3691
+ return (options?.client ?? this.client).sse.get({
3692
+ url: "/event",
3693
+ ...options,
3694
+ ...params,
3695
+ });
3696
+ }
3697
+ }
3698
+ export class OpencodeClient extends HeyApiClient {
3699
+ static __registry = new HeyApiRegistry();
3700
+ constructor(args) {
3701
+ super(args);
3702
+ OpencodeClient.__registry.set(this, args?.key);
3703
+ }
3704
+ putAccountMe(parameters, options) {
3705
+ const params = buildClientParams([parameters], [
3706
+ {
3707
+ args: [
3708
+ { in: "body", key: "name" },
3709
+ { in: "body", key: "phone" },
3710
+ { in: "body", key: "regionCode" },
3711
+ ],
3712
+ },
3713
+ ]);
3714
+ return (options?.client ?? this.client).put({
3715
+ url: "/account/me",
3716
+ ...options,
3717
+ ...params,
3718
+ headers: {
3719
+ "Content-Type": "application/json",
3720
+ ...options?.headers,
3721
+ ...params.headers,
3722
+ },
3723
+ });
3724
+ }
3725
+ putAccountPhone(parameters, options) {
3726
+ const params = buildClientParams([parameters], [
3727
+ {
3728
+ args: [
3729
+ { in: "body", key: "phone" },
3730
+ { in: "body", key: "newsletterOptIn" },
3731
+ ],
3732
+ },
3733
+ ]);
3734
+ return (options?.client ?? this.client).put({
3735
+ url: "/account/phone",
3736
+ ...options,
3737
+ ...params,
3738
+ headers: {
3739
+ "Content-Type": "application/json",
3740
+ ...options?.headers,
3741
+ ...params.headers,
3742
+ },
3743
+ });
3744
+ }
3745
+ postAccountAcquisition(parameters, options) {
3746
+ const params = buildClientParams([parameters], [
3747
+ {
3748
+ args: [
3749
+ { in: "body", key: "first" },
3750
+ { in: "body", key: "last" },
3751
+ ],
3752
+ },
3753
+ ]);
3754
+ return (options?.client ?? this.client).post({
3755
+ url: "/account/acquisition",
3756
+ ...options,
3757
+ ...params,
3758
+ headers: {
3759
+ "Content-Type": "application/json",
3760
+ ...options?.headers,
3761
+ ...params.headers,
3762
+ },
3763
+ });
3764
+ }
3765
+ postMapBrochureCharge(parameters, options) {
3766
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "ref" }] }]);
3767
+ return (options?.client ?? this.client).post({
3768
+ url: "/map/brochure/charge",
3769
+ ...options,
3770
+ ...params,
3771
+ headers: {
3772
+ "Content-Type": "application/json",
3773
+ ...options?.headers,
3774
+ ...params.headers,
3775
+ },
3776
+ });
3777
+ }
3778
+ postMapPayCheckout(parameters, options) {
3779
+ const params = buildClientParams([parameters], [
3780
+ {
3781
+ args: [
3782
+ { in: "body", key: "plan" },
3783
+ { in: "body", key: "coupon" },
3784
+ ],
3785
+ },
3786
+ ]);
3787
+ return (options?.client ?? this.client).post({
3788
+ url: "/map/pay/checkout",
3789
+ ...options,
3790
+ ...params,
3791
+ headers: {
3792
+ "Content-Type": "application/json",
3793
+ ...options?.headers,
3794
+ ...params.headers,
3795
+ },
3796
+ });
3797
+ }
3798
+ postMapWalletTopup(parameters, options) {
3799
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "amount" }] }]);
3800
+ return (options?.client ?? this.client).post({
3801
+ url: "/map/wallet/topup",
3802
+ ...options,
3803
+ ...params,
3804
+ headers: {
3805
+ "Content-Type": "application/json",
3806
+ ...options?.headers,
3807
+ ...params.headers,
3808
+ },
3809
+ });
3810
+ }
3811
+ postMapClaim(parameters, options) {
3812
+ const params = buildClientParams([parameters], [
3813
+ {
3814
+ args: [
3815
+ { in: "body", key: "phone" },
3816
+ { in: "body", key: "password" },
3817
+ ],
3818
+ },
3819
+ ]);
3820
+ return (options?.client ?? this.client).post({
3821
+ url: "/map/claim",
3822
+ ...options,
3823
+ ...params,
3824
+ headers: {
3825
+ "Content-Type": "application/json",
3826
+ ...options?.headers,
3827
+ ...params.headers,
3828
+ },
3829
+ });
3830
+ }
3831
+ postMapReferralRedeem(parameters, options) {
3832
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "code" }] }]);
3833
+ return (options?.client ?? this.client).post({
3834
+ url: "/map/referral/redeem",
3835
+ ...options,
3836
+ ...params,
3837
+ headers: {
3838
+ "Content-Type": "application/json",
3839
+ ...options?.headers,
3840
+ ...params.headers,
3841
+ },
3842
+ });
3843
+ }
3844
+ postMapEvents(parameters, options) {
3845
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "events" }] }]);
3846
+ return (options?.client ?? this.client).post({
3847
+ url: "/map/events",
3848
+ ...options,
3849
+ ...params,
3850
+ headers: {
3851
+ "Content-Type": "application/json",
3852
+ ...options?.headers,
3853
+ ...params.headers,
3854
+ },
3855
+ });
3856
+ }
3857
+ postMapAdminWalletCredit(parameters, options) {
3858
+ const params = buildClientParams([parameters], [
3859
+ {
3860
+ args: [
3861
+ { in: "body", key: "accountID" },
3862
+ { in: "body", key: "amount" },
3863
+ { in: "body", key: "reason" },
3864
+ ],
3865
+ },
3866
+ ]);
3867
+ return (options?.client ?? this.client).post({
3868
+ url: "/map/admin/wallet/credit",
3869
+ ...options,
3870
+ ...params,
3871
+ headers: {
3872
+ "Content-Type": "application/json",
3873
+ ...options?.headers,
3874
+ ...params.headers,
3875
+ },
3876
+ });
3877
+ }
3878
+ postMapAdminReferralsRevoke(parameters, options) {
3879
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "id" }] }]);
3880
+ return (options?.client ?? this.client).post({
3881
+ url: "/map/admin/referrals/revoke",
3882
+ ...options,
3883
+ ...params,
3884
+ headers: {
3885
+ "Content-Type": "application/json",
3886
+ ...options?.headers,
3887
+ ...params.headers,
3888
+ },
3889
+ });
3890
+ }
3891
+ postMapAdminPartners(parameters, options) {
3892
+ const params = buildClientParams([parameters], [
3893
+ {
3894
+ args: [
3895
+ { in: "body", key: "slug" },
3896
+ { in: "body", key: "name" },
3897
+ { in: "body", key: "billingEmail" },
3898
+ { in: "body", key: "priceParcelDetail" },
3899
+ { in: "body", key: "creditLimit" },
3900
+ { in: "body", key: "webhookUrl" },
3901
+ { in: "body", key: "tileScope" },
3902
+ ],
3903
+ },
3904
+ ]);
3905
+ return (options?.client ?? this.client).post({
3906
+ url: "/map/admin/partners",
3907
+ ...options,
3908
+ ...params,
3909
+ headers: {
3910
+ "Content-Type": "application/json",
3911
+ ...options?.headers,
3912
+ ...params.headers,
3913
+ },
3914
+ });
3915
+ }
3916
+ patchMapAdminPartnersId(parameters, options) {
3917
+ const params = buildClientParams([parameters], [
3918
+ {
3919
+ args: [
3920
+ { in: "path", key: "id" },
3921
+ { in: "body", key: "name" },
3922
+ { in: "body", key: "billingEmail" },
3923
+ { in: "body", key: "webhookUrl" },
3924
+ { in: "body", key: "status" },
3925
+ { in: "body", key: "priceParcelDetail" },
3926
+ { in: "body", key: "tileScope" },
3927
+ { in: "body", key: "note" },
3928
+ ],
3929
+ },
3930
+ ]);
3931
+ return (options?.client ?? this.client).patch({
3932
+ url: "/map/admin/partners/{id}",
3933
+ ...options,
3934
+ ...params,
3935
+ headers: {
3936
+ "Content-Type": "application/json",
3937
+ ...options?.headers,
3938
+ ...params.headers,
3939
+ },
3940
+ });
3941
+ }
3942
+ postMapAdminPartnersIdKeys(parameters, options) {
3943
+ const params = buildClientParams([parameters], [
3944
+ {
3945
+ args: [
3946
+ { in: "path", key: "id" },
3947
+ { in: "body", key: "kind" },
3948
+ { in: "body", key: "name" },
3949
+ ],
3950
+ },
3951
+ ]);
3952
+ return (options?.client ?? this.client).post({
3953
+ url: "/map/admin/partners/{id}/keys",
3954
+ ...options,
3955
+ ...params,
3956
+ headers: {
3957
+ "Content-Type": "application/json",
3958
+ ...options?.headers,
3959
+ ...params.headers,
3960
+ },
3961
+ });
3962
+ }
3963
+ postMapAdminPartnersIdCreditLimit(parameters, options) {
3964
+ const params = buildClientParams([parameters], [
3965
+ {
3966
+ args: [
3967
+ { in: "path", key: "id" },
3968
+ { in: "body", key: "creditLimit" },
3969
+ ],
3970
+ },
3971
+ ]);
3972
+ return (options?.client ?? this.client).post({
3973
+ url: "/map/admin/partners/{id}/credit-limit",
3974
+ ...options,
3975
+ ...params,
3976
+ headers: {
3977
+ "Content-Type": "application/json",
3978
+ ...options?.headers,
3979
+ ...params.headers,
3980
+ },
3981
+ });
3982
+ }
3983
+ postMapAdminAffiliates(parameters, options) {
3984
+ const params = buildClientParams([parameters], [
3985
+ {
3986
+ args: [
3987
+ { in: "body", key: "code" },
3988
+ { in: "body", key: "accountID" },
3989
+ { in: "body", key: "displayName" },
3990
+ { in: "body", key: "pctMonth" },
3991
+ { in: "body", key: "pctYear" },
3992
+ { in: "body", key: "windowDays" },
3993
+ { in: "body", key: "note" },
3994
+ ],
3995
+ },
3996
+ ]);
3997
+ return (options?.client ?? this.client).post({
3998
+ url: "/map/admin/affiliates",
3999
+ ...options,
4000
+ ...params,
4001
+ headers: {
4002
+ "Content-Type": "application/json",
4003
+ ...options?.headers,
4004
+ ...params.headers,
4005
+ },
4006
+ });
4007
+ }
4008
+ postMapAdminAffiliatesToggle(parameters, options) {
4009
+ const params = buildClientParams([parameters], [
4010
+ {
4011
+ args: [
4012
+ { in: "body", key: "code" },
4013
+ { in: "body", key: "active" },
4014
+ ],
4015
+ },
4016
+ ]);
4017
+ return (options?.client ?? this.client).post({
4018
+ url: "/map/admin/affiliates/toggle",
4019
+ ...options,
4020
+ ...params,
4021
+ headers: {
4022
+ "Content-Type": "application/json",
4023
+ ...options?.headers,
4024
+ ...params.headers,
4025
+ },
4026
+ });
4027
+ }
4028
+ postMapAdminAffiliatesBind(parameters, options) {
4029
+ const params = buildClientParams([parameters], [
4030
+ {
4031
+ args: [
4032
+ { in: "body", key: "accountID" },
4033
+ { in: "body", key: "code" },
4034
+ ],
4035
+ },
4036
+ ]);
4037
+ return (options?.client ?? this.client).post({
4038
+ url: "/map/admin/affiliates/bind",
4039
+ ...options,
4040
+ ...params,
4041
+ headers: {
4042
+ "Content-Type": "application/json",
4043
+ ...options?.headers,
4044
+ ...params.headers,
4045
+ },
4046
+ });
4047
+ }
4048
+ postMapAdminAffiliatePayoutsSettle(parameters, options) {
4049
+ const params = buildClientParams([parameters], [
4050
+ {
4051
+ args: [
4052
+ { in: "body", key: "id" },
4053
+ { in: "body", key: "status" },
4054
+ { in: "body", key: "note" },
4055
+ ],
4056
+ },
4057
+ ]);
4058
+ return (options?.client ?? this.client).post({
4059
+ url: "/map/admin/affiliate-payouts/settle",
4060
+ ...options,
4061
+ ...params,
4062
+ headers: {
4063
+ "Content-Type": "application/json",
4064
+ ...options?.headers,
4065
+ ...params.headers,
4066
+ },
4067
+ });
4068
+ }
4069
+ postMapAdminGrant(parameters, options) {
4070
+ const params = buildClientParams([parameters], [
4071
+ {
4072
+ args: [
4073
+ { in: "body", key: "accountID" },
4074
+ { in: "body", key: "days" },
4075
+ ],
4076
+ },
4077
+ ]);
4078
+ return (options?.client ?? this.client).post({
4079
+ url: "/map/admin/grant",
4080
+ ...options,
4081
+ ...params,
4082
+ headers: {
4083
+ "Content-Type": "application/json",
4084
+ ...options?.headers,
4085
+ ...params.headers,
4086
+ },
4087
+ });
4088
+ }
4089
+ postMapAdminSetAccess(parameters, options) {
4090
+ const params = buildClientParams([parameters], [
4091
+ {
4092
+ args: [
4093
+ { in: "body", key: "accountID" },
4094
+ { in: "body", key: "accessUntil" },
4095
+ ],
4096
+ },
4097
+ ]);
4098
+ return (options?.client ?? this.client).post({
4099
+ url: "/map/admin/set-access",
4100
+ ...options,
4101
+ ...params,
4102
+ headers: {
4103
+ "Content-Type": "application/json",
4104
+ ...options?.headers,
4105
+ ...params.headers,
4106
+ },
4107
+ });
4108
+ }
4109
+ postMapAdminCustomCheckout(parameters, options) {
4110
+ const params = buildClientParams([parameters], [
4111
+ {
4112
+ args: [
4113
+ { in: "body", key: "accountID" },
4114
+ { in: "body", key: "amount" },
4115
+ { in: "body", key: "plan" },
4116
+ ],
4117
+ },
4118
+ ]);
4119
+ return (options?.client ?? this.client).post({
4120
+ url: "/map/admin/custom-checkout",
4121
+ ...options,
4122
+ ...params,
4123
+ headers: {
4124
+ "Content-Type": "application/json",
4125
+ ...options?.headers,
4126
+ ...params.headers,
4127
+ },
4128
+ });
4129
+ }
4130
+ postAffiliateClick(parameters, options) {
4131
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "code" }] }]);
4132
+ return (options?.client ?? this.client).post({
4133
+ url: "/affiliate/click",
4134
+ ...options,
4135
+ ...params,
4136
+ headers: {
4137
+ "Content-Type": "application/json",
4138
+ ...options?.headers,
4139
+ ...params.headers,
4140
+ },
4141
+ });
4142
+ }
4143
+ postAffiliateBind(parameters, options) {
4144
+ const params = buildClientParams([parameters], [
4145
+ {
4146
+ args: [
4147
+ { in: "body", key: "code" },
4148
+ { in: "body", key: "via" },
4149
+ ],
4150
+ },
4151
+ ]);
4152
+ return (options?.client ?? this.client).post({
4153
+ url: "/affiliate/bind",
4154
+ ...options,
4155
+ ...params,
4156
+ headers: {
4157
+ "Content-Type": "application/json",
4158
+ ...options?.headers,
4159
+ ...params.headers,
4160
+ },
4161
+ });
4162
+ }
4163
+ putAffiliateBank(parameters, options) {
4164
+ const params = buildClientParams([parameters], [
4165
+ {
4166
+ args: [
4167
+ { in: "body", key: "bankAccount" },
4168
+ { in: "body", key: "bankName" },
4169
+ { in: "body", key: "bankHolder" },
4170
+ ],
4171
+ },
4172
+ ]);
4173
+ return (options?.client ?? this.client).put({
4174
+ url: "/affiliate/bank",
4175
+ ...options,
4176
+ ...params,
4177
+ headers: {
4178
+ "Content-Type": "application/json",
4179
+ ...options?.headers,
4180
+ ...params.headers,
4181
+ },
4182
+ });
4183
+ }
4184
+ patchWorkspacesIdBranding(parameters, options) {
4185
+ const params = buildClientParams([parameters], [
4186
+ {
4187
+ args: [
4188
+ { in: "path", key: "id" },
4189
+ { in: "body", key: "logoKey" },
4190
+ ],
4191
+ },
4192
+ ]);
4193
+ return (options?.client ?? this.client).patch({
4194
+ url: "/workspaces/{id}/branding",
4195
+ ...options,
4196
+ ...params,
4197
+ headers: {
4198
+ "Content-Type": "application/json",
4199
+ ...options?.headers,
4200
+ ...params.headers,
4201
+ },
4202
+ });
4203
+ }
4204
+ postWorkspacesIdBrandingUploadUrl(parameters, options) {
4205
+ const params = buildClientParams([parameters], [
4206
+ {
4207
+ args: [
4208
+ { in: "path", key: "id" },
4209
+ { in: "body", key: "filename" },
4210
+ { in: "body", key: "size" },
4211
+ { in: "body", key: "contentType" },
4212
+ ],
4213
+ },
4214
+ ]);
4215
+ return (options?.client ?? this.client).post({
4216
+ url: "/workspaces/{id}/branding/upload-url",
4217
+ ...options,
4218
+ ...params,
4219
+ headers: {
4220
+ "Content-Type": "application/json",
4221
+ ...options?.headers,
4222
+ ...params.headers,
4223
+ },
4224
+ });
4225
+ }
4226
+ patchWorkspacesIdGeocoding(parameters, options) {
4227
+ const params = buildClientParams([parameters], [
4228
+ {
4229
+ args: [
4230
+ { in: "path", key: "id" },
4231
+ { in: "body", key: "provider" },
4232
+ { in: "body", key: "apiKey" },
4233
+ ],
4234
+ },
4235
+ ]);
4236
+ return (options?.client ?? this.client).patch({
4237
+ url: "/workspaces/{id}/geocoding",
4238
+ ...options,
4239
+ ...params,
4240
+ headers: {
4241
+ "Content-Type": "application/json",
4242
+ ...options?.headers,
4243
+ ...params.headers,
4244
+ },
4245
+ });
4246
+ }
4247
+ postWorkspacesIdGeocodingTest(parameters, options) {
4248
+ const params = buildClientParams([parameters], [
4249
+ {
4250
+ args: [
4251
+ { in: "path", key: "id" },
4252
+ { in: "body", key: "apiKey" },
4253
+ ],
4254
+ },
4255
+ ]);
4256
+ return (options?.client ?? this.client).post({
4257
+ url: "/workspaces/{id}/geocoding/test",
4258
+ ...options,
4259
+ ...params,
4260
+ headers: {
4261
+ "Content-Type": "application/json",
4262
+ ...options?.headers,
4263
+ ...params.headers,
4264
+ },
4265
+ });
4266
+ }
4267
+ postWorkspacesIdInvite(parameters, options) {
4268
+ const params = buildClientParams([parameters], [
4269
+ {
4270
+ args: [
4271
+ { in: "path", key: "id" },
4272
+ { in: "body", key: "email" },
4273
+ { in: "body", key: "role" },
4274
+ { in: "body", key: "message" },
4275
+ ],
4276
+ },
4277
+ ]);
4278
+ return (options?.client ?? this.client).post({
4279
+ url: "/workspaces/{id}/invite",
4280
+ ...options,
4281
+ ...params,
4282
+ headers: {
4283
+ "Content-Type": "application/json",
4284
+ ...options?.headers,
4285
+ ...params.headers,
4286
+ },
4287
+ });
4288
+ }
4289
+ patchWorkspacesIdMembersMemberId(parameters, options) {
4290
+ const params = buildClientParams([parameters], [
4291
+ {
4292
+ args: [
4293
+ { in: "path", key: "id" },
4294
+ { in: "path", key: "memberId" },
4295
+ { in: "body", key: "role" },
4296
+ ],
4297
+ },
4298
+ ]);
4299
+ return (options?.client ?? this.client).patch({
4300
+ url: "/workspaces/{id}/members/{memberId}",
4301
+ ...options,
4302
+ ...params,
4303
+ headers: {
4304
+ "Content-Type": "application/json",
4305
+ ...options?.headers,
4306
+ ...params.headers,
4307
+ },
4308
+ });
4309
+ }
4310
+ postWorkspacesIdTransferOwnership(parameters, options) {
4311
+ const params = buildClientParams([parameters], [
4312
+ {
4313
+ args: [
4314
+ { in: "path", key: "id" },
4315
+ { in: "body", key: "newOwnerID" },
4316
+ ],
4317
+ },
4318
+ ]);
4319
+ return (options?.client ?? this.client).post({
4320
+ url: "/workspaces/{id}/transfer-ownership",
4321
+ ...options,
4322
+ ...params,
4323
+ headers: {
4324
+ "Content-Type": "application/json",
4325
+ ...options?.headers,
4326
+ ...params.headers,
4327
+ },
4328
+ });
4329
+ }
4330
+ postWorkspacesIdRoles(parameters, options) {
4331
+ const params = buildClientParams([parameters], [
4332
+ {
4333
+ args: [
4334
+ { in: "path", key: "id" },
4335
+ { in: "body", key: "name" },
4336
+ { in: "body", key: "permissions" },
4337
+ ],
4338
+ },
4339
+ ]);
4340
+ return (options?.client ?? this.client).post({
4341
+ url: "/workspaces/{id}/roles",
4342
+ ...options,
4343
+ ...params,
4344
+ headers: {
4345
+ "Content-Type": "application/json",
4346
+ ...options?.headers,
4347
+ ...params.headers,
4348
+ },
4349
+ });
4350
+ }
4351
+ patchWorkspacesIdRolesRoleId(parameters, options) {
4352
+ const params = buildClientParams([parameters], [
4353
+ {
4354
+ args: [
4355
+ { in: "path", key: "id" },
4356
+ { in: "path", key: "roleId" },
4357
+ { in: "body", key: "name" },
4358
+ { in: "body", key: "permissions" },
4359
+ ],
4360
+ },
4361
+ ]);
4362
+ return (options?.client ?? this.client).patch({
4363
+ url: "/workspaces/{id}/roles/{roleId}",
4364
+ ...options,
4365
+ ...params,
4366
+ headers: {
4367
+ "Content-Type": "application/json",
4368
+ ...options?.headers,
4369
+ ...params.headers,
4370
+ },
4371
+ });
4372
+ }
4373
+ putWorkspacesIdMembersMemberIdRoles(parameters, options) {
4374
+ const params = buildClientParams([parameters], [
4375
+ {
4376
+ args: [
4377
+ { in: "path", key: "id" },
4378
+ { in: "path", key: "memberId" },
4379
+ { in: "body", key: "roleIDs" },
4380
+ ],
4381
+ },
4382
+ ]);
4383
+ return (options?.client ?? this.client).put({
4384
+ url: "/workspaces/{id}/members/{memberId}/roles",
4385
+ ...options,
4386
+ ...params,
4387
+ headers: {
4388
+ "Content-Type": "application/json",
4389
+ ...options?.headers,
4390
+ ...params.headers,
4391
+ },
4392
+ });
4393
+ }
4394
+ getWorkspacesIdAudit(parameters, options) {
4395
+ const params = buildClientParams([parameters], [
4396
+ {
4397
+ args: [
4398
+ { in: "path", key: "id" },
4399
+ { in: "query", key: "resource" },
4400
+ { in: "query", key: "userID" },
4401
+ { in: "query", key: "action" },
4402
+ { in: "query", key: "from" },
4403
+ { in: "query", key: "to" },
4404
+ { in: "query", key: "search" },
4405
+ { in: "query", key: "limit" },
4406
+ { in: "query", key: "offset" },
4407
+ ],
4408
+ },
4409
+ ]);
4410
+ return (options?.client ?? this.client).get({
4411
+ url: "/workspaces/{id}/audit",
4412
+ ...options,
4413
+ ...params,
4414
+ });
4415
+ }
4416
+ getInstructions(parameters, options) {
4417
+ const params = buildClientParams([parameters], [
4418
+ {
4419
+ args: [
4420
+ { in: "query", key: "scope" },
4421
+ { in: "query", key: "source" },
4422
+ ],
4423
+ },
4424
+ ]);
4425
+ return (options?.client ?? this.client).get({
4426
+ url: "/instructions",
4427
+ ...options,
4428
+ ...params,
4429
+ });
4430
+ }
4431
+ postInstructions(parameters, options) {
4432
+ const params = buildClientParams([parameters], [
4433
+ {
4434
+ args: [
4435
+ { in: "body", key: "scope" },
4436
+ { in: "body", key: "name" },
4437
+ { in: "body", key: "type" },
4438
+ { in: "body", key: "category" },
4439
+ { in: "body", key: "content" },
4440
+ { in: "body", key: "enabled" },
4441
+ { in: "body", key: "source" },
4442
+ { in: "body", key: "sessionID" },
4443
+ ],
4444
+ },
4445
+ ]);
4446
+ return (options?.client ?? this.client).post({
4447
+ url: "/instructions",
4448
+ ...options,
4449
+ ...params,
4450
+ headers: {
4451
+ "Content-Type": "application/json",
4452
+ ...options?.headers,
4453
+ ...params.headers,
4454
+ },
4455
+ });
4456
+ }
4457
+ deleteInstructionsId(parameters, options) {
4458
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
4459
+ return (options?.client ?? this.client).delete({
4460
+ url: "/instructions/{id}",
4461
+ ...options,
4462
+ ...params,
4463
+ });
4464
+ }
4465
+ patchInstructionsId(parameters, options) {
4466
+ const params = buildClientParams([parameters], [
4467
+ {
4468
+ args: [
4469
+ { in: "path", key: "id" },
4470
+ { in: "body", key: "name" },
4471
+ { in: "body", key: "type" },
4472
+ { in: "body", key: "category" },
4473
+ { in: "body", key: "content" },
4474
+ { in: "body", key: "enabled" },
4475
+ ],
4476
+ },
4477
+ ]);
4478
+ return (options?.client ?? this.client).patch({
4479
+ url: "/instructions/{id}",
4480
+ ...options,
4481
+ ...params,
4482
+ headers: {
4483
+ "Content-Type": "application/json",
4484
+ ...options?.headers,
4485
+ ...params.headers,
4486
+ },
4487
+ });
4488
+ }
4489
+ patchInstructionsIdToggle(parameters, options) {
4490
+ const params = buildClientParams([parameters], [
4491
+ {
4492
+ args: [
4493
+ { in: "path", key: "id" },
4494
+ { in: "body", key: "enabled" },
4495
+ ],
4496
+ },
4497
+ ]);
4498
+ return (options?.client ?? this.client).patch({
4499
+ url: "/instructions/{id}/toggle",
4500
+ ...options,
4501
+ ...params,
4502
+ headers: {
4503
+ "Content-Type": "application/json",
4504
+ ...options?.headers,
4505
+ ...params.headers,
4506
+ },
4507
+ });
4508
+ }
4509
+ global = new Global({ client: this.client });
4510
+ workspaces = new Workspaces({ client: this.client });
4511
+ project = new Project({ client: this.client });
4512
+ internal = new Internal({ client: this.client });
4513
+ nbp = new Nbp({ client: this.client });
4514
+ agent = new Agent({ client: this.client });
4515
+ pty = new Pty({ client: this.client });
4516
+ config = new Config({ client: this.client });
4517
+ tool = new Tool({ client: this.client });
4518
+ instance = new Instance({ client: this.client });
4519
+ path = new Path({ client: this.client });
4520
+ worktree = new Worktree({ client: this.client });
4521
+ vcs = new Vcs({ client: this.client });
4522
+ session = new Session({ client: this.client });
4523
+ part = new Part({ client: this.client });
4524
+ permission = new Permission({ client: this.client });
4525
+ question = new Question({ client: this.client });
4526
+ command = new Command({ client: this.client });
4527
+ provider = new Provider({ client: this.client });
4528
+ find = new Find({ client: this.client });
4529
+ file = new File({ client: this.client });
4530
+ app = new App({ client: this.client });
4531
+ mcp = new Mcp({ client: this.client });
4532
+ experimental = new Experimental({ client: this.client });
4533
+ lsp = new Lsp({ client: this.client });
4534
+ formatter = new Formatter({ client: this.client });
4535
+ auth = new Auth({ client: this.client });
4536
+ event = new Event({ client: this.client });
4537
+ }