@renterra/sdk 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2744 @@
1
+ export interface paths {
2
+ "/v1/customers": {
3
+ parameters: {
4
+ query?: never;
5
+ header?: never;
6
+ path?: never;
7
+ cookie?: never;
8
+ };
9
+ /**
10
+ * List customers
11
+ * @description Returns customers for the authenticated organization, ordered by most recently updated first.
12
+ */
13
+ get: operations["listCustomers"];
14
+ put?: never;
15
+ /** Create a customer */
16
+ post: operations["createCustomer"];
17
+ delete?: never;
18
+ options?: never;
19
+ head?: never;
20
+ patch?: never;
21
+ trace?: never;
22
+ };
23
+ "/v1/customers/{id}": {
24
+ parameters: {
25
+ query?: never;
26
+ header?: never;
27
+ path?: never;
28
+ cookie?: never;
29
+ };
30
+ /** Get a customer */
31
+ get: operations["getCustomer"];
32
+ /** Update a customer */
33
+ put: operations["updateCustomer"];
34
+ post?: never;
35
+ delete?: never;
36
+ options?: never;
37
+ head?: never;
38
+ patch?: never;
39
+ trace?: never;
40
+ };
41
+ "/v1/contacts": {
42
+ parameters: {
43
+ query?: never;
44
+ header?: never;
45
+ path?: never;
46
+ cookie?: never;
47
+ };
48
+ /** List contacts */
49
+ get: operations["listContacts"];
50
+ put?: never;
51
+ post?: never;
52
+ delete?: never;
53
+ options?: never;
54
+ head?: never;
55
+ patch?: never;
56
+ trace?: never;
57
+ };
58
+ "/v1/contacts/{id}": {
59
+ parameters: {
60
+ query?: never;
61
+ header?: never;
62
+ path?: never;
63
+ cookie?: never;
64
+ };
65
+ get?: never;
66
+ /** Update a contact */
67
+ put: operations["updateContact"];
68
+ post?: never;
69
+ delete?: never;
70
+ options?: never;
71
+ head?: never;
72
+ patch?: never;
73
+ trace?: never;
74
+ };
75
+ "/v1/tasks": {
76
+ parameters: {
77
+ query?: never;
78
+ header?: never;
79
+ path?: never;
80
+ cookie?: never;
81
+ };
82
+ /**
83
+ * List tasks
84
+ * @description Returns tasks for the authenticated organization. Filter by comma-separated status or priority values and by linked Renterra record IDs.
85
+ */
86
+ get: operations["listTasks"];
87
+ put?: never;
88
+ /** Create a task */
89
+ post: operations["createTask"];
90
+ delete?: never;
91
+ options?: never;
92
+ head?: never;
93
+ patch?: never;
94
+ trace?: never;
95
+ };
96
+ "/v1/tasks/{id}": {
97
+ parameters: {
98
+ query?: never;
99
+ header?: never;
100
+ path?: never;
101
+ cookie?: never;
102
+ };
103
+ /** Get a task */
104
+ get: operations["getTask"];
105
+ put?: never;
106
+ post?: never;
107
+ /**
108
+ * Delete a task
109
+ * @description Soft-deletes the task and cancels unsent reminders.
110
+ */
111
+ delete: operations["deleteTask"];
112
+ options?: never;
113
+ head?: never;
114
+ /** Update a task */
115
+ patch: operations["updateTask"];
116
+ trace?: never;
117
+ };
118
+ "/v1/reports": {
119
+ parameters: {
120
+ query?: never;
121
+ header?: never;
122
+ path?: never;
123
+ cookie?: never;
124
+ };
125
+ /** List reports */
126
+ get: operations["listReports"];
127
+ put?: never;
128
+ post?: never;
129
+ delete?: never;
130
+ options?: never;
131
+ head?: never;
132
+ patch?: never;
133
+ trace?: never;
134
+ };
135
+ "/v1/reports/{id}": {
136
+ parameters: {
137
+ query?: never;
138
+ header?: never;
139
+ path?: never;
140
+ cookie?: never;
141
+ };
142
+ /** Get a report */
143
+ get: operations["getReport"];
144
+ put?: never;
145
+ post?: never;
146
+ delete?: never;
147
+ options?: never;
148
+ head?: never;
149
+ patch?: never;
150
+ trace?: never;
151
+ };
152
+ "/v1/inventory/items": {
153
+ parameters: {
154
+ query?: never;
155
+ header?: never;
156
+ path?: never;
157
+ cookie?: never;
158
+ };
159
+ /** List inventory items */
160
+ get: operations["listInventoryItems"];
161
+ put?: never;
162
+ post?: never;
163
+ delete?: never;
164
+ options?: never;
165
+ head?: never;
166
+ patch?: never;
167
+ trace?: never;
168
+ };
169
+ "/v1/inventory/items/{id}": {
170
+ parameters: {
171
+ query?: never;
172
+ header?: never;
173
+ path?: never;
174
+ cookie?: never;
175
+ };
176
+ /** Get an inventory item */
177
+ get: operations["getInventoryItem"];
178
+ put?: never;
179
+ post?: never;
180
+ delete?: never;
181
+ options?: never;
182
+ head?: never;
183
+ patch?: never;
184
+ trace?: never;
185
+ };
186
+ "/v1/inventory/items/{id}/analytics": {
187
+ parameters: {
188
+ query?: never;
189
+ header?: never;
190
+ path?: never;
191
+ cookie?: never;
192
+ };
193
+ /** Get inventory item analytics */
194
+ get: operations["getInventoryItemAnalytics"];
195
+ put?: never;
196
+ post?: never;
197
+ delete?: never;
198
+ options?: never;
199
+ head?: never;
200
+ patch?: never;
201
+ trace?: never;
202
+ };
203
+ "/v1/inventory/kits": {
204
+ parameters: {
205
+ query?: never;
206
+ header?: never;
207
+ path?: never;
208
+ cookie?: never;
209
+ };
210
+ /** List inventory kits */
211
+ get: operations["listInventoryKits"];
212
+ put?: never;
213
+ post?: never;
214
+ delete?: never;
215
+ options?: never;
216
+ head?: never;
217
+ patch?: never;
218
+ trace?: never;
219
+ };
220
+ "/v1/inventory/orders": {
221
+ parameters: {
222
+ query?: never;
223
+ header?: never;
224
+ path?: never;
225
+ cookie?: never;
226
+ };
227
+ /** List inventory on orders */
228
+ get: operations["listInventoryOnOrders"];
229
+ put?: never;
230
+ post?: never;
231
+ delete?: never;
232
+ options?: never;
233
+ head?: never;
234
+ patch?: never;
235
+ trace?: never;
236
+ };
237
+ "/v1/inventory/orders/{id}": {
238
+ parameters: {
239
+ query?: never;
240
+ header?: never;
241
+ path?: never;
242
+ cookie?: never;
243
+ };
244
+ /** Get inventory on an order */
245
+ get: operations["getInventoryOnOrder"];
246
+ put?: never;
247
+ post?: never;
248
+ delete?: never;
249
+ options?: never;
250
+ head?: never;
251
+ patch?: never;
252
+ trace?: never;
253
+ };
254
+ "/v1/branches": {
255
+ parameters: {
256
+ query?: never;
257
+ header?: never;
258
+ path?: never;
259
+ cookie?: never;
260
+ };
261
+ /** List branches */
262
+ get: operations["listBranches"];
263
+ put?: never;
264
+ post?: never;
265
+ delete?: never;
266
+ options?: never;
267
+ head?: never;
268
+ patch?: never;
269
+ trace?: never;
270
+ };
271
+ "/v1/vendors": {
272
+ parameters: {
273
+ query?: never;
274
+ header?: never;
275
+ path?: never;
276
+ cookie?: never;
277
+ };
278
+ /** List vendors */
279
+ get: operations["listVendors"];
280
+ put?: never;
281
+ post?: never;
282
+ delete?: never;
283
+ options?: never;
284
+ head?: never;
285
+ patch?: never;
286
+ trace?: never;
287
+ };
288
+ "/v1/orders": {
289
+ parameters: {
290
+ query?: never;
291
+ header?: never;
292
+ path?: never;
293
+ cookie?: never;
294
+ };
295
+ /** List orders */
296
+ get: operations["listOrders"];
297
+ put?: never;
298
+ post?: never;
299
+ delete?: never;
300
+ options?: never;
301
+ head?: never;
302
+ patch?: never;
303
+ trace?: never;
304
+ };
305
+ "/v1/orders/{id}": {
306
+ parameters: {
307
+ query?: never;
308
+ header?: never;
309
+ path?: never;
310
+ cookie?: never;
311
+ };
312
+ /** Get an order */
313
+ get: operations["getOrder"];
314
+ put?: never;
315
+ post?: never;
316
+ delete?: never;
317
+ options?: never;
318
+ head?: never;
319
+ patch?: never;
320
+ trace?: never;
321
+ };
322
+ "/v1/orders/{id}/billing-summary": {
323
+ parameters: {
324
+ query?: never;
325
+ header?: never;
326
+ path?: never;
327
+ cookie?: never;
328
+ };
329
+ /** Get an order billing summary */
330
+ get: operations["getOrderBillingSummary"];
331
+ put?: never;
332
+ post?: never;
333
+ delete?: never;
334
+ options?: never;
335
+ head?: never;
336
+ patch?: never;
337
+ trace?: never;
338
+ };
339
+ "/v1/orders/{id}/contracts": {
340
+ parameters: {
341
+ query?: never;
342
+ header?: never;
343
+ path?: never;
344
+ cookie?: never;
345
+ };
346
+ /** List signed order contracts */
347
+ get: operations["listOrderContracts"];
348
+ put?: never;
349
+ post?: never;
350
+ delete?: never;
351
+ options?: never;
352
+ head?: never;
353
+ patch?: never;
354
+ trace?: never;
355
+ };
356
+ "/v1/orders/{id}/contracts/{contractId}": {
357
+ parameters: {
358
+ query?: never;
359
+ header?: never;
360
+ path?: never;
361
+ cookie?: never;
362
+ };
363
+ /** Download a signed order contract */
364
+ get: operations["downloadOrderContract"];
365
+ put?: never;
366
+ post?: never;
367
+ delete?: never;
368
+ options?: never;
369
+ head?: never;
370
+ patch?: never;
371
+ trace?: never;
372
+ };
373
+ "/v1/accounting/chart": {
374
+ parameters: {
375
+ query?: never;
376
+ header?: never;
377
+ path?: never;
378
+ cookie?: never;
379
+ };
380
+ /** List Chart of Accounts accounts */
381
+ get: operations["listChartAccounts"];
382
+ put?: never;
383
+ post?: never;
384
+ delete?: never;
385
+ options?: never;
386
+ head?: never;
387
+ patch?: never;
388
+ trace?: never;
389
+ };
390
+ "/v1/accounting/ledger": {
391
+ parameters: {
392
+ query?: never;
393
+ header?: never;
394
+ path?: never;
395
+ cookie?: never;
396
+ };
397
+ /**
398
+ * List General Ledger entries
399
+ * @description Returns General Ledger entries for the authenticated organization, in one accounting basis: the `basis` parameter, or the organization's default basis when it is omitted. Changing the organization's default basis changes what the default returns, so pass `basis` to keep a stable import. Results are ordered by most recent first by default, or by ascending stable ID when `after_id` is provided for incremental synchronization. Amounts are integer cents; each entry is a debit or credit posted to a Chart of Accounts account.
400
+ */
401
+ get: operations["listLedgerEntries"];
402
+ put?: never;
403
+ post?: never;
404
+ delete?: never;
405
+ options?: never;
406
+ head?: never;
407
+ patch?: never;
408
+ trace?: never;
409
+ };
410
+ "/v1/invoices": {
411
+ parameters: {
412
+ query?: never;
413
+ header?: never;
414
+ path?: never;
415
+ cookie?: never;
416
+ };
417
+ /** List invoices */
418
+ get: operations["listInvoices"];
419
+ put?: never;
420
+ post?: never;
421
+ delete?: never;
422
+ options?: never;
423
+ head?: never;
424
+ patch?: never;
425
+ trace?: never;
426
+ };
427
+ "/v1/invoices/{id}": {
428
+ parameters: {
429
+ query?: never;
430
+ header?: never;
431
+ path?: never;
432
+ cookie?: never;
433
+ };
434
+ /** Get an invoice */
435
+ get: operations["getInvoice"];
436
+ put?: never;
437
+ post?: never;
438
+ delete?: never;
439
+ options?: never;
440
+ head?: never;
441
+ patch?: never;
442
+ trace?: never;
443
+ };
444
+ "/v1/payments": {
445
+ parameters: {
446
+ query?: never;
447
+ header?: never;
448
+ path?: never;
449
+ cookie?: never;
450
+ };
451
+ /** List payments */
452
+ get: operations["listPayments"];
453
+ put?: never;
454
+ post?: never;
455
+ delete?: never;
456
+ options?: never;
457
+ head?: never;
458
+ patch?: never;
459
+ trace?: never;
460
+ };
461
+ "/v1/payments/{id}": {
462
+ parameters: {
463
+ query?: never;
464
+ header?: never;
465
+ path?: never;
466
+ cookie?: never;
467
+ };
468
+ /** Get a payment */
469
+ get: operations["getPayment"];
470
+ put?: never;
471
+ post?: never;
472
+ delete?: never;
473
+ options?: never;
474
+ head?: never;
475
+ patch?: never;
476
+ trace?: never;
477
+ };
478
+ "/v1/maintenance/work-orders": {
479
+ parameters: {
480
+ query?: never;
481
+ header?: never;
482
+ path?: never;
483
+ cookie?: never;
484
+ };
485
+ /** List maintenance work orders */
486
+ get: operations["listMaintenanceWorkOrders"];
487
+ put?: never;
488
+ post?: never;
489
+ delete?: never;
490
+ options?: never;
491
+ head?: never;
492
+ patch?: never;
493
+ trace?: never;
494
+ };
495
+ "/v1/maintenance/service-orders": {
496
+ parameters: {
497
+ query?: never;
498
+ header?: never;
499
+ path?: never;
500
+ cookie?: never;
501
+ };
502
+ /** List maintenance service orders */
503
+ get: operations["listMaintenanceServiceOrders"];
504
+ put?: never;
505
+ post?: never;
506
+ delete?: never;
507
+ options?: never;
508
+ head?: never;
509
+ patch?: never;
510
+ trace?: never;
511
+ };
512
+ "/v1/automation/rules": {
513
+ parameters: {
514
+ query?: never;
515
+ header?: never;
516
+ path?: never;
517
+ cookie?: never;
518
+ };
519
+ get: operations["automation.rules.list"];
520
+ put?: never;
521
+ post: operations["automation.rules.create"];
522
+ delete?: never;
523
+ options?: never;
524
+ head?: never;
525
+ patch?: never;
526
+ trace?: never;
527
+ };
528
+ "/v1/automation/rules/{id}": {
529
+ parameters: {
530
+ query?: never;
531
+ header?: never;
532
+ path?: never;
533
+ cookie?: never;
534
+ };
535
+ get: operations["automation.rules.get"];
536
+ put: operations["automation.rules.update"];
537
+ post?: never;
538
+ delete: operations["automation.rules.delete"];
539
+ options?: never;
540
+ head?: never;
541
+ patch?: never;
542
+ trace?: never;
543
+ };
544
+ }
545
+ export type webhooks = Record<string, never>;
546
+ export interface components {
547
+ schemas: {
548
+ Error: {
549
+ error: {
550
+ code: string;
551
+ message: string;
552
+ };
553
+ };
554
+ Customer: {
555
+ id: string;
556
+ /** Format: date-time */
557
+ created_at: string;
558
+ /** Format: date-time */
559
+ updated_at: string;
560
+ is_archived: boolean;
561
+ archived_at: string | null;
562
+ deleted_at: string | null;
563
+ name: string;
564
+ /** @enum {string} */
565
+ type: "Individual" | "Company";
566
+ /** @enum {string} */
567
+ status: "ACTIVE" | "PREVIOUS" | "UNDESIRABLE" | "PROSPECTIVE" | "CREDIT_HOLD";
568
+ /** @enum {string} */
569
+ account_type: "Cash" | "Account";
570
+ billing_email: string | null;
571
+ website: string | null;
572
+ primary_contact_id: string | null;
573
+ /** @description Current customer credit balance in dollars. */
574
+ credit_balance: number;
575
+ /** @description Total recognized customer revenue in dollars. */
576
+ total_revenue: number;
577
+ /** @description Year-to-date recognized customer revenue in dollars. */
578
+ ytd_revenue: number;
579
+ address: components["schemas"]["CustomerAddress"] | null;
580
+ };
581
+ CustomerAddress: {
582
+ address_line_1: string;
583
+ address_line_2: string | null;
584
+ locality: string;
585
+ administrative_area: string;
586
+ postal_code: string | null;
587
+ country: string | null;
588
+ };
589
+ Contact: {
590
+ id: string;
591
+ /** Format: date-time */
592
+ created_at: string;
593
+ /** Format: date-time */
594
+ updated_at: string;
595
+ customer_id: string;
596
+ first_name: string | null;
597
+ last_name: string | null;
598
+ email: string | null;
599
+ phone: string | null;
600
+ title: string | null;
601
+ };
602
+ Task: {
603
+ id: string;
604
+ /** Format: date-time */
605
+ created_at: string;
606
+ /** Format: date-time */
607
+ updated_at: string;
608
+ deleted_at: string | null;
609
+ title: string;
610
+ description: string | null;
611
+ /** @enum {string} */
612
+ status: "Open" | "Completed" | "Canceled";
613
+ /** @enum {string} */
614
+ priority: "None" | "Low" | "Medium" | "High" | "Urgent";
615
+ /** @enum {string} */
616
+ source: "Web" | "Api";
617
+ due_at: string | null;
618
+ completed_at: string | null;
619
+ canceled_at: string | null;
620
+ created_by_user_id: string | null;
621
+ assignee_user_id: string | null;
622
+ location_id: string | null;
623
+ customer_id: string | null;
624
+ order_id: string | null;
625
+ item_id: string | null;
626
+ work_order_id: string | null;
627
+ purchase_order_id: string | null;
628
+ conversation_id: string | null;
629
+ reminders: {
630
+ id: string;
631
+ /** Format: date-time */
632
+ scheduled_at: string;
633
+ sent_at: string | null;
634
+ canceled_at: string | null;
635
+ }[];
636
+ } & {
637
+ [key: string]: unknown;
638
+ };
639
+ InventoryItem: {
640
+ id: string;
641
+ /** Format: date-time */
642
+ updated_at: string;
643
+ /** @enum {string} */
644
+ kind: "Actual" | "Slot";
645
+ /** @enum {string} */
646
+ type: "Serial" | "Sale" | "Bulk" | "Part";
647
+ make: string | null;
648
+ model: string | null;
649
+ model_year: number | null;
650
+ condition: ("Excellent" | "Good" | "Ok" | "Bad" | "Terrible") | null;
651
+ item_number: string | null;
652
+ part_number: string | null;
653
+ serial_number: string | null;
654
+ description: string;
655
+ category: string;
656
+ class: string;
657
+ group: string;
658
+ };
659
+ Kit: {
660
+ id: string;
661
+ name: string;
662
+ /** @enum {string} */
663
+ status: "active" | "archived";
664
+ items: {
665
+ item_id: string;
666
+ quantity: number;
667
+ }[];
668
+ };
669
+ InventoryOnOrder: {
670
+ id: string;
671
+ /** @enum {string} */
672
+ source: "order" | "work_order";
673
+ order_id: string | null;
674
+ work_order_id: string | null;
675
+ line_id: string;
676
+ item_id: string;
677
+ slot_id: string | null;
678
+ description: string;
679
+ quantity: number;
680
+ /** @enum {string} */
681
+ status: "Ready" | "OnRent" | "CalledOff" | "PickedUp" | "CheckedIn" | "Sold";
682
+ /** @constant */
683
+ type: "rental";
684
+ /** Format: date-time */
685
+ billing_start_time: string;
686
+ billing_end_time: string | null;
687
+ } | {
688
+ id: string;
689
+ /** @enum {string} */
690
+ source: "order" | "work_order";
691
+ order_id: string | null;
692
+ work_order_id: string | null;
693
+ line_id: string;
694
+ item_id: string;
695
+ slot_id: string | null;
696
+ description: string;
697
+ quantity: number;
698
+ /** @enum {string} */
699
+ status: "Ready" | "OnRent" | "CalledOff" | "PickedUp" | "CheckedIn" | "Sold";
700
+ /** @constant */
701
+ type: "sale";
702
+ sale_time: string | null;
703
+ };
704
+ Branch: {
705
+ id: string;
706
+ /** Format: date-time */
707
+ updated_at: string;
708
+ name: string;
709
+ };
710
+ Vendor: {
711
+ id: string;
712
+ /** Format: date-time */
713
+ updated_at: string;
714
+ name: string;
715
+ phone_number: string | null;
716
+ email: string | null;
717
+ };
718
+ Order: {
719
+ id: string;
720
+ /** @description Sequential order number. */
721
+ number: number;
722
+ /** @enum {string} */
723
+ source: "Online" | "Manual";
724
+ /** @enum {string} */
725
+ status: "Quote" | "Expired" | "Reservation" | "Canceled" | "Rental" | "Completed" | "Closed";
726
+ customer_id: string;
727
+ /** @description References a branch from /v1/branches. */
728
+ branch_id: string;
729
+ /** Format: date-time */
730
+ start_time: string;
731
+ end_time: string | null;
732
+ job_number: string | null;
733
+ job_description: string | null;
734
+ po_number: string | null;
735
+ /** @description Creation time of the most recent signed contract, or null when none exists. */
736
+ contract_signed_at: string | null;
737
+ is_historical: boolean;
738
+ /** @deprecated */
739
+ items: components["schemas"]["OrderLineItem"][];
740
+ lines: components["schemas"]["OrderLine"][];
741
+ };
742
+ /** @deprecated */
743
+ OrderLineItem: {
744
+ description: string;
745
+ quantity: number;
746
+ /** @description References an inventory item when the line resolves to a single inventory item. */
747
+ item_id: string | null;
748
+ };
749
+ OrderLine: {
750
+ description: string;
751
+ quantity: number;
752
+ /** @description References an inventory item when the line resolves to a single inventory item. */
753
+ item_id: string | null;
754
+ id: string;
755
+ inventory_on_order_ids: string[];
756
+ };
757
+ OrderBillingSummary: {
758
+ items: {
759
+ description: string;
760
+ item_id: string | null;
761
+ qty: number;
762
+ total: number;
763
+ }[];
764
+ subtotal: number;
765
+ tax: number;
766
+ total: number | null;
767
+ };
768
+ OrderContract: {
769
+ id: string;
770
+ /** Format: date-time */
771
+ created_at: string;
772
+ signed_by: string | null;
773
+ is_downloadable: boolean;
774
+ };
775
+ ChartAccount: {
776
+ id: string;
777
+ name: string;
778
+ /** @enum {string} */
779
+ type: "Asset" | "Liability" | "Equity" | "Income" | "Expense";
780
+ /** @enum {string} */
781
+ status: "active" | "archived";
782
+ };
783
+ LedgerEntry: {
784
+ id: string;
785
+ /** Format: date-time */
786
+ time: string;
787
+ account_id: string;
788
+ debit_cents: number;
789
+ credit_cents: number;
790
+ transaction_key: string;
791
+ /**
792
+ * @description Accounting basis the entry belongs to.
793
+ * @enum {string}
794
+ */
795
+ basis: "Accrual" | "Cash";
796
+ location_id: string | null;
797
+ customer_id: string | null;
798
+ invoice_id: string | null;
799
+ order_id: string | null;
800
+ item_id: string | null;
801
+ vendor_id: string | null;
802
+ };
803
+ Invoice: {
804
+ id: string;
805
+ /** @description Human-facing invoice number. */
806
+ number: string;
807
+ /** @enum {string} */
808
+ status: "Unpaid" | "Paid" | "Void" | "BadDebt";
809
+ customer_id: string | null;
810
+ order_id: string | null;
811
+ /** @description Invoice total in integer cents, including tax. */
812
+ total_cents: number;
813
+ tax_total_cents: number;
814
+ /** @description Net successful payment and refund allocations in integer cents. */
815
+ paid_cents: number;
816
+ issue_date: string | null;
817
+ /** Format: date-time */
818
+ due_date: string;
819
+ paid_at: string | null;
820
+ /** @deprecated */
821
+ items: components["schemas"]["DeprecatedInvoiceLineItem"][];
822
+ lines: components["schemas"]["InvoiceLineItem"][];
823
+ payments: components["schemas"]["InvoicePayment"][];
824
+ };
825
+ /** @deprecated */
826
+ DeprecatedInvoiceLineItem: {
827
+ description: string;
828
+ quantity: number;
829
+ total_cents: number;
830
+ item_id: string | null;
831
+ };
832
+ InvoiceLineItem: {
833
+ description: string;
834
+ quantity: number;
835
+ total_cents: number;
836
+ item_id: string | null;
837
+ id: string;
838
+ group_id: string;
839
+ sales_tax_cents: number;
840
+ ledger_account_id: string;
841
+ revenue_allocations: {
842
+ item_id: string;
843
+ ledger_account_id: string;
844
+ percentage: number;
845
+ }[];
846
+ };
847
+ InvoicePayment: {
848
+ allocation_id: string;
849
+ payment_id: string;
850
+ amount_cents: number;
851
+ /** Format: date-time */
852
+ allocated_at: string;
853
+ /** @enum {string} */
854
+ type: "Payment" | "Refund";
855
+ /** @enum {string} */
856
+ method: "Cash" | "Card" | "Bank" | "Check" | "Credit" | "Other";
857
+ /** Format: date-time */
858
+ created_at: string;
859
+ succeeded_at: string | null;
860
+ refunded_payment_id: string | null;
861
+ };
862
+ Payment: {
863
+ id: string;
864
+ /** @enum {string} */
865
+ type: "Payment" | "Refund";
866
+ /** @enum {string} */
867
+ method: "Cash" | "Card" | "Bank" | "Check" | "Credit" | "Other";
868
+ amount_cents: number;
869
+ customer_id: string | null;
870
+ branch_id: string;
871
+ order_id: string | null;
872
+ refunded_payment_id: string | null;
873
+ /** Format: date-time */
874
+ created_at: string;
875
+ succeeded_at: string | null;
876
+ allocations: {
877
+ id: string;
878
+ invoice_id: string;
879
+ amount_cents: number;
880
+ /** Format: date-time */
881
+ created_at: string;
882
+ }[];
883
+ };
884
+ WorkOrder: {
885
+ id: string;
886
+ number: number;
887
+ /** @enum {string} */
888
+ status: "Open" | "Closed";
889
+ type: ("Preventative" | "Repair") | null;
890
+ severity: ("Hard" | "Soft") | null;
891
+ item_id: string | null;
892
+ /** Format: date-time */
893
+ start_date: string;
894
+ end_date: string | null;
895
+ /** Format: date-time */
896
+ created_at: string;
897
+ inventory_on_order_ids: string[];
898
+ is_historical: boolean;
899
+ };
900
+ ServiceOrder: {
901
+ id: string;
902
+ number: number;
903
+ /** @enum {string} */
904
+ status: "Open" | "Closed";
905
+ customer_id: string | null;
906
+ item_id: string | null;
907
+ /** Format: date-time */
908
+ start_date: string;
909
+ end_date: string | null;
910
+ /** Format: date-time */
911
+ created_at: string;
912
+ inventory_on_order_ids: string[];
913
+ is_historical: boolean;
914
+ };
915
+ };
916
+ responses: {
917
+ /** @description Invalid request parameters. */
918
+ BadRequest: {
919
+ headers: {
920
+ [name: string]: unknown;
921
+ };
922
+ content: {
923
+ "application/json": components["schemas"]["Error"];
924
+ };
925
+ };
926
+ /** @description Missing or invalid API key. */
927
+ Unauthorized: {
928
+ headers: {
929
+ [name: string]: unknown;
930
+ };
931
+ content: {
932
+ "application/json": components["schemas"]["Error"];
933
+ };
934
+ };
935
+ /** @description The organization does not have API access. */
936
+ Forbidden: {
937
+ headers: {
938
+ [name: string]: unknown;
939
+ };
940
+ content: {
941
+ "application/json": components["schemas"]["Error"];
942
+ };
943
+ };
944
+ /** @description Resource not found */
945
+ NotFound: {
946
+ headers: {
947
+ [name: string]: unknown;
948
+ };
949
+ content: {
950
+ "application/json": components["schemas"]["Error"];
951
+ };
952
+ };
953
+ /** @description Conflict (e.g. idempotency key reuse) */
954
+ Conflict: {
955
+ headers: {
956
+ [name: string]: unknown;
957
+ };
958
+ content: {
959
+ "application/json": components["schemas"]["Error"];
960
+ };
961
+ };
962
+ /** @description Endpoint is documented but not yet implemented. */
963
+ NotImplemented: {
964
+ headers: {
965
+ [name: string]: unknown;
966
+ };
967
+ content: {
968
+ "application/json": components["schemas"]["Error"];
969
+ };
970
+ };
971
+ /** @description Rate limit exceeded. */
972
+ RateLimited: {
973
+ headers: {
974
+ "Retry-After"?: number;
975
+ "X-RateLimit-Limit"?: number;
976
+ "X-RateLimit-Remaining"?: number;
977
+ "X-RateLimit-Reset"?: number;
978
+ [name: string]: unknown;
979
+ };
980
+ content: {
981
+ "application/json": components["schemas"]["Error"];
982
+ };
983
+ };
984
+ };
985
+ parameters: never;
986
+ requestBodies: never;
987
+ headers: never;
988
+ pathItems: never;
989
+ }
990
+ export type $defs = Record<string, never>;
991
+ export interface operations {
992
+ listCustomers: {
993
+ parameters: {
994
+ query?: {
995
+ page?: number;
996
+ page_size?: number;
997
+ query?: string;
998
+ include_deleted?: "true" | "false";
999
+ };
1000
+ header?: never;
1001
+ path?: never;
1002
+ cookie?: never;
1003
+ };
1004
+ requestBody?: never;
1005
+ responses: {
1006
+ /** @description OK */
1007
+ 200: {
1008
+ headers: {
1009
+ [name: string]: unknown;
1010
+ };
1011
+ content: {
1012
+ "application/json": {
1013
+ data: components["schemas"]["Customer"][];
1014
+ pagination: {
1015
+ page: number;
1016
+ page_size: number;
1017
+ has_more: boolean;
1018
+ };
1019
+ };
1020
+ };
1021
+ };
1022
+ 400: components["responses"]["BadRequest"];
1023
+ 401: components["responses"]["Unauthorized"];
1024
+ 403: components["responses"]["Forbidden"];
1025
+ 429: components["responses"]["RateLimited"];
1026
+ };
1027
+ };
1028
+ createCustomer: {
1029
+ parameters: {
1030
+ query?: never;
1031
+ header?: {
1032
+ "idempotency-key"?: string;
1033
+ };
1034
+ path?: never;
1035
+ cookie?: never;
1036
+ };
1037
+ requestBody: {
1038
+ content: {
1039
+ "application/json": {
1040
+ name: string;
1041
+ /** @enum {string} */
1042
+ type: "Individual" | "Company";
1043
+ /**
1044
+ * @default Cash
1045
+ * @enum {string}
1046
+ */
1047
+ account_type?: "Cash" | "Account";
1048
+ /** @enum {string} */
1049
+ status?: "ACTIVE" | "PREVIOUS" | "UNDESIRABLE" | "PROSPECTIVE" | "CREDIT_HOLD";
1050
+ billing_email?: string | null;
1051
+ website?: string | null;
1052
+ notes?: string | null;
1053
+ address?: {
1054
+ address_line_1: string;
1055
+ address_line_2?: string | null;
1056
+ locality: string;
1057
+ administrative_area: string;
1058
+ postal_code?: string | null;
1059
+ country: string;
1060
+ } | null;
1061
+ primary_contact: {
1062
+ first_name?: string | null;
1063
+ last_name?: string | null;
1064
+ email?: string | null;
1065
+ phone?: string | null;
1066
+ title?: string | null;
1067
+ };
1068
+ };
1069
+ };
1070
+ };
1071
+ responses: {
1072
+ /** @description OK */
1073
+ 201: {
1074
+ headers: {
1075
+ [name: string]: unknown;
1076
+ };
1077
+ content: {
1078
+ "application/json": components["schemas"]["Customer"];
1079
+ };
1080
+ };
1081
+ 400: components["responses"]["BadRequest"];
1082
+ 401: components["responses"]["Unauthorized"];
1083
+ 403: components["responses"]["Forbidden"];
1084
+ 429: components["responses"]["RateLimited"];
1085
+ };
1086
+ };
1087
+ getCustomer: {
1088
+ parameters: {
1089
+ query?: never;
1090
+ header?: never;
1091
+ path: {
1092
+ id: string;
1093
+ };
1094
+ cookie?: never;
1095
+ };
1096
+ requestBody?: never;
1097
+ responses: {
1098
+ /** @description OK */
1099
+ 200: {
1100
+ headers: {
1101
+ [name: string]: unknown;
1102
+ };
1103
+ content: {
1104
+ "application/json": components["schemas"]["Customer"];
1105
+ };
1106
+ };
1107
+ 400: components["responses"]["BadRequest"];
1108
+ 401: components["responses"]["Unauthorized"];
1109
+ 403: components["responses"]["Forbidden"];
1110
+ 429: components["responses"]["RateLimited"];
1111
+ };
1112
+ };
1113
+ updateCustomer: {
1114
+ parameters: {
1115
+ query?: never;
1116
+ header?: never;
1117
+ path: {
1118
+ id: string;
1119
+ };
1120
+ cookie?: never;
1121
+ };
1122
+ requestBody: {
1123
+ content: {
1124
+ "application/json": {
1125
+ name?: string;
1126
+ /** @enum {string} */
1127
+ type?: "Individual" | "Company";
1128
+ /** @enum {string} */
1129
+ account_type?: "Cash" | "Account";
1130
+ /** @enum {string} */
1131
+ status?: "ACTIVE" | "PREVIOUS" | "UNDESIRABLE" | "PROSPECTIVE" | "CREDIT_HOLD";
1132
+ billing_email?: string | null;
1133
+ website?: string | null;
1134
+ notes?: string | null;
1135
+ address?: {
1136
+ address_line_1: string;
1137
+ address_line_2?: string | null;
1138
+ locality: string;
1139
+ administrative_area: string;
1140
+ postal_code?: string | null;
1141
+ country: string;
1142
+ } | null;
1143
+ };
1144
+ };
1145
+ };
1146
+ responses: {
1147
+ /** @description OK */
1148
+ 200: {
1149
+ headers: {
1150
+ [name: string]: unknown;
1151
+ };
1152
+ content: {
1153
+ "application/json": components["schemas"]["Customer"];
1154
+ };
1155
+ };
1156
+ 400: components["responses"]["BadRequest"];
1157
+ 401: components["responses"]["Unauthorized"];
1158
+ 403: components["responses"]["Forbidden"];
1159
+ 429: components["responses"]["RateLimited"];
1160
+ };
1161
+ };
1162
+ listContacts: {
1163
+ parameters: {
1164
+ query?: {
1165
+ page?: number;
1166
+ page_size?: number;
1167
+ customer_id?: string;
1168
+ };
1169
+ header?: never;
1170
+ path?: never;
1171
+ cookie?: never;
1172
+ };
1173
+ requestBody?: never;
1174
+ responses: {
1175
+ /** @description OK */
1176
+ 200: {
1177
+ headers: {
1178
+ [name: string]: unknown;
1179
+ };
1180
+ content: {
1181
+ "application/json": {
1182
+ data: components["schemas"]["Contact"][];
1183
+ pagination: {
1184
+ page: number;
1185
+ page_size: number;
1186
+ has_more: boolean;
1187
+ };
1188
+ };
1189
+ };
1190
+ };
1191
+ 400: components["responses"]["BadRequest"];
1192
+ 401: components["responses"]["Unauthorized"];
1193
+ 403: components["responses"]["Forbidden"];
1194
+ 429: components["responses"]["RateLimited"];
1195
+ };
1196
+ };
1197
+ updateContact: {
1198
+ parameters: {
1199
+ query?: never;
1200
+ header?: never;
1201
+ path: {
1202
+ id: string;
1203
+ };
1204
+ cookie?: never;
1205
+ };
1206
+ requestBody: {
1207
+ content: {
1208
+ "application/json": {
1209
+ first_name?: string | null;
1210
+ last_name?: string | null;
1211
+ email?: string | null;
1212
+ phone?: string | null;
1213
+ title?: string | null;
1214
+ drivers_license_number?: string | null;
1215
+ drivers_license_expiry?: string | null;
1216
+ date_of_birth?: string | null;
1217
+ };
1218
+ };
1219
+ };
1220
+ responses: {
1221
+ /** @description OK */
1222
+ 200: {
1223
+ headers: {
1224
+ [name: string]: unknown;
1225
+ };
1226
+ content: {
1227
+ "application/json": components["schemas"]["Contact"];
1228
+ };
1229
+ };
1230
+ 400: components["responses"]["BadRequest"];
1231
+ 401: components["responses"]["Unauthorized"];
1232
+ 403: components["responses"]["Forbidden"];
1233
+ 429: components["responses"]["RateLimited"];
1234
+ };
1235
+ };
1236
+ listTasks: {
1237
+ parameters: {
1238
+ query?: {
1239
+ query?: string;
1240
+ status?: string;
1241
+ priority?: string;
1242
+ assignee_user_id?: string;
1243
+ created_by_user_id?: string;
1244
+ location_id?: string;
1245
+ customer_id?: string;
1246
+ order_id?: string;
1247
+ item_id?: string;
1248
+ work_order_id?: string;
1249
+ purchase_order_id?: string;
1250
+ due_after?: string;
1251
+ due_before?: string;
1252
+ include_deleted?: "true" | "false";
1253
+ page?: number;
1254
+ page_size?: number;
1255
+ };
1256
+ header?: never;
1257
+ path?: never;
1258
+ cookie?: never;
1259
+ };
1260
+ requestBody?: never;
1261
+ responses: {
1262
+ /** @description OK */
1263
+ 200: {
1264
+ headers: {
1265
+ [name: string]: unknown;
1266
+ };
1267
+ content: {
1268
+ "application/json": {
1269
+ data: components["schemas"]["Task"][];
1270
+ pagination: {
1271
+ page: number;
1272
+ page_size: number;
1273
+ has_more: boolean;
1274
+ total: number;
1275
+ };
1276
+ };
1277
+ };
1278
+ };
1279
+ 400: components["responses"]["BadRequest"];
1280
+ 401: components["responses"]["Unauthorized"];
1281
+ 403: components["responses"]["Forbidden"];
1282
+ 429: components["responses"]["RateLimited"];
1283
+ };
1284
+ };
1285
+ createTask: {
1286
+ parameters: {
1287
+ query?: never;
1288
+ header?: {
1289
+ "idempotency-key"?: string;
1290
+ };
1291
+ path?: never;
1292
+ cookie?: never;
1293
+ };
1294
+ requestBody: {
1295
+ content: {
1296
+ "application/json": {
1297
+ title: string;
1298
+ description?: string | null;
1299
+ /**
1300
+ * @default Open
1301
+ * @enum {string}
1302
+ */
1303
+ status?: "Open" | "Completed" | "Canceled";
1304
+ /**
1305
+ * @default None
1306
+ * @enum {string}
1307
+ */
1308
+ priority?: "None" | "Low" | "Medium" | "High" | "Urgent";
1309
+ due_at?: string | null;
1310
+ assignee_user_id?: string | null;
1311
+ location_id?: string | null;
1312
+ customer_id?: string | null;
1313
+ order_id?: string | null;
1314
+ item_id?: string | null;
1315
+ work_order_id?: string | null;
1316
+ purchase_order_id?: string | null;
1317
+ conversation_id?: string | null;
1318
+ /** @default [] */
1319
+ reminders?: string[];
1320
+ };
1321
+ };
1322
+ };
1323
+ responses: {
1324
+ /** @description OK */
1325
+ 201: {
1326
+ headers: {
1327
+ [name: string]: unknown;
1328
+ };
1329
+ content: {
1330
+ "application/json": components["schemas"]["Task"];
1331
+ };
1332
+ };
1333
+ 400: components["responses"]["BadRequest"];
1334
+ 401: components["responses"]["Unauthorized"];
1335
+ 403: components["responses"]["Forbidden"];
1336
+ 409: components["responses"]["Conflict"];
1337
+ 429: components["responses"]["RateLimited"];
1338
+ };
1339
+ };
1340
+ getTask: {
1341
+ parameters: {
1342
+ query?: never;
1343
+ header?: never;
1344
+ path: {
1345
+ id: string;
1346
+ };
1347
+ cookie?: never;
1348
+ };
1349
+ requestBody?: never;
1350
+ responses: {
1351
+ /** @description OK */
1352
+ 200: {
1353
+ headers: {
1354
+ [name: string]: unknown;
1355
+ };
1356
+ content: {
1357
+ "application/json": components["schemas"]["Task"];
1358
+ };
1359
+ };
1360
+ 400: components["responses"]["BadRequest"];
1361
+ 401: components["responses"]["Unauthorized"];
1362
+ 403: components["responses"]["Forbidden"];
1363
+ 404: components["responses"]["NotFound"];
1364
+ 429: components["responses"]["RateLimited"];
1365
+ };
1366
+ };
1367
+ deleteTask: {
1368
+ parameters: {
1369
+ query?: never;
1370
+ header?: never;
1371
+ path: {
1372
+ id: string;
1373
+ };
1374
+ cookie?: never;
1375
+ };
1376
+ requestBody?: {
1377
+ content: {
1378
+ "application/json": Record<string, never>;
1379
+ };
1380
+ };
1381
+ responses: {
1382
+ /** @description Task deleted */
1383
+ 204: {
1384
+ headers: {
1385
+ [name: string]: unknown;
1386
+ };
1387
+ content?: never;
1388
+ };
1389
+ 400: components["responses"]["BadRequest"];
1390
+ 401: components["responses"]["Unauthorized"];
1391
+ 403: components["responses"]["Forbidden"];
1392
+ 404: components["responses"]["NotFound"];
1393
+ 429: components["responses"]["RateLimited"];
1394
+ };
1395
+ };
1396
+ updateTask: {
1397
+ parameters: {
1398
+ query?: never;
1399
+ header?: never;
1400
+ path: {
1401
+ id: string;
1402
+ };
1403
+ cookie?: never;
1404
+ };
1405
+ requestBody: {
1406
+ content: {
1407
+ "application/json": {
1408
+ title?: string;
1409
+ description?: string | null;
1410
+ /** @enum {string} */
1411
+ status?: "Open" | "Completed" | "Canceled";
1412
+ /** @enum {string} */
1413
+ priority?: "None" | "Low" | "Medium" | "High" | "Urgent";
1414
+ due_at?: string | null;
1415
+ assignee_user_id?: string | null;
1416
+ location_id?: string | null;
1417
+ customer_id?: string | null;
1418
+ order_id?: string | null;
1419
+ item_id?: string | null;
1420
+ work_order_id?: string | null;
1421
+ purchase_order_id?: string | null;
1422
+ conversation_id?: string | null;
1423
+ reminders?: string[];
1424
+ };
1425
+ };
1426
+ };
1427
+ responses: {
1428
+ /** @description OK */
1429
+ 200: {
1430
+ headers: {
1431
+ [name: string]: unknown;
1432
+ };
1433
+ content: {
1434
+ "application/json": components["schemas"]["Task"];
1435
+ };
1436
+ };
1437
+ 400: components["responses"]["BadRequest"];
1438
+ 401: components["responses"]["Unauthorized"];
1439
+ 403: components["responses"]["Forbidden"];
1440
+ 404: components["responses"]["NotFound"];
1441
+ 429: components["responses"]["RateLimited"];
1442
+ };
1443
+ };
1444
+ listReports: {
1445
+ parameters: {
1446
+ query?: never;
1447
+ header?: never;
1448
+ path?: never;
1449
+ cookie?: never;
1450
+ };
1451
+ requestBody?: never;
1452
+ responses: {
1453
+ /** @description OK */
1454
+ 200: {
1455
+ headers: {
1456
+ [name: string]: unknown;
1457
+ };
1458
+ content?: never;
1459
+ };
1460
+ 400: components["responses"]["BadRequest"];
1461
+ 401: components["responses"]["Unauthorized"];
1462
+ 403: components["responses"]["Forbidden"];
1463
+ 429: components["responses"]["RateLimited"];
1464
+ };
1465
+ };
1466
+ getReport: {
1467
+ parameters: {
1468
+ query?: never;
1469
+ header?: never;
1470
+ path: {
1471
+ id: string;
1472
+ };
1473
+ cookie?: never;
1474
+ };
1475
+ requestBody?: never;
1476
+ responses: {
1477
+ /** @description OK */
1478
+ 200: {
1479
+ headers: {
1480
+ [name: string]: unknown;
1481
+ };
1482
+ content?: never;
1483
+ };
1484
+ 400: components["responses"]["BadRequest"];
1485
+ 401: components["responses"]["Unauthorized"];
1486
+ 403: components["responses"]["Forbidden"];
1487
+ 429: components["responses"]["RateLimited"];
1488
+ };
1489
+ };
1490
+ listInventoryItems: {
1491
+ parameters: {
1492
+ query?: {
1493
+ page?: number;
1494
+ page_size?: number;
1495
+ query?: string;
1496
+ kind?: "Actual" | "Slot";
1497
+ include_archived?: "true" | "false";
1498
+ };
1499
+ header?: never;
1500
+ path?: never;
1501
+ cookie?: never;
1502
+ };
1503
+ requestBody?: never;
1504
+ responses: {
1505
+ /** @description OK */
1506
+ 200: {
1507
+ headers: {
1508
+ [name: string]: unknown;
1509
+ };
1510
+ content: {
1511
+ "application/json": {
1512
+ data: components["schemas"]["InventoryItem"][];
1513
+ pagination: {
1514
+ page: number;
1515
+ page_size: number;
1516
+ has_more: boolean;
1517
+ };
1518
+ };
1519
+ };
1520
+ };
1521
+ 400: components["responses"]["BadRequest"];
1522
+ 401: components["responses"]["Unauthorized"];
1523
+ 403: components["responses"]["Forbidden"];
1524
+ 429: components["responses"]["RateLimited"];
1525
+ };
1526
+ };
1527
+ getInventoryItem: {
1528
+ parameters: {
1529
+ query?: never;
1530
+ header?: never;
1531
+ path: {
1532
+ id: string;
1533
+ };
1534
+ cookie?: never;
1535
+ };
1536
+ requestBody?: never;
1537
+ responses: {
1538
+ /** @description OK */
1539
+ 200: {
1540
+ headers: {
1541
+ [name: string]: unknown;
1542
+ };
1543
+ content: {
1544
+ "application/json": components["schemas"]["InventoryItem"];
1545
+ };
1546
+ };
1547
+ 400: components["responses"]["BadRequest"];
1548
+ 401: components["responses"]["Unauthorized"];
1549
+ 403: components["responses"]["Forbidden"];
1550
+ 429: components["responses"]["RateLimited"];
1551
+ };
1552
+ };
1553
+ getInventoryItemAnalytics: {
1554
+ parameters: {
1555
+ query?: never;
1556
+ header?: never;
1557
+ path: {
1558
+ id: string;
1559
+ };
1560
+ cookie?: never;
1561
+ };
1562
+ requestBody?: never;
1563
+ responses: {
1564
+ /** @description OK */
1565
+ 200: {
1566
+ headers: {
1567
+ [name: string]: unknown;
1568
+ };
1569
+ content?: never;
1570
+ };
1571
+ 400: components["responses"]["BadRequest"];
1572
+ 401: components["responses"]["Unauthorized"];
1573
+ 403: components["responses"]["Forbidden"];
1574
+ 429: components["responses"]["RateLimited"];
1575
+ };
1576
+ };
1577
+ listInventoryKits: {
1578
+ parameters: {
1579
+ query?: {
1580
+ page?: number;
1581
+ page_size?: number;
1582
+ status?: "active" | "archived" | "all";
1583
+ };
1584
+ header?: never;
1585
+ path?: never;
1586
+ cookie?: never;
1587
+ };
1588
+ requestBody?: never;
1589
+ responses: {
1590
+ /** @description OK */
1591
+ 200: {
1592
+ headers: {
1593
+ [name: string]: unknown;
1594
+ };
1595
+ content: {
1596
+ "application/json": {
1597
+ data: components["schemas"]["Kit"][];
1598
+ pagination: {
1599
+ page: number;
1600
+ page_size: number;
1601
+ has_more: boolean;
1602
+ };
1603
+ };
1604
+ };
1605
+ };
1606
+ 400: components["responses"]["BadRequest"];
1607
+ 401: components["responses"]["Unauthorized"];
1608
+ 403: components["responses"]["Forbidden"];
1609
+ 429: components["responses"]["RateLimited"];
1610
+ };
1611
+ };
1612
+ listInventoryOnOrders: {
1613
+ parameters: {
1614
+ query?: {
1615
+ page?: number;
1616
+ page_size?: number;
1617
+ order_id?: string;
1618
+ work_order_id?: string;
1619
+ item_id?: string;
1620
+ line_id?: string;
1621
+ };
1622
+ header?: never;
1623
+ path?: never;
1624
+ cookie?: never;
1625
+ };
1626
+ requestBody?: never;
1627
+ responses: {
1628
+ /** @description OK */
1629
+ 200: {
1630
+ headers: {
1631
+ [name: string]: unknown;
1632
+ };
1633
+ content: {
1634
+ "application/json": {
1635
+ data: components["schemas"]["InventoryOnOrder"][];
1636
+ pagination: {
1637
+ page: number;
1638
+ page_size: number;
1639
+ has_more: boolean;
1640
+ };
1641
+ };
1642
+ };
1643
+ };
1644
+ 400: components["responses"]["BadRequest"];
1645
+ 401: components["responses"]["Unauthorized"];
1646
+ 403: components["responses"]["Forbidden"];
1647
+ 429: components["responses"]["RateLimited"];
1648
+ };
1649
+ };
1650
+ getInventoryOnOrder: {
1651
+ parameters: {
1652
+ query?: never;
1653
+ header?: never;
1654
+ path: {
1655
+ id: string;
1656
+ };
1657
+ cookie?: never;
1658
+ };
1659
+ requestBody?: never;
1660
+ responses: {
1661
+ /** @description OK */
1662
+ 200: {
1663
+ headers: {
1664
+ [name: string]: unknown;
1665
+ };
1666
+ content: {
1667
+ "application/json": components["schemas"]["InventoryOnOrder"];
1668
+ };
1669
+ };
1670
+ 400: components["responses"]["BadRequest"];
1671
+ 401: components["responses"]["Unauthorized"];
1672
+ 403: components["responses"]["Forbidden"];
1673
+ 429: components["responses"]["RateLimited"];
1674
+ };
1675
+ };
1676
+ listBranches: {
1677
+ parameters: {
1678
+ query?: {
1679
+ page?: number;
1680
+ page_size?: number;
1681
+ };
1682
+ header?: never;
1683
+ path?: never;
1684
+ cookie?: never;
1685
+ };
1686
+ requestBody?: never;
1687
+ responses: {
1688
+ /** @description OK */
1689
+ 200: {
1690
+ headers: {
1691
+ [name: string]: unknown;
1692
+ };
1693
+ content: {
1694
+ "application/json": {
1695
+ data: components["schemas"]["Branch"][];
1696
+ pagination: {
1697
+ page: number;
1698
+ page_size: number;
1699
+ has_more: boolean;
1700
+ };
1701
+ };
1702
+ };
1703
+ };
1704
+ 400: components["responses"]["BadRequest"];
1705
+ 401: components["responses"]["Unauthorized"];
1706
+ 403: components["responses"]["Forbidden"];
1707
+ 429: components["responses"]["RateLimited"];
1708
+ };
1709
+ };
1710
+ listVendors: {
1711
+ parameters: {
1712
+ query?: {
1713
+ page?: number;
1714
+ page_size?: number;
1715
+ };
1716
+ header?: never;
1717
+ path?: never;
1718
+ cookie?: never;
1719
+ };
1720
+ requestBody?: never;
1721
+ responses: {
1722
+ /** @description OK */
1723
+ 200: {
1724
+ headers: {
1725
+ [name: string]: unknown;
1726
+ };
1727
+ content: {
1728
+ "application/json": {
1729
+ data: components["schemas"]["Vendor"][];
1730
+ pagination: {
1731
+ page: number;
1732
+ page_size: number;
1733
+ has_more: boolean;
1734
+ };
1735
+ };
1736
+ };
1737
+ };
1738
+ 400: components["responses"]["BadRequest"];
1739
+ 401: components["responses"]["Unauthorized"];
1740
+ 403: components["responses"]["Forbidden"];
1741
+ 429: components["responses"]["RateLimited"];
1742
+ };
1743
+ };
1744
+ listOrders: {
1745
+ parameters: {
1746
+ query?: {
1747
+ page?: number;
1748
+ page_size?: number;
1749
+ query?: string;
1750
+ customer_id?: string;
1751
+ status?: "Quote" | "Expired" | "Reservation" | "Canceled" | "Rental" | "Completed" | "Closed";
1752
+ start_time_after?: string;
1753
+ start_time_before?: string;
1754
+ end_time_after?: string;
1755
+ end_time_before?: string;
1756
+ start_date?: string;
1757
+ end_date?: string;
1758
+ };
1759
+ header?: never;
1760
+ path?: never;
1761
+ cookie?: never;
1762
+ };
1763
+ requestBody?: never;
1764
+ responses: {
1765
+ /** @description OK */
1766
+ 200: {
1767
+ headers: {
1768
+ [name: string]: unknown;
1769
+ };
1770
+ content: {
1771
+ "application/json": {
1772
+ data: components["schemas"]["Order"][];
1773
+ pagination: {
1774
+ page: number;
1775
+ page_size: number;
1776
+ has_more: boolean;
1777
+ };
1778
+ };
1779
+ };
1780
+ };
1781
+ 400: components["responses"]["BadRequest"];
1782
+ 401: components["responses"]["Unauthorized"];
1783
+ 403: components["responses"]["Forbidden"];
1784
+ 429: components["responses"]["RateLimited"];
1785
+ };
1786
+ };
1787
+ getOrder: {
1788
+ parameters: {
1789
+ query?: never;
1790
+ header?: never;
1791
+ path: {
1792
+ id: string;
1793
+ };
1794
+ cookie?: never;
1795
+ };
1796
+ requestBody?: never;
1797
+ responses: {
1798
+ /** @description OK */
1799
+ 200: {
1800
+ headers: {
1801
+ [name: string]: unknown;
1802
+ };
1803
+ content: {
1804
+ "application/json": components["schemas"]["Order"];
1805
+ };
1806
+ };
1807
+ 400: components["responses"]["BadRequest"];
1808
+ 401: components["responses"]["Unauthorized"];
1809
+ 403: components["responses"]["Forbidden"];
1810
+ 429: components["responses"]["RateLimited"];
1811
+ };
1812
+ };
1813
+ getOrderBillingSummary: {
1814
+ parameters: {
1815
+ query?: never;
1816
+ header?: never;
1817
+ path: {
1818
+ id: string;
1819
+ };
1820
+ cookie?: never;
1821
+ };
1822
+ requestBody?: never;
1823
+ responses: {
1824
+ /** @description OK */
1825
+ 200: {
1826
+ headers: {
1827
+ [name: string]: unknown;
1828
+ };
1829
+ content: {
1830
+ "application/json": components["schemas"]["OrderBillingSummary"];
1831
+ };
1832
+ };
1833
+ 400: components["responses"]["BadRequest"];
1834
+ 401: components["responses"]["Unauthorized"];
1835
+ 403: components["responses"]["Forbidden"];
1836
+ 429: components["responses"]["RateLimited"];
1837
+ };
1838
+ };
1839
+ listOrderContracts: {
1840
+ parameters: {
1841
+ query?: never;
1842
+ header?: never;
1843
+ path: {
1844
+ id: string;
1845
+ };
1846
+ cookie?: never;
1847
+ };
1848
+ requestBody?: never;
1849
+ responses: {
1850
+ /** @description OK */
1851
+ 200: {
1852
+ headers: {
1853
+ [name: string]: unknown;
1854
+ };
1855
+ content: {
1856
+ "application/json": {
1857
+ data: components["schemas"]["OrderContract"][];
1858
+ };
1859
+ };
1860
+ };
1861
+ 400: components["responses"]["BadRequest"];
1862
+ 401: components["responses"]["Unauthorized"];
1863
+ 403: components["responses"]["Forbidden"];
1864
+ 429: components["responses"]["RateLimited"];
1865
+ };
1866
+ };
1867
+ downloadOrderContract: {
1868
+ parameters: {
1869
+ query?: never;
1870
+ header?: never;
1871
+ path: {
1872
+ id: string;
1873
+ contractId: string;
1874
+ };
1875
+ cookie?: never;
1876
+ };
1877
+ requestBody?: never;
1878
+ responses: {
1879
+ /** @description OK */
1880
+ 200: {
1881
+ headers: {
1882
+ [name: string]: unknown;
1883
+ };
1884
+ content: {
1885
+ "*/*": string;
1886
+ };
1887
+ };
1888
+ 400: components["responses"]["BadRequest"];
1889
+ 401: components["responses"]["Unauthorized"];
1890
+ 403: components["responses"]["Forbidden"];
1891
+ 429: components["responses"]["RateLimited"];
1892
+ };
1893
+ };
1894
+ listChartAccounts: {
1895
+ parameters: {
1896
+ query?: {
1897
+ page?: number;
1898
+ page_size?: number;
1899
+ type?: "Asset" | "Liability" | "Equity" | "Income" | "Expense";
1900
+ status?: "active" | "archived" | "all";
1901
+ };
1902
+ header?: never;
1903
+ path?: never;
1904
+ cookie?: never;
1905
+ };
1906
+ requestBody?: never;
1907
+ responses: {
1908
+ /** @description OK */
1909
+ 200: {
1910
+ headers: {
1911
+ [name: string]: unknown;
1912
+ };
1913
+ content: {
1914
+ "application/json": {
1915
+ data: components["schemas"]["ChartAccount"][];
1916
+ pagination: {
1917
+ page: number;
1918
+ page_size: number;
1919
+ has_more: boolean;
1920
+ };
1921
+ };
1922
+ };
1923
+ };
1924
+ 400: components["responses"]["BadRequest"];
1925
+ 401: components["responses"]["Unauthorized"];
1926
+ 403: components["responses"]["Forbidden"];
1927
+ 429: components["responses"]["RateLimited"];
1928
+ };
1929
+ };
1930
+ listLedgerEntries: {
1931
+ parameters: {
1932
+ query?: {
1933
+ page?: number;
1934
+ page_size?: number;
1935
+ basis?: "Accrual" | "Cash";
1936
+ account_id?: string;
1937
+ customer_id?: string;
1938
+ invoice_id?: string;
1939
+ order_id?: string;
1940
+ start_date?: string;
1941
+ end_date?: string;
1942
+ after_id?: string;
1943
+ };
1944
+ header?: never;
1945
+ path?: never;
1946
+ cookie?: never;
1947
+ };
1948
+ requestBody?: never;
1949
+ responses: {
1950
+ /** @description OK */
1951
+ 200: {
1952
+ headers: {
1953
+ [name: string]: unknown;
1954
+ };
1955
+ content: {
1956
+ "application/json": {
1957
+ data: components["schemas"]["LedgerEntry"][];
1958
+ pagination: {
1959
+ page: number;
1960
+ page_size: number;
1961
+ has_more: boolean;
1962
+ };
1963
+ };
1964
+ };
1965
+ };
1966
+ 400: components["responses"]["BadRequest"];
1967
+ 401: components["responses"]["Unauthorized"];
1968
+ 403: components["responses"]["Forbidden"];
1969
+ 429: components["responses"]["RateLimited"];
1970
+ };
1971
+ };
1972
+ listInvoices: {
1973
+ parameters: {
1974
+ query?: {
1975
+ page?: number;
1976
+ page_size?: number;
1977
+ customer_id?: string;
1978
+ start_date?: string;
1979
+ end_date?: string;
1980
+ query?: string;
1981
+ status?: "Unpaid" | "Paid" | "Void" | "BadDebt";
1982
+ };
1983
+ header?: never;
1984
+ path?: never;
1985
+ cookie?: never;
1986
+ };
1987
+ requestBody?: never;
1988
+ responses: {
1989
+ /** @description OK */
1990
+ 200: {
1991
+ headers: {
1992
+ [name: string]: unknown;
1993
+ };
1994
+ content: {
1995
+ "application/json": {
1996
+ data: components["schemas"]["Invoice"][];
1997
+ pagination: {
1998
+ page: number;
1999
+ page_size: number;
2000
+ has_more: boolean;
2001
+ };
2002
+ };
2003
+ };
2004
+ };
2005
+ 400: components["responses"]["BadRequest"];
2006
+ 401: components["responses"]["Unauthorized"];
2007
+ 403: components["responses"]["Forbidden"];
2008
+ 429: components["responses"]["RateLimited"];
2009
+ };
2010
+ };
2011
+ getInvoice: {
2012
+ parameters: {
2013
+ query?: never;
2014
+ header?: never;
2015
+ path: {
2016
+ id: string;
2017
+ };
2018
+ cookie?: never;
2019
+ };
2020
+ requestBody?: never;
2021
+ responses: {
2022
+ /** @description OK */
2023
+ 200: {
2024
+ headers: {
2025
+ [name: string]: unknown;
2026
+ };
2027
+ content: {
2028
+ "application/json": components["schemas"]["Invoice"];
2029
+ };
2030
+ };
2031
+ 400: components["responses"]["BadRequest"];
2032
+ 401: components["responses"]["Unauthorized"];
2033
+ 403: components["responses"]["Forbidden"];
2034
+ 429: components["responses"]["RateLimited"];
2035
+ };
2036
+ };
2037
+ listPayments: {
2038
+ parameters: {
2039
+ query?: {
2040
+ page?: number;
2041
+ page_size?: number;
2042
+ customer_id?: string;
2043
+ start_date?: string;
2044
+ end_date?: string;
2045
+ query?: string;
2046
+ invoice_id?: string;
2047
+ order_id?: string;
2048
+ branch_id?: string;
2049
+ type?: "Payment" | "Refund";
2050
+ method?: "Cash" | "Card" | "Bank" | "Check" | "Credit" | "Other";
2051
+ };
2052
+ header?: never;
2053
+ path?: never;
2054
+ cookie?: never;
2055
+ };
2056
+ requestBody?: never;
2057
+ responses: {
2058
+ /** @description OK */
2059
+ 200: {
2060
+ headers: {
2061
+ [name: string]: unknown;
2062
+ };
2063
+ content: {
2064
+ "application/json": {
2065
+ data: components["schemas"]["Payment"][];
2066
+ pagination: {
2067
+ page: number;
2068
+ page_size: number;
2069
+ has_more: boolean;
2070
+ };
2071
+ };
2072
+ };
2073
+ };
2074
+ 400: components["responses"]["BadRequest"];
2075
+ 401: components["responses"]["Unauthorized"];
2076
+ 403: components["responses"]["Forbidden"];
2077
+ 429: components["responses"]["RateLimited"];
2078
+ };
2079
+ };
2080
+ getPayment: {
2081
+ parameters: {
2082
+ query?: never;
2083
+ header?: never;
2084
+ path: {
2085
+ id: string;
2086
+ };
2087
+ cookie?: never;
2088
+ };
2089
+ requestBody?: never;
2090
+ responses: {
2091
+ /** @description OK */
2092
+ 200: {
2093
+ headers: {
2094
+ [name: string]: unknown;
2095
+ };
2096
+ content: {
2097
+ "application/json": components["schemas"]["Payment"];
2098
+ };
2099
+ };
2100
+ 400: components["responses"]["BadRequest"];
2101
+ 401: components["responses"]["Unauthorized"];
2102
+ 403: components["responses"]["Forbidden"];
2103
+ 429: components["responses"]["RateLimited"];
2104
+ };
2105
+ };
2106
+ listMaintenanceWorkOrders: {
2107
+ parameters: {
2108
+ query?: {
2109
+ page?: number;
2110
+ page_size?: number;
2111
+ status?: "Open" | "Closed";
2112
+ item_id?: string;
2113
+ };
2114
+ header?: never;
2115
+ path?: never;
2116
+ cookie?: never;
2117
+ };
2118
+ requestBody?: never;
2119
+ responses: {
2120
+ /** @description OK */
2121
+ 200: {
2122
+ headers: {
2123
+ [name: string]: unknown;
2124
+ };
2125
+ content: {
2126
+ "application/json": {
2127
+ data: components["schemas"]["WorkOrder"][];
2128
+ pagination: {
2129
+ page: number;
2130
+ page_size: number;
2131
+ has_more: boolean;
2132
+ };
2133
+ };
2134
+ };
2135
+ };
2136
+ 400: components["responses"]["BadRequest"];
2137
+ 401: components["responses"]["Unauthorized"];
2138
+ 403: components["responses"]["Forbidden"];
2139
+ 429: components["responses"]["RateLimited"];
2140
+ };
2141
+ };
2142
+ listMaintenanceServiceOrders: {
2143
+ parameters: {
2144
+ query?: {
2145
+ page?: number;
2146
+ page_size?: number;
2147
+ status?: "Open" | "Closed";
2148
+ customer_id?: string;
2149
+ };
2150
+ header?: never;
2151
+ path?: never;
2152
+ cookie?: never;
2153
+ };
2154
+ requestBody?: never;
2155
+ responses: {
2156
+ /** @description OK */
2157
+ 200: {
2158
+ headers: {
2159
+ [name: string]: unknown;
2160
+ };
2161
+ content: {
2162
+ "application/json": {
2163
+ data: components["schemas"]["ServiceOrder"][];
2164
+ pagination: {
2165
+ page: number;
2166
+ page_size: number;
2167
+ has_more: boolean;
2168
+ };
2169
+ };
2170
+ };
2171
+ };
2172
+ 400: components["responses"]["BadRequest"];
2173
+ 401: components["responses"]["Unauthorized"];
2174
+ 403: components["responses"]["Forbidden"];
2175
+ 429: components["responses"]["RateLimited"];
2176
+ };
2177
+ };
2178
+ "automation.rules.list": {
2179
+ parameters: {
2180
+ query?: {
2181
+ cursor?: string;
2182
+ limit?: number;
2183
+ };
2184
+ header?: never;
2185
+ path?: never;
2186
+ cookie?: never;
2187
+ };
2188
+ requestBody?: never;
2189
+ responses: {
2190
+ /** @description OK */
2191
+ 200: {
2192
+ headers: {
2193
+ [name: string]: unknown;
2194
+ };
2195
+ content: {
2196
+ "application/json": {
2197
+ rules: {
2198
+ id: string;
2199
+ name: string;
2200
+ revision: number;
2201
+ /** @constant */
2202
+ status: "draft";
2203
+ definition: {
2204
+ /** @constant */
2205
+ schema_version: 1;
2206
+ /** @enum {string} */
2207
+ subject: "invoice" | "order";
2208
+ triggers: (({
2209
+ id: string;
2210
+ /** @constant */
2211
+ kind: "event";
2212
+ /** @constant */
2213
+ type: "invoice.paid";
2214
+ } | {
2215
+ id: string;
2216
+ /** @constant */
2217
+ kind: "event";
2218
+ /** @enum {string} */
2219
+ type: "order.created" | "order.completed";
2220
+ }) | ({
2221
+ id: string;
2222
+ /** @constant */
2223
+ kind: "business_date";
2224
+ /** @constant */
2225
+ type: "unpaid_invoice_due";
2226
+ offset_hours: number;
2227
+ } | {
2228
+ id: string;
2229
+ /** @constant */
2230
+ kind: "business_date";
2231
+ /** @constant */
2232
+ type: "completed_order";
2233
+ offset_hours: number;
2234
+ }))[];
2235
+ conditions: {
2236
+ all: ({
2237
+ /** @constant */
2238
+ field: "invoice.outstanding_balance_cents";
2239
+ /** @enum {string} */
2240
+ operator: "greater_than" | "at_least" | "less_than" | "at_most" | "equals";
2241
+ value: number;
2242
+ } | {
2243
+ /** @constant */
2244
+ field: "order.starting_location_id";
2245
+ /** @constant */
2246
+ operator: "in";
2247
+ value: string[];
2248
+ })[];
2249
+ };
2250
+ actions: ({
2251
+ id: string;
2252
+ /** @constant */
2253
+ type: "order.close";
2254
+ } | {
2255
+ id: string;
2256
+ /** @constant */
2257
+ type: "message.send_template";
2258
+ template_id: string;
2259
+ /** @enum {string} */
2260
+ channel: "email" | "sms";
2261
+ enabled?: boolean;
2262
+ recipient: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact") | {
2263
+ first_available: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact")[];
2264
+ };
2265
+ attachments?: "invoice_pdf"[];
2266
+ })[];
2267
+ };
2268
+ /** Format: date-time */
2269
+ created_at: string;
2270
+ /** Format: date-time */
2271
+ updated_at: string;
2272
+ archived_at: string | null;
2273
+ }[];
2274
+ next_cursor: string | null;
2275
+ };
2276
+ };
2277
+ };
2278
+ };
2279
+ };
2280
+ "automation.rules.create": {
2281
+ parameters: {
2282
+ query?: never;
2283
+ header?: {
2284
+ "idempotency-key"?: string;
2285
+ };
2286
+ path?: never;
2287
+ cookie?: never;
2288
+ };
2289
+ requestBody: {
2290
+ content: {
2291
+ "application/json": {
2292
+ name: string;
2293
+ definition: {
2294
+ /** @constant */
2295
+ schema_version: 1;
2296
+ /** @enum {string} */
2297
+ subject: "invoice" | "order";
2298
+ triggers: (({
2299
+ id: string;
2300
+ /** @constant */
2301
+ kind: "event";
2302
+ /** @constant */
2303
+ type: "invoice.paid";
2304
+ } | {
2305
+ id: string;
2306
+ /** @constant */
2307
+ kind: "event";
2308
+ /** @enum {string} */
2309
+ type: "order.created" | "order.completed";
2310
+ }) | ({
2311
+ id: string;
2312
+ /** @constant */
2313
+ kind: "business_date";
2314
+ /** @constant */
2315
+ type: "unpaid_invoice_due";
2316
+ offset_hours: number;
2317
+ } | {
2318
+ id: string;
2319
+ /** @constant */
2320
+ kind: "business_date";
2321
+ /** @constant */
2322
+ type: "completed_order";
2323
+ offset_hours: number;
2324
+ }))[];
2325
+ conditions: {
2326
+ all: ({
2327
+ /** @constant */
2328
+ field: "invoice.outstanding_balance_cents";
2329
+ /** @enum {string} */
2330
+ operator: "greater_than" | "at_least" | "less_than" | "at_most" | "equals";
2331
+ value: number;
2332
+ } | {
2333
+ /** @constant */
2334
+ field: "order.starting_location_id";
2335
+ /** @constant */
2336
+ operator: "in";
2337
+ value: string[];
2338
+ })[];
2339
+ };
2340
+ actions: ({
2341
+ id: string;
2342
+ /** @constant */
2343
+ type: "order.close";
2344
+ } | {
2345
+ id: string;
2346
+ /** @constant */
2347
+ type: "message.send_template";
2348
+ template_id: string;
2349
+ /** @enum {string} */
2350
+ channel: "email" | "sms";
2351
+ enabled?: boolean;
2352
+ recipient: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact") | {
2353
+ first_available: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact")[];
2354
+ };
2355
+ attachments?: "invoice_pdf"[];
2356
+ })[];
2357
+ };
2358
+ };
2359
+ };
2360
+ };
2361
+ responses: {
2362
+ /** @description OK */
2363
+ 201: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": {
2369
+ id: string;
2370
+ name: string;
2371
+ revision: number;
2372
+ /** @constant */
2373
+ status: "draft";
2374
+ definition: {
2375
+ /** @constant */
2376
+ schema_version: 1;
2377
+ /** @enum {string} */
2378
+ subject: "invoice" | "order";
2379
+ triggers: (({
2380
+ id: string;
2381
+ /** @constant */
2382
+ kind: "event";
2383
+ /** @constant */
2384
+ type: "invoice.paid";
2385
+ } | {
2386
+ id: string;
2387
+ /** @constant */
2388
+ kind: "event";
2389
+ /** @enum {string} */
2390
+ type: "order.created" | "order.completed";
2391
+ }) | ({
2392
+ id: string;
2393
+ /** @constant */
2394
+ kind: "business_date";
2395
+ /** @constant */
2396
+ type: "unpaid_invoice_due";
2397
+ offset_hours: number;
2398
+ } | {
2399
+ id: string;
2400
+ /** @constant */
2401
+ kind: "business_date";
2402
+ /** @constant */
2403
+ type: "completed_order";
2404
+ offset_hours: number;
2405
+ }))[];
2406
+ conditions: {
2407
+ all: ({
2408
+ /** @constant */
2409
+ field: "invoice.outstanding_balance_cents";
2410
+ /** @enum {string} */
2411
+ operator: "greater_than" | "at_least" | "less_than" | "at_most" | "equals";
2412
+ value: number;
2413
+ } | {
2414
+ /** @constant */
2415
+ field: "order.starting_location_id";
2416
+ /** @constant */
2417
+ operator: "in";
2418
+ value: string[];
2419
+ })[];
2420
+ };
2421
+ actions: ({
2422
+ id: string;
2423
+ /** @constant */
2424
+ type: "order.close";
2425
+ } | {
2426
+ id: string;
2427
+ /** @constant */
2428
+ type: "message.send_template";
2429
+ template_id: string;
2430
+ /** @enum {string} */
2431
+ channel: "email" | "sms";
2432
+ enabled?: boolean;
2433
+ recipient: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact") | {
2434
+ first_available: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact")[];
2435
+ };
2436
+ attachments?: "invoice_pdf"[];
2437
+ })[];
2438
+ };
2439
+ /** Format: date-time */
2440
+ created_at: string;
2441
+ /** Format: date-time */
2442
+ updated_at: string;
2443
+ archived_at: string | null;
2444
+ };
2445
+ };
2446
+ };
2447
+ };
2448
+ };
2449
+ "automation.rules.get": {
2450
+ parameters: {
2451
+ query?: never;
2452
+ header?: never;
2453
+ path: {
2454
+ id: string;
2455
+ };
2456
+ cookie?: never;
2457
+ };
2458
+ requestBody?: never;
2459
+ responses: {
2460
+ /** @description OK */
2461
+ 200: {
2462
+ headers: {
2463
+ [name: string]: unknown;
2464
+ };
2465
+ content: {
2466
+ "application/json": {
2467
+ id: string;
2468
+ name: string;
2469
+ revision: number;
2470
+ /** @constant */
2471
+ status: "draft";
2472
+ definition: {
2473
+ /** @constant */
2474
+ schema_version: 1;
2475
+ /** @enum {string} */
2476
+ subject: "invoice" | "order";
2477
+ triggers: (({
2478
+ id: string;
2479
+ /** @constant */
2480
+ kind: "event";
2481
+ /** @constant */
2482
+ type: "invoice.paid";
2483
+ } | {
2484
+ id: string;
2485
+ /** @constant */
2486
+ kind: "event";
2487
+ /** @enum {string} */
2488
+ type: "order.created" | "order.completed";
2489
+ }) | ({
2490
+ id: string;
2491
+ /** @constant */
2492
+ kind: "business_date";
2493
+ /** @constant */
2494
+ type: "unpaid_invoice_due";
2495
+ offset_hours: number;
2496
+ } | {
2497
+ id: string;
2498
+ /** @constant */
2499
+ kind: "business_date";
2500
+ /** @constant */
2501
+ type: "completed_order";
2502
+ offset_hours: number;
2503
+ }))[];
2504
+ conditions: {
2505
+ all: ({
2506
+ /** @constant */
2507
+ field: "invoice.outstanding_balance_cents";
2508
+ /** @enum {string} */
2509
+ operator: "greater_than" | "at_least" | "less_than" | "at_most" | "equals";
2510
+ value: number;
2511
+ } | {
2512
+ /** @constant */
2513
+ field: "order.starting_location_id";
2514
+ /** @constant */
2515
+ operator: "in";
2516
+ value: string[];
2517
+ })[];
2518
+ };
2519
+ actions: ({
2520
+ id: string;
2521
+ /** @constant */
2522
+ type: "order.close";
2523
+ } | {
2524
+ id: string;
2525
+ /** @constant */
2526
+ type: "message.send_template";
2527
+ template_id: string;
2528
+ /** @enum {string} */
2529
+ channel: "email" | "sms";
2530
+ enabled?: boolean;
2531
+ recipient: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact") | {
2532
+ first_available: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact")[];
2533
+ };
2534
+ attachments?: "invoice_pdf"[];
2535
+ })[];
2536
+ };
2537
+ /** Format: date-time */
2538
+ created_at: string;
2539
+ /** Format: date-time */
2540
+ updated_at: string;
2541
+ archived_at: string | null;
2542
+ };
2543
+ };
2544
+ };
2545
+ };
2546
+ };
2547
+ "automation.rules.update": {
2548
+ parameters: {
2549
+ query?: never;
2550
+ header?: never;
2551
+ path: {
2552
+ id: string;
2553
+ };
2554
+ cookie?: never;
2555
+ };
2556
+ requestBody: {
2557
+ content: {
2558
+ "application/json": {
2559
+ name: string;
2560
+ definition: {
2561
+ /** @constant */
2562
+ schema_version: 1;
2563
+ /** @enum {string} */
2564
+ subject: "invoice" | "order";
2565
+ triggers: (({
2566
+ id: string;
2567
+ /** @constant */
2568
+ kind: "event";
2569
+ /** @constant */
2570
+ type: "invoice.paid";
2571
+ } | {
2572
+ id: string;
2573
+ /** @constant */
2574
+ kind: "event";
2575
+ /** @enum {string} */
2576
+ type: "order.created" | "order.completed";
2577
+ }) | ({
2578
+ id: string;
2579
+ /** @constant */
2580
+ kind: "business_date";
2581
+ /** @constant */
2582
+ type: "unpaid_invoice_due";
2583
+ offset_hours: number;
2584
+ } | {
2585
+ id: string;
2586
+ /** @constant */
2587
+ kind: "business_date";
2588
+ /** @constant */
2589
+ type: "completed_order";
2590
+ offset_hours: number;
2591
+ }))[];
2592
+ conditions: {
2593
+ all: ({
2594
+ /** @constant */
2595
+ field: "invoice.outstanding_balance_cents";
2596
+ /** @enum {string} */
2597
+ operator: "greater_than" | "at_least" | "less_than" | "at_most" | "equals";
2598
+ value: number;
2599
+ } | {
2600
+ /** @constant */
2601
+ field: "order.starting_location_id";
2602
+ /** @constant */
2603
+ operator: "in";
2604
+ value: string[];
2605
+ })[];
2606
+ };
2607
+ actions: ({
2608
+ id: string;
2609
+ /** @constant */
2610
+ type: "order.close";
2611
+ } | {
2612
+ id: string;
2613
+ /** @constant */
2614
+ type: "message.send_template";
2615
+ template_id: string;
2616
+ /** @enum {string} */
2617
+ channel: "email" | "sms";
2618
+ enabled?: boolean;
2619
+ recipient: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact") | {
2620
+ first_available: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact")[];
2621
+ };
2622
+ attachments?: "invoice_pdf"[];
2623
+ })[];
2624
+ };
2625
+ revision: number;
2626
+ };
2627
+ };
2628
+ };
2629
+ responses: {
2630
+ /** @description OK */
2631
+ 200: {
2632
+ headers: {
2633
+ [name: string]: unknown;
2634
+ };
2635
+ content: {
2636
+ "application/json": {
2637
+ id: string;
2638
+ name: string;
2639
+ revision: number;
2640
+ /** @constant */
2641
+ status: "draft";
2642
+ definition: {
2643
+ /** @constant */
2644
+ schema_version: 1;
2645
+ /** @enum {string} */
2646
+ subject: "invoice" | "order";
2647
+ triggers: (({
2648
+ id: string;
2649
+ /** @constant */
2650
+ kind: "event";
2651
+ /** @constant */
2652
+ type: "invoice.paid";
2653
+ } | {
2654
+ id: string;
2655
+ /** @constant */
2656
+ kind: "event";
2657
+ /** @enum {string} */
2658
+ type: "order.created" | "order.completed";
2659
+ }) | ({
2660
+ id: string;
2661
+ /** @constant */
2662
+ kind: "business_date";
2663
+ /** @constant */
2664
+ type: "unpaid_invoice_due";
2665
+ offset_hours: number;
2666
+ } | {
2667
+ id: string;
2668
+ /** @constant */
2669
+ kind: "business_date";
2670
+ /** @constant */
2671
+ type: "completed_order";
2672
+ offset_hours: number;
2673
+ }))[];
2674
+ conditions: {
2675
+ all: ({
2676
+ /** @constant */
2677
+ field: "invoice.outstanding_balance_cents";
2678
+ /** @enum {string} */
2679
+ operator: "greater_than" | "at_least" | "less_than" | "at_most" | "equals";
2680
+ value: number;
2681
+ } | {
2682
+ /** @constant */
2683
+ field: "order.starting_location_id";
2684
+ /** @constant */
2685
+ operator: "in";
2686
+ value: string[];
2687
+ })[];
2688
+ };
2689
+ actions: ({
2690
+ id: string;
2691
+ /** @constant */
2692
+ type: "order.close";
2693
+ } | {
2694
+ id: string;
2695
+ /** @constant */
2696
+ type: "message.send_template";
2697
+ template_id: string;
2698
+ /** @enum {string} */
2699
+ channel: "email" | "sms";
2700
+ enabled?: boolean;
2701
+ recipient: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact") | {
2702
+ first_available: ("customer.primary_contact" | "customer.billing_contact" | "order.point_of_contact" | "invoice.order.point_of_contact")[];
2703
+ };
2704
+ attachments?: "invoice_pdf"[];
2705
+ })[];
2706
+ };
2707
+ /** Format: date-time */
2708
+ created_at: string;
2709
+ /** Format: date-time */
2710
+ updated_at: string;
2711
+ archived_at: string | null;
2712
+ };
2713
+ };
2714
+ };
2715
+ };
2716
+ };
2717
+ "automation.rules.delete": {
2718
+ parameters: {
2719
+ query: {
2720
+ revision: number;
2721
+ };
2722
+ header?: never;
2723
+ path: {
2724
+ id: string;
2725
+ };
2726
+ cookie?: never;
2727
+ };
2728
+ requestBody?: never;
2729
+ responses: {
2730
+ /** @description OK */
2731
+ 200: {
2732
+ headers: {
2733
+ [name: string]: unknown;
2734
+ };
2735
+ content: {
2736
+ "application/json": {
2737
+ id: string;
2738
+ revision: number;
2739
+ };
2740
+ };
2741
+ };
2742
+ };
2743
+ };
2744
+ }