@onesi/genesis 0.1.13 → 0.2.1

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 (80) hide show
  1. package/README.md +1 -1
  2. package/dist/auto.d.ts +1010 -0
  3. package/dist/auto.js +125 -0
  4. package/dist/beacons.d.ts +42 -0
  5. package/dist/beacons.js +71 -0
  6. package/dist/blinds-owner-enrollment.d.ts +121 -0
  7. package/dist/blinds-owner-enrollment.js +23 -2
  8. package/dist/boxes.d.ts +1074 -0
  9. package/dist/boxes.js +338 -0
  10. package/dist/client.d.ts +3 -19947
  11. package/dist/client.js +127 -18
  12. package/dist/errors.d.ts +6 -0
  13. package/dist/errors.js +38 -3
  14. package/dist/flares.d.ts +32 -0
  15. package/dist/flares.js +5 -0
  16. package/dist/fleets.d.ts +32 -0
  17. package/dist/fleets.js +59 -6
  18. package/dist/flocks.d.ts +334 -1
  19. package/dist/flocks.js +85 -0
  20. package/dist/foundry.d.ts +429 -0
  21. package/dist/foundry.js +135 -0
  22. package/dist/garden.d.ts +754 -0
  23. package/dist/garden.js +76 -0
  24. package/dist/gateway.d.ts +365 -0
  25. package/dist/gateway.js +82 -0
  26. package/dist/gears.d.ts +121 -2
  27. package/dist/gears.js +24 -2
  28. package/dist/generated/operations.d.ts +3 -19948
  29. package/dist/generated/operations.js +64214 -13423
  30. package/dist/generated/schema.d.ts +85708 -17364
  31. package/dist/genesis.d.ts +9041 -1250
  32. package/dist/genesis.js +92 -25
  33. package/dist/genesis.openapi.json +133172 -31267
  34. package/dist/henry.d.ts +202 -1
  35. package/dist/henry.js +223 -0
  36. package/dist/hives-cells.d.ts +8 -3
  37. package/dist/hives-cells.js +17 -4
  38. package/dist/hives-environment.d.ts +9 -0
  39. package/dist/hives-environment.js +22 -0
  40. package/dist/hives-node.js +4 -1
  41. package/dist/hives-operations.d.ts +121 -3
  42. package/dist/hives-operations.js +2 -0
  43. package/dist/hives-platform.d.ts +149 -0
  44. package/dist/hives-platform.js +183 -0
  45. package/dist/hives-resources-transport.d.ts +7 -1
  46. package/dist/hives-resources-transport.js +10 -2
  47. package/dist/hives-sse.d.ts +24 -0
  48. package/dist/hives-sse.js +111 -0
  49. package/dist/hives-topics.d.ts +4 -3
  50. package/dist/hives-topics.js +9 -4
  51. package/dist/iam-directory.d.ts +8 -0
  52. package/dist/iam-directory.js +23 -0
  53. package/dist/iam.d.ts +397 -0
  54. package/dist/iam.js +92 -0
  55. package/dist/idempotency.d.ts +3 -0
  56. package/dist/idempotency.js +27 -0
  57. package/dist/index.d.ts +22 -6
  58. package/dist/index.js +19 -5
  59. package/dist/instances.d.ts +177 -2
  60. package/dist/instances.js +37 -5
  61. package/dist/minds-agent.d.ts +28 -0
  62. package/dist/minds-agent.js +53 -10
  63. package/dist/minds-engine.d.ts +394 -0
  64. package/dist/minds-engine.js +555 -0
  65. package/dist/minds.d.ts +109 -1
  66. package/dist/minds.js +49 -14
  67. package/dist/orgs.d.ts +405 -0
  68. package/dist/orgs.js +63 -0
  69. package/dist/redact.d.ts +37 -0
  70. package/dist/redact.js +330 -0
  71. package/dist/runner.d.ts +4 -0
  72. package/dist/runner.js +1 -0
  73. package/dist/scopes.d.ts +316 -0
  74. package/dist/scopes.js +40 -0
  75. package/dist/taps.d.ts +118 -0
  76. package/dist/taps.js +45 -0
  77. package/dist/traces.d.ts +574 -0
  78. package/dist/traces.js +97 -0
  79. package/dist/types.d.ts +12 -1
  80. package/package.json +1 -1
@@ -0,0 +1,754 @@
1
+ import type { GenesisClient } from './client.js';
2
+ import type { OperationInput as In } from './types.js';
3
+ type Page = {
4
+ limit?: number;
5
+ offset?: number;
6
+ };
7
+ type SpendStatus = 'requires_authority' | 'succeeded' | 'failed' | 'cancelled';
8
+ /** Garden (finance): books, chart of accounts, journal, customers and vendors, invoices, payments, payouts,
9
+ * reports and the audit trail. Changes to an existing record take the `version` you read (sent as If-Match);
10
+ * payments, payouts and invoice receipts take an optional idempotency key (a retry returns the first result). */
11
+ export declare function gardenModule(client: GenesisClient): {
12
+ whoami: () => Promise<{
13
+ org: string;
14
+ principal: string;
15
+ kind: "api_key" | "m2m_token" | "bridge_session";
16
+ scopes: string[];
17
+ }>;
18
+ books: {
19
+ list: (includeArchived?: boolean) => Promise<{
20
+ data: import("./index.js").components["schemas"]["Garden.Books"][];
21
+ }>;
22
+ get: (books: string) => Promise<{
23
+ id: string;
24
+ name: string;
25
+ currency: string;
26
+ auto_org_id: string | null;
27
+ status: "active" | "archived";
28
+ version: number;
29
+ created_at: string;
30
+ updated_at: string;
31
+ }>;
32
+ create: (body: In<"garden_createBooks">["body"]) => Promise<{
33
+ id: string;
34
+ name: string;
35
+ currency: string;
36
+ auto_org_id: string | null;
37
+ status: "active" | "archived";
38
+ version: number;
39
+ created_at: string;
40
+ updated_at: string;
41
+ }>;
42
+ update: (books: string, version: number | string, body: In<"garden_updateBooks">["body"]) => Promise<{
43
+ id: string;
44
+ name: string;
45
+ currency: string;
46
+ auto_org_id: string | null;
47
+ status: "active" | "archived";
48
+ version: number;
49
+ created_at: string;
50
+ updated_at: string;
51
+ }>;
52
+ archive: (books: string, version: number | string) => Promise<{
53
+ id: string;
54
+ name: string;
55
+ currency: string;
56
+ auto_org_id: string | null;
57
+ status: "active" | "archived";
58
+ version: number;
59
+ created_at: string;
60
+ updated_at: string;
61
+ }>;
62
+ accounts: (books: string, includeArchived?: boolean) => Promise<{
63
+ data: import("./index.js").components["schemas"]["Garden.Account"][];
64
+ }>;
65
+ createAccount: (books: string, body: In<"garden_createAccount">["body"]) => Promise<{
66
+ id: string;
67
+ books_id: string;
68
+ code: string;
69
+ name: string;
70
+ type: import("./index.js").components["schemas"]["Garden.AccountType"];
71
+ subtype: string;
72
+ normal_balance: "debit" | "credit";
73
+ status: "active" | "archived";
74
+ balance?: number;
75
+ version: number;
76
+ created_at: string;
77
+ updated_at: string;
78
+ }>;
79
+ journalEntries: (books: string, filter?: {
80
+ status?: "draft" | "posted" | "reversed" | "discarded";
81
+ from?: string;
82
+ to?: string;
83
+ } & Page) => Promise<{
84
+ data: import("./index.js").components["schemas"]["Garden.JournalEntry"][];
85
+ }>;
86
+ createJournalEntry: (books: string, body: In<"garden_createJournalEntry">["body"]) => Promise<{
87
+ id: string;
88
+ books_id: string;
89
+ number: string | null;
90
+ entry_date: string;
91
+ description: string;
92
+ memo: string | null;
93
+ status: "draft" | "posted" | "reversed" | "discarded";
94
+ source: {
95
+ type: string;
96
+ id: string;
97
+ } | null;
98
+ reverses_id: string | null;
99
+ reversed_by_id: string | null;
100
+ lines: import("./index.js").components["schemas"]["Garden.JournalLine"][];
101
+ total: number;
102
+ created_by: string;
103
+ posted_at: string | null;
104
+ version: number;
105
+ created_at: string;
106
+ updated_at: string;
107
+ }>;
108
+ counterparties: (books: string, filter?: {
109
+ kind?: "customer" | "vendor";
110
+ include_archived?: boolean;
111
+ }) => Promise<{
112
+ data: import("./index.js").components["schemas"]["Garden.Counterparty"][];
113
+ }>;
114
+ createCounterparty: (books: string, body: In<"garden_createCounterparty">["body"]) => Promise<{
115
+ id: string;
116
+ books_id: string;
117
+ name: string;
118
+ email: string | null;
119
+ kind: "customer" | "vendor" | "both";
120
+ principal: string | null;
121
+ status: "active" | "archived";
122
+ version: number;
123
+ created_at: string;
124
+ updated_at: string;
125
+ }>;
126
+ invoices: (books: string, filter?: {
127
+ status?: In<"garden_listInvoices">["status"];
128
+ customer_id?: string;
129
+ } & Page) => Promise<{
130
+ data: import("./index.js").components["schemas"]["Garden.Invoice"][];
131
+ }>;
132
+ createInvoice: (books: string, body: In<"garden_createInvoice">["body"]) => Promise<{
133
+ id: string;
134
+ books_id: string;
135
+ number: string | null;
136
+ customer_id: string;
137
+ currency: string;
138
+ issue_date: string;
139
+ due_date: string;
140
+ memo: string | null;
141
+ lines: import("./index.js").components["schemas"]["Garden.InvoiceLine"][];
142
+ subtotal: number;
143
+ tax: number;
144
+ total: number;
145
+ amount_paid: number;
146
+ amount_written_off: number;
147
+ amount_due: number;
148
+ status: import("./index.js").components["schemas"]["Garden.InvoiceStatus"];
149
+ journal_entry_id: string | null;
150
+ created_by: string;
151
+ finalized_at: string | null;
152
+ paid_at: string | null;
153
+ voided_at: string | null;
154
+ version: number;
155
+ created_at: string;
156
+ updated_at: string;
157
+ }>;
158
+ payments: (books: string, filter?: {
159
+ status?: SpendStatus;
160
+ } & Page) => Promise<{
161
+ data: import("./index.js").components["schemas"]["Garden.Disbursement"][];
162
+ }>;
163
+ /** 201 when it settled, 202 while it waits for authority, 200 when replayed with the same key. */
164
+ createPayment: (books: string, body: In<"garden_createPayment">["body"], idempotencyKey?: string) => Promise<{
165
+ id: string;
166
+ object: "payment" | "payout";
167
+ books_id: string;
168
+ type: string;
169
+ counterparty_id: string | null;
170
+ amount: number;
171
+ currency: string;
172
+ from_account_id: string;
173
+ to_account_id: string;
174
+ memo: string;
175
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
176
+ livemode: false;
177
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
178
+ authority: unknown;
179
+ failure: unknown;
180
+ requested_by: string;
181
+ authorized_by: string | null;
182
+ journal_entry_id: string | null;
183
+ settled_at: string | null;
184
+ cancelled_at: string | null;
185
+ version: number;
186
+ created_at: string;
187
+ updated_at: string;
188
+ }>;
189
+ payouts: (books: string, filter?: {
190
+ status?: SpendStatus;
191
+ } & Page) => Promise<{
192
+ data: import("./index.js").components["schemas"]["Garden.Disbursement"][];
193
+ }>;
194
+ /** Needs garden:manage. 201 when it settled, 202 while it waits for authority, 200 when replayed with the same key. */
195
+ createPayout: (books: string, body: In<"garden_createPayout">["body"], idempotencyKey?: string) => Promise<{
196
+ id: string;
197
+ object: "payment" | "payout";
198
+ books_id: string;
199
+ type: string;
200
+ counterparty_id: string | null;
201
+ amount: number;
202
+ currency: string;
203
+ from_account_id: string;
204
+ to_account_id: string;
205
+ memo: string;
206
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
207
+ livemode: false;
208
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
209
+ authority: unknown;
210
+ failure: unknown;
211
+ requested_by: string;
212
+ authorized_by: string | null;
213
+ journal_entry_id: string | null;
214
+ settled_at: string | null;
215
+ cancelled_at: string | null;
216
+ version: number;
217
+ created_at: string;
218
+ updated_at: string;
219
+ }>;
220
+ /** Oldest first from `after` (response `next_after`), or newest first with `order: 'desc'` from `before` (response `next_before`). */
221
+ events: (books: string, page?: {
222
+ order?: "asc" | "desc";
223
+ after?: number;
224
+ before?: number;
225
+ limit?: number;
226
+ }) => Promise<{
227
+ data: import("./index.js").components["schemas"]["Garden.Event"][];
228
+ next_after?: number | null;
229
+ next_before?: number | null;
230
+ }>;
231
+ verifyEvents: (books: string) => Promise<{
232
+ ok: boolean;
233
+ events: number;
234
+ head?: string;
235
+ broken_at?: number;
236
+ }>;
237
+ };
238
+ reports: {
239
+ trialBalance: (books: string, asOf?: string) => Promise<{
240
+ books_id: string;
241
+ currency: string;
242
+ as_of: string;
243
+ accounts: {
244
+ account_id: string;
245
+ code: string;
246
+ name: string;
247
+ type: import("./index.js").components["schemas"]["Garden.AccountType"];
248
+ subtype: string;
249
+ debits: number;
250
+ credits: number;
251
+ balance: number;
252
+ debit_balance: number;
253
+ credit_balance: number;
254
+ }[];
255
+ total_debits: number;
256
+ total_credits: number;
257
+ balanced: boolean;
258
+ }>;
259
+ balanceSheet: (books: string, asOf?: string) => Promise<{
260
+ books_id: string;
261
+ currency: string;
262
+ as_of: string;
263
+ assets: import("./index.js").components["schemas"]["Garden.ReportLine"][];
264
+ liabilities: import("./index.js").components["schemas"]["Garden.ReportLine"][];
265
+ equity: import("./index.js").components["schemas"]["Garden.ReportLine"][];
266
+ current_earnings: number;
267
+ total_assets: number;
268
+ total_liabilities: number;
269
+ total_equity: number;
270
+ balanced: boolean;
271
+ }>;
272
+ incomeStatement: (books: string, from: string, to: string) => Promise<{
273
+ books_id: string;
274
+ currency: string;
275
+ from: string;
276
+ to: string;
277
+ revenue: import("./index.js").components["schemas"]["Garden.ReportLine"][];
278
+ expenses: import("./index.js").components["schemas"]["Garden.ReportLine"][];
279
+ total_revenue: number;
280
+ total_expenses: number;
281
+ net_income: number;
282
+ margin_bps: number | null;
283
+ }>;
284
+ arAging: (books: string, asOf?: string) => Promise<{
285
+ books_id: string;
286
+ currency: string;
287
+ as_of: string;
288
+ invoices: {
289
+ invoice_id: string;
290
+ number: string | null;
291
+ customer_id: string;
292
+ customer_name: string;
293
+ due_date: string;
294
+ days_past_due: number;
295
+ amount_due: number;
296
+ bucket: "current" | "1_30" | "31_60" | "61_90" | "over_90";
297
+ }[];
298
+ buckets: {
299
+ current: number;
300
+ "1_30": number;
301
+ "31_60": number;
302
+ "61_90": number;
303
+ over_90: number;
304
+ };
305
+ total_due: number;
306
+ }>;
307
+ };
308
+ accounts: {
309
+ get: (account: string) => Promise<{
310
+ id: string;
311
+ books_id: string;
312
+ code: string;
313
+ name: string;
314
+ type: import("./index.js").components["schemas"]["Garden.AccountType"];
315
+ subtype: string;
316
+ normal_balance: "debit" | "credit";
317
+ status: "active" | "archived";
318
+ balance?: number;
319
+ version: number;
320
+ created_at: string;
321
+ updated_at: string;
322
+ }>;
323
+ update: (account: string, version: number | string, body: In<"garden_updateAccount">["body"]) => Promise<{
324
+ id: string;
325
+ books_id: string;
326
+ code: string;
327
+ name: string;
328
+ type: import("./index.js").components["schemas"]["Garden.AccountType"];
329
+ subtype: string;
330
+ normal_balance: "debit" | "credit";
331
+ status: "active" | "archived";
332
+ balance?: number;
333
+ version: number;
334
+ created_at: string;
335
+ updated_at: string;
336
+ }>;
337
+ };
338
+ journalEntries: {
339
+ get: (entry: string) => Promise<{
340
+ id: string;
341
+ books_id: string;
342
+ number: string | null;
343
+ entry_date: string;
344
+ description: string;
345
+ memo: string | null;
346
+ status: "draft" | "posted" | "reversed" | "discarded";
347
+ source: {
348
+ type: string;
349
+ id: string;
350
+ } | null;
351
+ reverses_id: string | null;
352
+ reversed_by_id: string | null;
353
+ lines: import("./index.js").components["schemas"]["Garden.JournalLine"][];
354
+ total: number;
355
+ created_by: string;
356
+ posted_at: string | null;
357
+ version: number;
358
+ created_at: string;
359
+ updated_at: string;
360
+ }>;
361
+ update: (entry: string, version: number | string, body: In<"garden_updateJournalEntry">["body"]) => Promise<{
362
+ id: string;
363
+ books_id: string;
364
+ number: string | null;
365
+ entry_date: string;
366
+ description: string;
367
+ memo: string | null;
368
+ status: "draft" | "posted" | "reversed" | "discarded";
369
+ source: {
370
+ type: string;
371
+ id: string;
372
+ } | null;
373
+ reverses_id: string | null;
374
+ reversed_by_id: string | null;
375
+ lines: import("./index.js").components["schemas"]["Garden.JournalLine"][];
376
+ total: number;
377
+ created_by: string;
378
+ posted_at: string | null;
379
+ version: number;
380
+ created_at: string;
381
+ updated_at: string;
382
+ }>;
383
+ discard: (entry: string, version: number | string) => Promise<{
384
+ id: string;
385
+ books_id: string;
386
+ number: string | null;
387
+ entry_date: string;
388
+ description: string;
389
+ memo: string | null;
390
+ status: "draft" | "posted" | "reversed" | "discarded";
391
+ source: {
392
+ type: string;
393
+ id: string;
394
+ } | null;
395
+ reverses_id: string | null;
396
+ reversed_by_id: string | null;
397
+ lines: import("./index.js").components["schemas"]["Garden.JournalLine"][];
398
+ total: number;
399
+ created_by: string;
400
+ posted_at: string | null;
401
+ version: number;
402
+ created_at: string;
403
+ updated_at: string;
404
+ }>;
405
+ post: (entry: string, version: number | string) => Promise<{
406
+ id: string;
407
+ books_id: string;
408
+ number: string | null;
409
+ entry_date: string;
410
+ description: string;
411
+ memo: string | null;
412
+ status: "draft" | "posted" | "reversed" | "discarded";
413
+ source: {
414
+ type: string;
415
+ id: string;
416
+ } | null;
417
+ reverses_id: string | null;
418
+ reversed_by_id: string | null;
419
+ lines: import("./index.js").components["schemas"]["Garden.JournalLine"][];
420
+ total: number;
421
+ created_by: string;
422
+ posted_at: string | null;
423
+ version: number;
424
+ created_at: string;
425
+ updated_at: string;
426
+ }>;
427
+ reverse: (entry: string, body?: In<"garden_reverseJournalEntry">["body"]) => Promise<{
428
+ reversed: import("./index.js").components["schemas"]["Garden.JournalEntry"];
429
+ reversal: import("./index.js").components["schemas"]["Garden.JournalEntry"];
430
+ }>;
431
+ };
432
+ counterparties: {
433
+ get: (counterparty: string) => Promise<{
434
+ id: string;
435
+ books_id: string;
436
+ name: string;
437
+ email: string | null;
438
+ kind: "customer" | "vendor" | "both";
439
+ principal: string | null;
440
+ status: "active" | "archived";
441
+ version: number;
442
+ created_at: string;
443
+ updated_at: string;
444
+ }>;
445
+ update: (counterparty: string, version: number | string, body: In<"garden_updateCounterparty">["body"]) => Promise<{
446
+ id: string;
447
+ books_id: string;
448
+ name: string;
449
+ email: string | null;
450
+ kind: "customer" | "vendor" | "both";
451
+ principal: string | null;
452
+ status: "active" | "archived";
453
+ version: number;
454
+ created_at: string;
455
+ updated_at: string;
456
+ }>;
457
+ };
458
+ invoices: {
459
+ get: (invoice: string) => Promise<{
460
+ id: string;
461
+ books_id: string;
462
+ number: string | null;
463
+ customer_id: string;
464
+ currency: string;
465
+ issue_date: string;
466
+ due_date: string;
467
+ memo: string | null;
468
+ lines: import("./index.js").components["schemas"]["Garden.InvoiceLine"][];
469
+ subtotal: number;
470
+ tax: number;
471
+ total: number;
472
+ amount_paid: number;
473
+ amount_written_off: number;
474
+ amount_due: number;
475
+ status: import("./index.js").components["schemas"]["Garden.InvoiceStatus"];
476
+ journal_entry_id: string | null;
477
+ created_by: string;
478
+ finalized_at: string | null;
479
+ paid_at: string | null;
480
+ voided_at: string | null;
481
+ version: number;
482
+ created_at: string;
483
+ updated_at: string;
484
+ } & {
485
+ receipts: import("./index.js").components["schemas"]["Garden.Receipt"][];
486
+ }>;
487
+ update: (invoice: string, version: number | string, body: In<"garden_updateInvoice">["body"]) => Promise<{
488
+ id: string;
489
+ books_id: string;
490
+ number: string | null;
491
+ customer_id: string;
492
+ currency: string;
493
+ issue_date: string;
494
+ due_date: string;
495
+ memo: string | null;
496
+ lines: import("./index.js").components["schemas"]["Garden.InvoiceLine"][];
497
+ subtotal: number;
498
+ tax: number;
499
+ total: number;
500
+ amount_paid: number;
501
+ amount_written_off: number;
502
+ amount_due: number;
503
+ status: import("./index.js").components["schemas"]["Garden.InvoiceStatus"];
504
+ journal_entry_id: string | null;
505
+ created_by: string;
506
+ finalized_at: string | null;
507
+ paid_at: string | null;
508
+ voided_at: string | null;
509
+ version: number;
510
+ created_at: string;
511
+ updated_at: string;
512
+ }>;
513
+ finalize: (invoice: string, version: number | string) => Promise<{
514
+ id: string;
515
+ books_id: string;
516
+ number: string | null;
517
+ customer_id: string;
518
+ currency: string;
519
+ issue_date: string;
520
+ due_date: string;
521
+ memo: string | null;
522
+ lines: import("./index.js").components["schemas"]["Garden.InvoiceLine"][];
523
+ subtotal: number;
524
+ tax: number;
525
+ total: number;
526
+ amount_paid: number;
527
+ amount_written_off: number;
528
+ amount_due: number;
529
+ status: import("./index.js").components["schemas"]["Garden.InvoiceStatus"];
530
+ journal_entry_id: string | null;
531
+ created_by: string;
532
+ finalized_at: string | null;
533
+ paid_at: string | null;
534
+ voided_at: string | null;
535
+ version: number;
536
+ created_at: string;
537
+ updated_at: string;
538
+ }>;
539
+ void: (invoice: string, version: number | string, body?: In<"garden_voidInvoice">["body"]) => Promise<{
540
+ id: string;
541
+ books_id: string;
542
+ number: string | null;
543
+ customer_id: string;
544
+ currency: string;
545
+ issue_date: string;
546
+ due_date: string;
547
+ memo: string | null;
548
+ lines: import("./index.js").components["schemas"]["Garden.InvoiceLine"][];
549
+ subtotal: number;
550
+ tax: number;
551
+ total: number;
552
+ amount_paid: number;
553
+ amount_written_off: number;
554
+ amount_due: number;
555
+ status: import("./index.js").components["schemas"]["Garden.InvoiceStatus"];
556
+ journal_entry_id: string | null;
557
+ created_by: string;
558
+ finalized_at: string | null;
559
+ paid_at: string | null;
560
+ voided_at: string | null;
561
+ version: number;
562
+ created_at: string;
563
+ updated_at: string;
564
+ }>;
565
+ markUncollectible: (invoice: string, version: number | string, body?: In<"garden_markInvoiceUncollectible">["body"]) => Promise<{
566
+ id: string;
567
+ books_id: string;
568
+ number: string | null;
569
+ customer_id: string;
570
+ currency: string;
571
+ issue_date: string;
572
+ due_date: string;
573
+ memo: string | null;
574
+ lines: import("./index.js").components["schemas"]["Garden.InvoiceLine"][];
575
+ subtotal: number;
576
+ tax: number;
577
+ total: number;
578
+ amount_paid: number;
579
+ amount_written_off: number;
580
+ amount_due: number;
581
+ status: import("./index.js").components["schemas"]["Garden.InvoiceStatus"];
582
+ journal_entry_id: string | null;
583
+ created_by: string;
584
+ finalized_at: string | null;
585
+ paid_at: string | null;
586
+ voided_at: string | null;
587
+ version: number;
588
+ created_at: string;
589
+ updated_at: string;
590
+ }>;
591
+ /** 201 when recorded, 200 when replayed with the same key. */
592
+ recordPayment: (invoice: string, body: In<"garden_recordInvoicePayment">["body"], idempotencyKey?: string) => Promise<{
593
+ invoice: import("./index.js").components["schemas"]["Garden.Invoice"];
594
+ receipt: import("./index.js").components["schemas"]["Garden.Receipt"];
595
+ }>;
596
+ };
597
+ payments: {
598
+ get: (payment: string) => Promise<{
599
+ id: string;
600
+ object: "payment" | "payout";
601
+ books_id: string;
602
+ type: string;
603
+ counterparty_id: string | null;
604
+ amount: number;
605
+ currency: string;
606
+ from_account_id: string;
607
+ to_account_id: string;
608
+ memo: string;
609
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
610
+ livemode: false;
611
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
612
+ authority: unknown;
613
+ failure: unknown;
614
+ requested_by: string;
615
+ authorized_by: string | null;
616
+ journal_entry_id: string | null;
617
+ settled_at: string | null;
618
+ cancelled_at: string | null;
619
+ version: number;
620
+ created_at: string;
621
+ updated_at: string;
622
+ }>;
623
+ /** As the principal Auto escalated to: 200 when it settled or failed, 202 while it still waits. */
624
+ authorize: (payment: string) => Promise<{
625
+ id: string;
626
+ object: "payment" | "payout";
627
+ books_id: string;
628
+ type: string;
629
+ counterparty_id: string | null;
630
+ amount: number;
631
+ currency: string;
632
+ from_account_id: string;
633
+ to_account_id: string;
634
+ memo: string;
635
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
636
+ livemode: false;
637
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
638
+ authority: unknown;
639
+ failure: unknown;
640
+ requested_by: string;
641
+ authorized_by: string | null;
642
+ journal_entry_id: string | null;
643
+ settled_at: string | null;
644
+ cancelled_at: string | null;
645
+ version: number;
646
+ created_at: string;
647
+ updated_at: string;
648
+ }>;
649
+ cancel: (payment: string, body?: In<"garden_cancelPayment">["body"]) => Promise<{
650
+ id: string;
651
+ object: "payment" | "payout";
652
+ books_id: string;
653
+ type: string;
654
+ counterparty_id: string | null;
655
+ amount: number;
656
+ currency: string;
657
+ from_account_id: string;
658
+ to_account_id: string;
659
+ memo: string;
660
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
661
+ livemode: false;
662
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
663
+ authority: unknown;
664
+ failure: unknown;
665
+ requested_by: string;
666
+ authorized_by: string | null;
667
+ journal_entry_id: string | null;
668
+ settled_at: string | null;
669
+ cancelled_at: string | null;
670
+ version: number;
671
+ created_at: string;
672
+ updated_at: string;
673
+ }>;
674
+ };
675
+ /** Payout authorize and cancel need garden:manage. */
676
+ payouts: {
677
+ get: (payout: string) => Promise<{
678
+ id: string;
679
+ object: "payment" | "payout";
680
+ books_id: string;
681
+ type: string;
682
+ counterparty_id: string | null;
683
+ amount: number;
684
+ currency: string;
685
+ from_account_id: string;
686
+ to_account_id: string;
687
+ memo: string;
688
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
689
+ livemode: false;
690
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
691
+ authority: unknown;
692
+ failure: unknown;
693
+ requested_by: string;
694
+ authorized_by: string | null;
695
+ journal_entry_id: string | null;
696
+ settled_at: string | null;
697
+ cancelled_at: string | null;
698
+ version: number;
699
+ created_at: string;
700
+ updated_at: string;
701
+ }>;
702
+ authorize: (payout: string) => Promise<{
703
+ id: string;
704
+ object: "payment" | "payout";
705
+ books_id: string;
706
+ type: string;
707
+ counterparty_id: string | null;
708
+ amount: number;
709
+ currency: string;
710
+ from_account_id: string;
711
+ to_account_id: string;
712
+ memo: string;
713
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
714
+ livemode: false;
715
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
716
+ authority: unknown;
717
+ failure: unknown;
718
+ requested_by: string;
719
+ authorized_by: string | null;
720
+ journal_entry_id: string | null;
721
+ settled_at: string | null;
722
+ cancelled_at: string | null;
723
+ version: number;
724
+ created_at: string;
725
+ updated_at: string;
726
+ }>;
727
+ cancel: (payout: string, body?: In<"garden_cancelPayout">["body"]) => Promise<{
728
+ id: string;
729
+ object: "payment" | "payout";
730
+ books_id: string;
731
+ type: string;
732
+ counterparty_id: string | null;
733
+ amount: number;
734
+ currency: string;
735
+ from_account_id: string;
736
+ to_account_id: string;
737
+ memo: string;
738
+ rail: import("./index.js").components["schemas"]["Garden.Rail"];
739
+ livemode: false;
740
+ status: import("./index.js").components["schemas"]["Garden.DisbursementStatus"];
741
+ authority: unknown;
742
+ failure: unknown;
743
+ requested_by: string;
744
+ authorized_by: string | null;
745
+ journal_entry_id: string | null;
746
+ settled_at: string | null;
747
+ cancelled_at: string | null;
748
+ version: number;
749
+ created_at: string;
750
+ updated_at: string;
751
+ }>;
752
+ };
753
+ };
754
+ export {};