@apideck/unify 0.28.0 → 0.28.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 (90) hide show
  1. package/docs/sdks/categories/README.md +12 -0
  2. package/examples/package-lock.json +2 -2
  3. package/funcs/accountingCategoriesGet.d.ts.map +1 -1
  4. package/funcs/accountingCategoriesGet.js +4 -2
  5. package/funcs/accountingCategoriesGet.js.map +1 -1
  6. package/funcs/accountingCategoriesList.d.ts.map +1 -1
  7. package/funcs/accountingCategoriesList.js +4 -2
  8. package/funcs/accountingCategoriesList.js.map +1 -1
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +4 -4
  11. package/lib/config.js +4 -4
  12. package/models/components/balancesheetfilter.d.ts +5 -0
  13. package/models/components/balancesheetfilter.d.ts.map +1 -1
  14. package/models/components/balancesheetfilter.js +4 -0
  15. package/models/components/balancesheetfilter.js.map +1 -1
  16. package/models/components/categoriesfilter.d.ts +67 -0
  17. package/models/components/categoriesfilter.d.ts.map +1 -0
  18. package/models/components/categoriesfilter.js +82 -0
  19. package/models/components/categoriesfilter.js.map +1 -0
  20. package/models/components/category.d.ts +39 -0
  21. package/models/components/category.d.ts.map +1 -1
  22. package/models/components/category.js +26 -1
  23. package/models/components/category.js.map +1 -1
  24. package/models/components/connection.d.ts +13 -13
  25. package/models/components/connection.d.ts.map +1 -1
  26. package/models/components/connection.js +16 -17
  27. package/models/components/connection.js.map +1 -1
  28. package/models/components/customfield.d.ts +37 -38
  29. package/models/components/customfield.d.ts.map +1 -1
  30. package/models/components/customfield.js +25 -54
  31. package/models/components/customfield.js.map +1 -1
  32. package/models/components/index.d.ts +1 -0
  33. package/models/components/index.d.ts.map +1 -1
  34. package/models/components/index.js +1 -0
  35. package/models/components/index.js.map +1 -1
  36. package/models/components/invoicelineitem.d.ts +10 -0
  37. package/models/components/invoicelineitem.d.ts.map +1 -1
  38. package/models/components/invoicelineitem.js +8 -0
  39. package/models/components/invoicelineitem.js.map +1 -1
  40. package/models/components/profitandlossfilter.d.ts +5 -0
  41. package/models/components/profitandlossfilter.d.ts.map +1 -1
  42. package/models/components/profitandlossfilter.js +4 -0
  43. package/models/components/profitandlossfilter.js.map +1 -1
  44. package/models/components/simpleformfieldoption.d.ts +13 -13
  45. package/models/components/simpleformfieldoption.d.ts.map +1 -1
  46. package/models/components/simpleformfieldoption.js +16 -16
  47. package/models/components/simpleformfieldoption.js.map +1 -1
  48. package/models/operations/accountingcategoriesall.d.ts +5 -0
  49. package/models/operations/accountingcategoriesall.d.ts.map +1 -1
  50. package/models/operations/accountingcategoriesall.js +2 -0
  51. package/models/operations/accountingcategoriesall.js.map +1 -1
  52. package/models/operations/accountingcategoriesone.d.ts +5 -0
  53. package/models/operations/accountingcategoriesone.d.ts.map +1 -1
  54. package/models/operations/accountingcategoriesone.js +2 -0
  55. package/models/operations/accountingcategoriesone.js.map +1 -1
  56. package/package.json +2 -2
  57. package/src/__tests__/activities.test.ts +8 -8
  58. package/src/__tests__/applicants.test.ts +4 -4
  59. package/src/__tests__/bankfeedaccounts.test.ts +4 -4
  60. package/src/__tests__/billpayments.test.ts +15 -15
  61. package/src/__tests__/bills.test.ts +8 -8
  62. package/src/__tests__/companies.test.ts +7 -7
  63. package/src/__tests__/contacts.test.ts +7 -7
  64. package/src/__tests__/creditnotes.test.ts +38 -38
  65. package/src/__tests__/customers.test.ts +7 -7
  66. package/src/__tests__/employees.test.ts +5 -5
  67. package/src/__tests__/expenses.test.ts +6 -6
  68. package/src/__tests__/invoices.test.ts +33 -33
  69. package/src/__tests__/journalentries.test.ts +8 -8
  70. package/src/__tests__/leads.test.ts +7 -7
  71. package/src/__tests__/ledgeraccounts.test.ts +15 -15
  72. package/src/__tests__/opportunities.test.ts +4 -4
  73. package/src/__tests__/payments.test.ts +15 -15
  74. package/src/__tests__/purchaseorders.test.ts +29 -29
  75. package/src/__tests__/suppliers.test.ts +7 -7
  76. package/src/__tests__/taxrates.test.ts +8 -8
  77. package/src/funcs/accountingCategoriesGet.ts +15 -5
  78. package/src/funcs/accountingCategoriesList.ts +17 -7
  79. package/src/lib/config.ts +4 -4
  80. package/src/models/components/balancesheetfilter.ts +9 -0
  81. package/src/models/components/categoriesfilter.ts +104 -0
  82. package/src/models/components/category.ts +39 -0
  83. package/src/models/components/connection.ts +27 -20
  84. package/src/models/components/customfield.ts +51 -83
  85. package/src/models/components/index.ts +1 -0
  86. package/src/models/components/invoicelineitem.ts +18 -0
  87. package/src/models/components/profitandlossfilter.ts +9 -0
  88. package/src/models/components/simpleformfieldoption.ts +21 -18
  89. package/src/models/operations/accountingcategoriesall.ts +7 -0
  90. package/src/models/operations/accountingcategoriesone.ts +7 -0
@@ -223,10 +223,10 @@ test("Ledgeraccounts Accounting Ledger Accounts All", async () => {
223
223
  id: "2389328923893298",
224
224
  name: "employee_level",
225
225
  description: "Employee Level",
226
- value: [
227
- "<value>",
228
- "<value>",
229
- ],
226
+ value: {
227
+ "0": "<value>",
228
+ "1": "<value>",
229
+ },
230
230
  },
231
231
  ],
232
232
  rowVersion: "1-12345",
@@ -332,10 +332,10 @@ test("Ledgeraccounts Accounting Ledger Accounts All", async () => {
332
332
  id: "2389328923893298",
333
333
  name: "employee_level",
334
334
  description: "Employee Level",
335
- value: [
336
- {},
337
- {},
338
- ],
335
+ value: {
336
+ "0": {},
337
+ "1": {},
338
+ },
339
339
  },
340
340
  ],
341
341
  rowVersion: "1-12345",
@@ -615,9 +615,9 @@ test("Ledgeraccounts Accounting Ledger Accounts One", async () => {
615
615
  id: "2389328923893298",
616
616
  name: "employee_level",
617
617
  description: "Employee Level",
618
- value: [
619
- {},
620
- ],
618
+ value: {
619
+ "0": {},
620
+ },
621
621
  },
622
622
  ],
623
623
  rowVersion: "1-12345",
@@ -731,10 +731,10 @@ test("Ledgeraccounts Accounting Ledger Accounts Update", async () => {
731
731
  id: "2389328923893298",
732
732
  name: "employee_level",
733
733
  description: "Employee Level",
734
- value: [
735
- {},
736
- {},
737
- ],
734
+ value: {
735
+ "0": {},
736
+ "1": {},
737
+ },
738
738
  },
739
739
  ],
740
740
  rowVersion: "1-12345",
@@ -622,10 +622,10 @@ test("Opportunities Crm Opportunities Update", async () => {
622
622
  id: "2389328923893298",
623
623
  name: "employee_level",
624
624
  description: "Employee Level",
625
- value: [
626
- {},
627
- {},
628
- ],
625
+ value: {
626
+ "0": {},
627
+ "1": {},
628
+ },
629
629
  },
630
630
  ],
631
631
  stageLastChangedAt: new Date("2020-09-30T07:43:32.000Z"),
@@ -203,10 +203,10 @@ test("Payments Accounting Payments All", async () => {
203
203
  id: "2389328923893298",
204
204
  name: "employee_level",
205
205
  description: "Employee Level",
206
- value: [
207
- "<value>",
208
- "<value>",
209
- ],
206
+ value: {
207
+ "0": "<value>",
208
+ "1": "<value>",
209
+ },
210
210
  },
211
211
  ],
212
212
  rowVersion: "1-12345",
@@ -303,10 +303,10 @@ test("Payments Accounting Payments All", async () => {
303
303
  id: "2389328923893298",
304
304
  name: "employee_level",
305
305
  description: "Employee Level",
306
- value: [
307
- {},
308
- {},
309
- ],
306
+ value: {
307
+ "0": {},
308
+ "1": {},
309
+ },
310
310
  },
311
311
  ],
312
312
  rowVersion: "1-12345",
@@ -628,9 +628,9 @@ test("Payments Accounting Payments One", async () => {
628
628
  id: "2389328923893298",
629
629
  name: "employee_level",
630
630
  description: "Employee Level",
631
- value: [
632
- {},
633
- ],
631
+ value: {
632
+ "0": {},
633
+ },
634
634
  },
635
635
  ],
636
636
  rowVersion: "1-12345",
@@ -742,10 +742,10 @@ test("Payments Accounting Payments Update", async () => {
742
742
  id: "2389328923893298",
743
743
  name: "employee_level",
744
744
  description: "Employee Level",
745
- value: [
746
- {},
747
- {},
748
- ],
745
+ value: {
746
+ "0": {},
747
+ "1": {},
748
+ },
749
749
  },
750
750
  {
751
751
  id: "2389328923893298",
@@ -455,10 +455,10 @@ test("Purchaseorders Accounting Purchase Orders All", async () => {
455
455
  id: "2389328923893298",
456
456
  name: "employee_level",
457
457
  description: "Employee Level",
458
- value: [
459
- {},
460
- {},
461
- ],
458
+ value: {
459
+ "0": {},
460
+ "1": {},
461
+ },
462
462
  },
463
463
  ],
464
464
  rowVersion: "1-12345",
@@ -832,17 +832,17 @@ test("Purchaseorders Accounting Purchase Orders All", async () => {
832
832
  id: "2389328923893298",
833
833
  name: "employee_level",
834
834
  description: "Employee Level",
835
- value: [
836
- {},
837
- ],
835
+ value: {
836
+ "0": {},
837
+ },
838
838
  },
839
839
  {
840
840
  id: "2389328923893298",
841
841
  name: "employee_level",
842
842
  description: "Employee Level",
843
- value: [
844
- {},
845
- ],
843
+ value: {
844
+ "0": {},
845
+ },
846
846
  },
847
847
  ],
848
848
  rowVersion: "1-12345",
@@ -1273,11 +1273,11 @@ test("Purchaseorders Accounting Purchase Orders Add", async () => {
1273
1273
  id: "2389328923893298",
1274
1274
  name: "employee_level",
1275
1275
  description: "Employee Level",
1276
- value: [
1277
- "<value>",
1278
- "<value>",
1279
- "<value>",
1280
- ],
1276
+ value: {
1277
+ "0": "<value>",
1278
+ "1": "<value>",
1279
+ "2": "<value>",
1280
+ },
1281
1281
  },
1282
1282
  {
1283
1283
  id: "2389328923893298",
@@ -1445,9 +1445,9 @@ test("Purchaseorders Accounting Purchase Orders One", async () => {
1445
1445
  id: "2389328923893298",
1446
1446
  name: "employee_level",
1447
1447
  description: "Employee Level",
1448
- value: [
1449
- {},
1450
- ],
1448
+ value: {
1449
+ "0": {},
1450
+ },
1451
1451
  },
1452
1452
  ],
1453
1453
  rowVersion: "1-12345",
@@ -1839,10 +1839,10 @@ test("Purchaseorders Accounting Purchase Orders Update", async () => {
1839
1839
  id: "2389328923893298",
1840
1840
  name: "employee_level",
1841
1841
  description: "Employee Level",
1842
- value: [
1843
- {},
1844
- {},
1845
- ],
1842
+ value: {
1843
+ "0": {},
1844
+ "1": {},
1845
+ },
1846
1846
  },
1847
1847
  {
1848
1848
  id: "2389328923893298",
@@ -1903,9 +1903,9 @@ test("Purchaseorders Accounting Purchase Orders Update", async () => {
1903
1903
  id: "2389328923893298",
1904
1904
  name: "employee_level",
1905
1905
  description: "Employee Level",
1906
- value: [
1907
- {},
1908
- ],
1906
+ value: {
1907
+ "0": {},
1908
+ },
1909
1909
  },
1910
1910
  ],
1911
1911
  rowVersion: "1-12345",
@@ -2041,10 +2041,10 @@ test("Purchaseorders Accounting Purchase Orders Update", async () => {
2041
2041
  id: "2389328923893298",
2042
2042
  name: "employee_level",
2043
2043
  description: "Employee Level",
2044
- value: [
2045
- "<value>",
2046
- "<value>",
2047
- ],
2044
+ value: {
2045
+ "0": "<value>",
2046
+ "1": "<value>",
2047
+ },
2048
2048
  },
2049
2049
  ],
2050
2050
  rowVersion: "1-12345",
@@ -419,10 +419,10 @@ test("Suppliers Accounting Suppliers All", async () => {
419
419
  id: "2389328923893298",
420
420
  name: "employee_level",
421
421
  description: "Employee Level",
422
- value: [
423
- {},
424
- {},
425
- ],
422
+ value: {
423
+ "0": {},
424
+ "1": {},
425
+ },
426
426
  },
427
427
  ],
428
428
  updatedBy: "12345",
@@ -1506,9 +1506,9 @@ test("Suppliers Accounting Suppliers Update", async () => {
1506
1506
  id: "2389328923893298",
1507
1507
  name: "employee_level",
1508
1508
  description: "Employee Level",
1509
- value: [
1510
- {},
1511
- ],
1509
+ value: {
1510
+ "0": {},
1511
+ },
1512
1512
  },
1513
1513
  ],
1514
1514
  rowVersion: "1-12345",
@@ -275,9 +275,9 @@ test("Taxrates Accounting Tax Rates All", async () => {
275
275
  id: "2389328923893298",
276
276
  name: "employee_level",
277
277
  description: "Employee Level",
278
- value: [
279
- {},
280
- ],
278
+ value: {
279
+ "0": {},
280
+ },
281
281
  },
282
282
  {
283
283
  id: "2389328923893298",
@@ -388,11 +388,11 @@ test("Taxrates Accounting Tax Rates Add", async () => {
388
388
  id: "2389328923893298",
389
389
  name: "employee_level",
390
390
  description: "Employee Level",
391
- value: [
392
- "<value>",
393
- "<value>",
394
- "<value>",
395
- ],
391
+ value: {
392
+ "0": "<value>",
393
+ "1": "<value>",
394
+ "2": "<value>",
395
+ },
396
396
  },
397
397
  ],
398
398
  },
@@ -3,7 +3,12 @@
3
3
  */
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import {
7
+ encodeDeepObjectQuery,
8
+ encodeFormQuery,
9
+ encodeSimple,
10
+ queryJoin,
11
+ } from "../lib/encodings.js";
7
12
  import * as M from "../lib/matchers.js";
8
13
  import { compactMap } from "../lib/primitives.js";
9
14
  import { safeParse } from "../lib/schemas.js";
@@ -106,10 +111,15 @@ async function $do(
106
111
 
107
112
  const path = pathToFunc("/accounting/categories/{id}")(pathParams);
108
113
 
109
- const query = encodeFormQuery({
110
- "fields": payload.fields,
111
- "raw": payload.raw,
112
- });
114
+ const query = queryJoin(
115
+ encodeDeepObjectQuery({
116
+ "filter": payload.filter,
117
+ }),
118
+ encodeFormQuery({
119
+ "fields": payload.fields,
120
+ "raw": payload.raw,
121
+ }),
122
+ );
113
123
 
114
124
  const headers = new Headers(compactMap({
115
125
  Accept: "application/json",
@@ -4,7 +4,12 @@
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
6
  import { dlv } from "../lib/dlv.js";
7
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import {
8
+ encodeDeepObjectQuery,
9
+ encodeFormQuery,
10
+ encodeSimple,
11
+ queryJoin,
12
+ } from "../lib/encodings.js";
8
13
  import * as M from "../lib/matchers.js";
9
14
  import { compactMap } from "../lib/primitives.js";
10
15
  import { safeParse } from "../lib/schemas.js";
@@ -112,12 +117,17 @@ async function $do(
112
117
 
113
118
  const path = pathToFunc("/accounting/categories")();
114
119
 
115
- const query = encodeFormQuery({
116
- "cursor": payload.cursor,
117
- "fields": payload.fields,
118
- "limit": payload.limit,
119
- "raw": payload.raw,
120
- });
120
+ const query = queryJoin(
121
+ encodeDeepObjectQuery({
122
+ "filter": payload.filter,
123
+ }),
124
+ encodeFormQuery({
125
+ "cursor": payload.cursor,
126
+ "fields": payload.fields,
127
+ "limit": payload.limit,
128
+ "raw": payload.raw,
129
+ }),
130
+ );
121
131
 
122
132
  const headers = new Headers(compactMap({
123
133
  Accept: "application/json",
package/src/lib/config.ts CHANGED
@@ -67,8 +67,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
67
67
 
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
- openapiDocVersion: "10.18.1",
71
- sdkVersion: "0.28.0",
72
- genVersion: "2.654.2",
73
- userAgent: "speakeasy-sdk/typescript 0.28.0 2.654.2 10.18.1 @apideck/unify",
70
+ openapiDocVersion: "10.18.2",
71
+ sdkVersion: "0.28.1",
72
+ genVersion: "2.656.3",
73
+ userAgent: "speakeasy-sdk/typescript 0.28.1 2.656.3 10.18.2 @apideck/unify",
74
74
  } as const;
@@ -41,6 +41,10 @@ export type BalanceSheetFilter = {
41
41
  * The type of period to include in the resource: month, quarter, year.
42
42
  */
43
43
  periodType?: PeriodType | undefined;
44
+ /**
45
+ * The ID of the location to include in the resource.
46
+ */
47
+ locationId?: string | undefined;
44
48
  };
45
49
 
46
50
  /** @internal */
@@ -72,12 +76,14 @@ export const BalanceSheetFilter$inboundSchema: z.ZodType<
72
76
  end_date: z.string().optional(),
73
77
  period_count: z.number().int().optional(),
74
78
  period_type: PeriodType$inboundSchema.optional(),
79
+ location_id: z.string().optional(),
75
80
  }).transform((v) => {
76
81
  return remap$(v, {
77
82
  "start_date": "startDate",
78
83
  "end_date": "endDate",
79
84
  "period_count": "periodCount",
80
85
  "period_type": "periodType",
86
+ "location_id": "locationId",
81
87
  });
82
88
  });
83
89
 
@@ -87,6 +93,7 @@ export type BalanceSheetFilter$Outbound = {
87
93
  end_date?: string | undefined;
88
94
  period_count?: number | undefined;
89
95
  period_type?: string | undefined;
96
+ location_id?: string | undefined;
90
97
  };
91
98
 
92
99
  /** @internal */
@@ -99,12 +106,14 @@ export const BalanceSheetFilter$outboundSchema: z.ZodType<
99
106
  endDate: z.string().optional(),
100
107
  periodCount: z.number().int().optional(),
101
108
  periodType: PeriodType$outboundSchema.optional(),
109
+ locationId: z.string().optional(),
102
110
  }).transform((v) => {
103
111
  return remap$(v, {
104
112
  startDate: "start_date",
105
113
  endDate: "end_date",
106
114
  periodCount: "period_count",
107
115
  periodType: "period_type",
116
+ locationId: "location_id",
108
117
  });
109
118
  });
110
119
 
@@ -0,0 +1,104 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The type of the category.
13
+ */
14
+ export const CategoriesFilterType = {
15
+ Supplier: "supplier",
16
+ Expense: "expense",
17
+ Revenue: "revenue",
18
+ } as const;
19
+ /**
20
+ * The type of the category.
21
+ */
22
+ export type CategoriesFilterType = ClosedEnum<typeof CategoriesFilterType>;
23
+
24
+ export type CategoriesFilter = {
25
+ /**
26
+ * The type of the category.
27
+ */
28
+ type?: CategoriesFilterType | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const CategoriesFilterType$inboundSchema: z.ZodNativeEnum<
33
+ typeof CategoriesFilterType
34
+ > = z.nativeEnum(CategoriesFilterType);
35
+
36
+ /** @internal */
37
+ export const CategoriesFilterType$outboundSchema: z.ZodNativeEnum<
38
+ typeof CategoriesFilterType
39
+ > = CategoriesFilterType$inboundSchema;
40
+
41
+ /**
42
+ * @internal
43
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
+ */
45
+ export namespace CategoriesFilterType$ {
46
+ /** @deprecated use `CategoriesFilterType$inboundSchema` instead. */
47
+ export const inboundSchema = CategoriesFilterType$inboundSchema;
48
+ /** @deprecated use `CategoriesFilterType$outboundSchema` instead. */
49
+ export const outboundSchema = CategoriesFilterType$outboundSchema;
50
+ }
51
+
52
+ /** @internal */
53
+ export const CategoriesFilter$inboundSchema: z.ZodType<
54
+ CategoriesFilter,
55
+ z.ZodTypeDef,
56
+ unknown
57
+ > = z.object({
58
+ type: CategoriesFilterType$inboundSchema.optional(),
59
+ });
60
+
61
+ /** @internal */
62
+ export type CategoriesFilter$Outbound = {
63
+ type?: string | undefined;
64
+ };
65
+
66
+ /** @internal */
67
+ export const CategoriesFilter$outboundSchema: z.ZodType<
68
+ CategoriesFilter$Outbound,
69
+ z.ZodTypeDef,
70
+ CategoriesFilter
71
+ > = z.object({
72
+ type: CategoriesFilterType$outboundSchema.optional(),
73
+ });
74
+
75
+ /**
76
+ * @internal
77
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
78
+ */
79
+ export namespace CategoriesFilter$ {
80
+ /** @deprecated use `CategoriesFilter$inboundSchema` instead. */
81
+ export const inboundSchema = CategoriesFilter$inboundSchema;
82
+ /** @deprecated use `CategoriesFilter$outboundSchema` instead. */
83
+ export const outboundSchema = CategoriesFilter$outboundSchema;
84
+ /** @deprecated use `CategoriesFilter$Outbound` instead. */
85
+ export type Outbound = CategoriesFilter$Outbound;
86
+ }
87
+
88
+ export function categoriesFilterToJSON(
89
+ categoriesFilter: CategoriesFilter,
90
+ ): string {
91
+ return JSON.stringify(
92
+ CategoriesFilter$outboundSchema.parse(categoriesFilter),
93
+ );
94
+ }
95
+
96
+ export function categoriesFilterFromJSON(
97
+ jsonString: string,
98
+ ): SafeParseResult<CategoriesFilter, SDKValidationError> {
99
+ return safeParse(
100
+ jsonString,
101
+ (x) => CategoriesFilter$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'CategoriesFilter' from JSON`,
103
+ );
104
+ }
@@ -15,6 +15,19 @@ import {
15
15
  PassThroughBody$outboundSchema,
16
16
  } from "./passthroughbody.js";
17
17
 
18
+ /**
19
+ * The type of the category.
20
+ */
21
+ export const CategoryType = {
22
+ Supplier: "supplier",
23
+ Expense: "expense",
24
+ Revenue: "revenue",
25
+ } as const;
26
+ /**
27
+ * The type of the category.
28
+ */
29
+ export type CategoryType = ClosedEnum<typeof CategoryType>;
30
+
18
31
  /**
19
32
  * Based on the status some functionality is enabled or disabled.
20
33
  */
@@ -36,6 +49,10 @@ export type Category = {
36
49
  * The name of the category.
37
50
  */
38
51
  name?: string | undefined;
52
+ /**
53
+ * The type of the category.
54
+ */
55
+ type?: CategoryType | undefined;
39
56
  /**
40
57
  * Based on the status some functionality is enabled or disabled.
41
58
  */
@@ -70,6 +87,25 @@ export type Category = {
70
87
  passThrough?: Array<PassThroughBody> | undefined;
71
88
  };
72
89
 
90
+ /** @internal */
91
+ export const CategoryType$inboundSchema: z.ZodNativeEnum<typeof CategoryType> =
92
+ z.nativeEnum(CategoryType);
93
+
94
+ /** @internal */
95
+ export const CategoryType$outboundSchema: z.ZodNativeEnum<typeof CategoryType> =
96
+ CategoryType$inboundSchema;
97
+
98
+ /**
99
+ * @internal
100
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
+ */
102
+ export namespace CategoryType$ {
103
+ /** @deprecated use `CategoryType$inboundSchema` instead. */
104
+ export const inboundSchema = CategoryType$inboundSchema;
105
+ /** @deprecated use `CategoryType$outboundSchema` instead. */
106
+ export const outboundSchema = CategoryType$outboundSchema;
107
+ }
108
+
73
109
  /** @internal */
74
110
  export const CategoryStatus$inboundSchema: z.ZodNativeEnum<
75
111
  typeof CategoryStatus
@@ -99,6 +135,7 @@ export const Category$inboundSchema: z.ZodType<
99
135
  > = z.object({
100
136
  id: z.string().optional(),
101
137
  name: z.string().optional(),
138
+ type: CategoryType$inboundSchema.optional(),
102
139
  status: CategoryStatus$inboundSchema.optional(),
103
140
  custom_mappings: z.nullable(z.record(z.any())).optional(),
104
141
  row_version: z.nullable(z.string()).optional(),
@@ -127,6 +164,7 @@ export const Category$inboundSchema: z.ZodType<
127
164
  export type Category$Outbound = {
128
165
  id?: string | undefined;
129
166
  name?: string | undefined;
167
+ type?: string | undefined;
130
168
  status?: string | undefined;
131
169
  custom_mappings?: { [k: string]: any } | null | undefined;
132
170
  row_version?: string | null | undefined;
@@ -145,6 +183,7 @@ export const Category$outboundSchema: z.ZodType<
145
183
  > = z.object({
146
184
  id: z.string().optional(),
147
185
  name: z.string().optional(),
186
+ type: CategoryType$outboundSchema.optional(),
148
187
  status: CategoryStatus$outboundSchema.optional(),
149
188
  customMappings: z.nullable(z.record(z.any())).optional(),
150
189
  rowVersion: z.nullable(z.string()).optional(),