@apideck/unify 0.28.0 → 0.28.2

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 (95) 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/expense.d.ts +10 -0
  33. package/models/components/expense.d.ts.map +1 -1
  34. package/models/components/expense.js +8 -0
  35. package/models/components/expense.js.map +1 -1
  36. package/models/components/index.d.ts +1 -0
  37. package/models/components/index.d.ts.map +1 -1
  38. package/models/components/index.js +1 -0
  39. package/models/components/index.js.map +1 -1
  40. package/models/components/invoicelineitem.d.ts +10 -0
  41. package/models/components/invoicelineitem.d.ts.map +1 -1
  42. package/models/components/invoicelineitem.js +8 -0
  43. package/models/components/invoicelineitem.js.map +1 -1
  44. package/models/components/profitandlossfilter.d.ts +5 -0
  45. package/models/components/profitandlossfilter.d.ts.map +1 -1
  46. package/models/components/profitandlossfilter.js +4 -0
  47. package/models/components/profitandlossfilter.js.map +1 -1
  48. package/models/components/simpleformfieldoption.d.ts +13 -13
  49. package/models/components/simpleformfieldoption.d.ts.map +1 -1
  50. package/models/components/simpleformfieldoption.js +16 -16
  51. package/models/components/simpleformfieldoption.js.map +1 -1
  52. package/models/operations/accountingcategoriesall.d.ts +5 -0
  53. package/models/operations/accountingcategoriesall.d.ts.map +1 -1
  54. package/models/operations/accountingcategoriesall.js +2 -0
  55. package/models/operations/accountingcategoriesall.js.map +1 -1
  56. package/models/operations/accountingcategoriesone.d.ts +5 -0
  57. package/models/operations/accountingcategoriesone.d.ts.map +1 -1
  58. package/models/operations/accountingcategoriesone.js +2 -0
  59. package/models/operations/accountingcategoriesone.js.map +1 -1
  60. package/package.json +2 -2
  61. package/src/__tests__/activities.test.ts +8 -8
  62. package/src/__tests__/applicants.test.ts +4 -4
  63. package/src/__tests__/bankfeedaccounts.test.ts +4 -4
  64. package/src/__tests__/billpayments.test.ts +15 -15
  65. package/src/__tests__/bills.test.ts +8 -8
  66. package/src/__tests__/companies.test.ts +7 -7
  67. package/src/__tests__/contacts.test.ts +7 -7
  68. package/src/__tests__/creditnotes.test.ts +38 -38
  69. package/src/__tests__/customers.test.ts +7 -7
  70. package/src/__tests__/employees.test.ts +5 -5
  71. package/src/__tests__/expenses.test.ts +6 -6
  72. package/src/__tests__/invoices.test.ts +33 -33
  73. package/src/__tests__/journalentries.test.ts +8 -8
  74. package/src/__tests__/leads.test.ts +7 -7
  75. package/src/__tests__/ledgeraccounts.test.ts +15 -15
  76. package/src/__tests__/opportunities.test.ts +4 -4
  77. package/src/__tests__/payments.test.ts +15 -15
  78. package/src/__tests__/purchaseorders.test.ts +29 -29
  79. package/src/__tests__/suppliers.test.ts +7 -7
  80. package/src/__tests__/taxrates.test.ts +8 -8
  81. package/src/funcs/accountingCategoriesGet.ts +15 -5
  82. package/src/funcs/accountingCategoriesList.ts +17 -7
  83. package/src/lib/config.ts +4 -4
  84. package/src/models/components/balancesheetfilter.ts +9 -0
  85. package/src/models/components/categoriesfilter.ts +104 -0
  86. package/src/models/components/category.ts +39 -0
  87. package/src/models/components/connection.ts +27 -20
  88. package/src/models/components/customfield.ts +51 -83
  89. package/src/models/components/expense.ts +18 -0
  90. package/src/models/components/index.ts +1 -0
  91. package/src/models/components/invoicelineitem.ts +18 -0
  92. package/src/models/components/profitandlossfilter.ts +9 -0
  93. package/src/models/components/simpleformfieldoption.ts +21 -18
  94. package/src/models/operations/accountingcategoriesall.ts +7 -0
  95. package/src/models/operations/accountingcategoriesone.ts +7 -0
@@ -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(),
@@ -78,7 +78,7 @@ export const Target = {
78
78
  } as const;
79
79
  export type Target = ClosedEnum<typeof Target>;
80
80
 
81
- export type Value5 = string | number | number;
81
+ export type ConnectionValue5 = string | number | number;
82
82
 
83
83
  export type ConnectionValue =
84
84
  | string
@@ -280,43 +280,50 @@ export namespace Target$ {
280
280
  }
281
281
 
282
282
  /** @internal */
283
- export const Value5$inboundSchema: z.ZodType<Value5, z.ZodTypeDef, unknown> = z
284
- .union([z.string(), z.number().int(), z.number()]);
283
+ export const ConnectionValue5$inboundSchema: z.ZodType<
284
+ ConnectionValue5,
285
+ z.ZodTypeDef,
286
+ unknown
287
+ > = z.union([z.string(), z.number().int(), z.number()]);
285
288
 
286
289
  /** @internal */
287
- export type Value5$Outbound = string | number | number;
290
+ export type ConnectionValue5$Outbound = string | number | number;
288
291
 
289
292
  /** @internal */
290
- export const Value5$outboundSchema: z.ZodType<
291
- Value5$Outbound,
293
+ export const ConnectionValue5$outboundSchema: z.ZodType<
294
+ ConnectionValue5$Outbound,
292
295
  z.ZodTypeDef,
293
- Value5
296
+ ConnectionValue5
294
297
  > = z.union([z.string(), z.number().int(), z.number()]);
295
298
 
296
299
  /**
297
300
  * @internal
298
301
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
299
302
  */
300
- export namespace Value5$ {
301
- /** @deprecated use `Value5$inboundSchema` instead. */
302
- export const inboundSchema = Value5$inboundSchema;
303
- /** @deprecated use `Value5$outboundSchema` instead. */
304
- export const outboundSchema = Value5$outboundSchema;
305
- /** @deprecated use `Value5$Outbound` instead. */
306
- export type Outbound = Value5$Outbound;
303
+ export namespace ConnectionValue5$ {
304
+ /** @deprecated use `ConnectionValue5$inboundSchema` instead. */
305
+ export const inboundSchema = ConnectionValue5$inboundSchema;
306
+ /** @deprecated use `ConnectionValue5$outboundSchema` instead. */
307
+ export const outboundSchema = ConnectionValue5$outboundSchema;
308
+ /** @deprecated use `ConnectionValue5$Outbound` instead. */
309
+ export type Outbound = ConnectionValue5$Outbound;
307
310
  }
308
311
 
309
- export function value5ToJSON(value5: Value5): string {
310
- return JSON.stringify(Value5$outboundSchema.parse(value5));
312
+ export function connectionValue5ToJSON(
313
+ connectionValue5: ConnectionValue5,
314
+ ): string {
315
+ return JSON.stringify(
316
+ ConnectionValue5$outboundSchema.parse(connectionValue5),
317
+ );
311
318
  }
312
319
 
313
- export function value5FromJSON(
320
+ export function connectionValue5FromJSON(
314
321
  jsonString: string,
315
- ): SafeParseResult<Value5, SDKValidationError> {
322
+ ): SafeParseResult<ConnectionValue5, SDKValidationError> {
316
323
  return safeParse(
317
324
  jsonString,
318
- (x) => Value5$inboundSchema.parse(JSON.parse(x)),
319
- `Failed to parse 'Value5' from JSON`,
325
+ (x) => ConnectionValue5$inboundSchema.parse(JSON.parse(x)),
326
+ `Failed to parse 'ConnectionValue5' from JSON`,
320
327
  );
321
328
  }
322
329
 
@@ -7,17 +7,14 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
- export type Six = {};
11
-
12
- export type Four = {};
10
+ export type Five = string | number | boolean | { [k: string]: any };
13
11
 
14
12
  export type Value =
15
- | Four
16
13
  | string
17
14
  | number
18
15
  | boolean
19
- | Array<string>
20
- | Array<Six>;
16
+ | { [k: string]: any }
17
+ | Array<string | number | boolean | { [k: string]: any } | null>;
21
18
 
22
19
  export type CustomField = {
23
20
  /**
@@ -33,111 +30,74 @@ export type CustomField = {
33
30
  */
34
31
  description?: string | null | undefined;
35
32
  value?:
36
- | Four
37
33
  | string
38
34
  | number
39
35
  | boolean
40
- | Array<string>
41
- | Array<Six>
36
+ | { [k: string]: any }
37
+ | Array<string | number | boolean | { [k: string]: any } | null>
42
38
  | null
43
39
  | undefined;
44
40
  };
45
41
 
46
42
  /** @internal */
47
- export const Six$inboundSchema: z.ZodType<Six, z.ZodTypeDef, unknown> = z
48
- .object({});
49
-
50
- /** @internal */
51
- export type Six$Outbound = {};
52
-
53
- /** @internal */
54
- export const Six$outboundSchema: z.ZodType<Six$Outbound, z.ZodTypeDef, Six> = z
55
- .object({});
56
-
57
- /**
58
- * @internal
59
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
- */
61
- export namespace Six$ {
62
- /** @deprecated use `Six$inboundSchema` instead. */
63
- export const inboundSchema = Six$inboundSchema;
64
- /** @deprecated use `Six$outboundSchema` instead. */
65
- export const outboundSchema = Six$outboundSchema;
66
- /** @deprecated use `Six$Outbound` instead. */
67
- export type Outbound = Six$Outbound;
68
- }
69
-
70
- export function sixToJSON(six: Six): string {
71
- return JSON.stringify(Six$outboundSchema.parse(six));
72
- }
73
-
74
- export function sixFromJSON(
75
- jsonString: string,
76
- ): SafeParseResult<Six, SDKValidationError> {
77
- return safeParse(
78
- jsonString,
79
- (x) => Six$inboundSchema.parse(JSON.parse(x)),
80
- `Failed to parse 'Six' from JSON`,
81
- );
82
- }
83
-
84
- /** @internal */
85
- export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
86
- .object({});
43
+ export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
44
+ .union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
87
45
 
88
46
  /** @internal */
89
- export type Four$Outbound = {};
47
+ export type Five$Outbound = string | number | boolean | { [k: string]: any };
90
48
 
91
49
  /** @internal */
92
- export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
93
- z.object({});
50
+ export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
51
+ z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
94
52
 
95
53
  /**
96
54
  * @internal
97
55
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
98
56
  */
99
- export namespace Four$ {
100
- /** @deprecated use `Four$inboundSchema` instead. */
101
- export const inboundSchema = Four$inboundSchema;
102
- /** @deprecated use `Four$outboundSchema` instead. */
103
- export const outboundSchema = Four$outboundSchema;
104
- /** @deprecated use `Four$Outbound` instead. */
105
- export type Outbound = Four$Outbound;
57
+ export namespace Five$ {
58
+ /** @deprecated use `Five$inboundSchema` instead. */
59
+ export const inboundSchema = Five$inboundSchema;
60
+ /** @deprecated use `Five$outboundSchema` instead. */
61
+ export const outboundSchema = Five$outboundSchema;
62
+ /** @deprecated use `Five$Outbound` instead. */
63
+ export type Outbound = Five$Outbound;
106
64
  }
107
65
 
108
- export function fourToJSON(four: Four): string {
109
- return JSON.stringify(Four$outboundSchema.parse(four));
66
+ export function fiveToJSON(five: Five): string {
67
+ return JSON.stringify(Five$outboundSchema.parse(five));
110
68
  }
111
69
 
112
- export function fourFromJSON(
70
+ export function fiveFromJSON(
113
71
  jsonString: string,
114
- ): SafeParseResult<Four, SDKValidationError> {
72
+ ): SafeParseResult<Five, SDKValidationError> {
115
73
  return safeParse(
116
74
  jsonString,
117
- (x) => Four$inboundSchema.parse(JSON.parse(x)),
118
- `Failed to parse 'Four' from JSON`,
75
+ (x) => Five$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'Five' from JSON`,
119
77
  );
120
78
  }
121
79
 
122
80
  /** @internal */
123
81
  export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
124
82
  .union([
125
- z.lazy(() => Four$inboundSchema),
126
83
  z.string(),
127
84
  z.number(),
128
85
  z.boolean(),
129
- z.array(z.string()),
130
- z.array(z.lazy(() => Six$inboundSchema)),
86
+ z.record(z.any()),
87
+ z.array(
88
+ z.nullable(
89
+ z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
90
+ ),
91
+ ),
131
92
  ]);
132
93
 
133
94
  /** @internal */
134
95
  export type Value$Outbound =
135
- | Four$Outbound
136
96
  | string
137
97
  | number
138
98
  | boolean
139
- | Array<string>
140
- | Array<Six$Outbound>;
99
+ | { [k: string]: any }
100
+ | Array<string | number | boolean | { [k: string]: any } | null>;
141
101
 
142
102
  /** @internal */
143
103
  export const Value$outboundSchema: z.ZodType<
@@ -145,12 +105,15 @@ export const Value$outboundSchema: z.ZodType<
145
105
  z.ZodTypeDef,
146
106
  Value
147
107
  > = z.union([
148
- z.lazy(() => Four$outboundSchema),
149
108
  z.string(),
150
109
  z.number(),
151
110
  z.boolean(),
152
- z.array(z.string()),
153
- z.array(z.lazy(() => Six$outboundSchema)),
111
+ z.record(z.any()),
112
+ z.array(
113
+ z.nullable(
114
+ z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
115
+ ),
116
+ ),
154
117
  ]);
155
118
 
156
119
  /**
@@ -191,12 +154,15 @@ export const CustomField$inboundSchema: z.ZodType<
191
154
  description: z.nullable(z.string()).optional(),
192
155
  value: z.nullable(
193
156
  z.union([
194
- z.lazy(() => Four$inboundSchema),
195
157
  z.string(),
196
158
  z.number(),
197
159
  z.boolean(),
198
- z.array(z.string()),
199
- z.array(z.lazy(() => Six$inboundSchema)),
160
+ z.record(z.any()),
161
+ z.array(
162
+ z.nullable(
163
+ z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
164
+ ),
165
+ ),
200
166
  ]),
201
167
  ).optional(),
202
168
  });
@@ -207,12 +173,11 @@ export type CustomField$Outbound = {
207
173
  name?: string | null | undefined;
208
174
  description?: string | null | undefined;
209
175
  value?:
210
- | Four$Outbound
211
176
  | string
212
177
  | number
213
178
  | boolean
214
- | Array<string>
215
- | Array<Six$Outbound>
179
+ | { [k: string]: any }
180
+ | Array<string | number | boolean | { [k: string]: any } | null>
216
181
  | null
217
182
  | undefined;
218
183
  };
@@ -228,12 +193,15 @@ export const CustomField$outboundSchema: z.ZodType<
228
193
  description: z.nullable(z.string()).optional(),
229
194
  value: z.nullable(
230
195
  z.union([
231
- z.lazy(() => Four$outboundSchema),
232
196
  z.string(),
233
197
  z.number(),
234
198
  z.boolean(),
235
- z.array(z.string()),
236
- z.array(z.lazy(() => Six$outboundSchema)),
199
+ z.record(z.any()),
200
+ z.array(
201
+ z.nullable(
202
+ z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
203
+ ),
204
+ ),
237
205
  ]),
238
206
  ).optional(),
239
207
  });
@@ -141,6 +141,10 @@ export type Expense = {
141
141
  * Optional reference identifier for the transaction.
142
142
  */
143
143
  reference?: string | null | undefined;
144
+ /**
145
+ * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
146
+ */
147
+ sourceDocumentUrl?: string | null | undefined;
144
148
  customFields?: Array<CustomField> | undefined;
145
149
  /**
146
150
  * When custom mappings are configured on the resource, the result is included here.
@@ -234,6 +238,10 @@ export type ExpenseInput = {
234
238
  * Optional reference identifier for the transaction.
235
239
  */
236
240
  reference?: string | null | undefined;
241
+ /**
242
+ * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
243
+ */
244
+ sourceDocumentUrl?: string | null | undefined;
237
245
  customFields?: Array<CustomField> | undefined;
238
246
  /**
239
247
  * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
@@ -307,6 +315,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
307
315
  total_amount: z.nullable(z.number()).optional(),
308
316
  line_items: z.array(ExpenseLineItem$inboundSchema),
309
317
  reference: z.nullable(z.string()).optional(),
318
+ source_document_url: z.nullable(z.string()).optional(),
310
319
  custom_fields: z.array(CustomField$inboundSchema).optional(),
311
320
  custom_mappings: z.nullable(z.record(z.any())).optional(),
312
321
  updated_at: z.nullable(
@@ -332,6 +341,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
332
341
  "tax_rate": "taxRate",
333
342
  "total_amount": "totalAmount",
334
343
  "line_items": "lineItems",
344
+ "source_document_url": "sourceDocumentUrl",
335
345
  "custom_fields": "customFields",
336
346
  "custom_mappings": "customMappings",
337
347
  "updated_at": "updatedAt",
@@ -362,6 +372,7 @@ export type Expense$Outbound = {
362
372
  total_amount?: number | null | undefined;
363
373
  line_items: Array<ExpenseLineItem$Outbound>;
364
374
  reference?: string | null | undefined;
375
+ source_document_url?: string | null | undefined;
365
376
  custom_fields?: Array<CustomField$Outbound> | undefined;
366
377
  custom_mappings?: { [k: string]: any } | null | undefined;
367
378
  updated_at?: string | null | undefined;
@@ -395,6 +406,7 @@ export const Expense$outboundSchema: z.ZodType<
395
406
  totalAmount: z.nullable(z.number()).optional(),
396
407
  lineItems: z.array(ExpenseLineItem$outboundSchema),
397
408
  reference: z.nullable(z.string()).optional(),
409
+ sourceDocumentUrl: z.nullable(z.string()).optional(),
398
410
  customFields: z.array(CustomField$outboundSchema).optional(),
399
411
  customMappings: z.nullable(z.record(z.any())).optional(),
400
412
  updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
@@ -416,6 +428,7 @@ export const Expense$outboundSchema: z.ZodType<
416
428
  taxRate: "tax_rate",
417
429
  totalAmount: "total_amount",
418
430
  lineItems: "line_items",
431
+ sourceDocumentUrl: "source_document_url",
419
432
  customFields: "custom_fields",
420
433
  customMappings: "custom_mappings",
421
434
  updatedAt: "updated_at",
@@ -478,6 +491,7 @@ export const ExpenseInput$inboundSchema: z.ZodType<
478
491
  total_amount: z.nullable(z.number()).optional(),
479
492
  line_items: z.array(ExpenseLineItemInput$inboundSchema),
480
493
  reference: z.nullable(z.string()).optional(),
494
+ source_document_url: z.nullable(z.string()).optional(),
481
495
  custom_fields: z.array(CustomField$inboundSchema).optional(),
482
496
  row_version: z.nullable(z.string()).optional(),
483
497
  pass_through: z.array(PassThroughBody$inboundSchema).optional(),
@@ -494,6 +508,7 @@ export const ExpenseInput$inboundSchema: z.ZodType<
494
508
  "tax_rate": "taxRate",
495
509
  "total_amount": "totalAmount",
496
510
  "line_items": "lineItems",
511
+ "source_document_url": "sourceDocumentUrl",
497
512
  "custom_fields": "customFields",
498
513
  "row_version": "rowVersion",
499
514
  "pass_through": "passThrough",
@@ -518,6 +533,7 @@ export type ExpenseInput$Outbound = {
518
533
  total_amount?: number | null | undefined;
519
534
  line_items: Array<ExpenseLineItemInput$Outbound>;
520
535
  reference?: string | null | undefined;
536
+ source_document_url?: string | null | undefined;
521
537
  custom_fields?: Array<CustomField$Outbound> | undefined;
522
538
  row_version?: string | null | undefined;
523
539
  pass_through?: Array<PassThroughBody$Outbound> | undefined;
@@ -545,6 +561,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
545
561
  totalAmount: z.nullable(z.number()).optional(),
546
562
  lineItems: z.array(ExpenseLineItemInput$outboundSchema),
547
563
  reference: z.nullable(z.string()).optional(),
564
+ sourceDocumentUrl: z.nullable(z.string()).optional(),
548
565
  customFields: z.array(CustomField$outboundSchema).optional(),
549
566
  rowVersion: z.nullable(z.string()).optional(),
550
567
  passThrough: z.array(PassThroughBody$outboundSchema).optional(),
@@ -561,6 +578,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
561
578
  taxRate: "tax_rate",
562
579
  totalAmount: "total_amount",
563
580
  lineItems: "line_items",
581
+ sourceDocumentUrl: "source_document_url",
564
582
  customFields: "custom_fields",
565
583
  rowVersion: "row_version",
566
584
  passThrough: "pass_through",
@@ -43,6 +43,7 @@ export * from "./billlineitem.js";
43
43
  export * from "./billpayment.js";
44
44
  export * from "./billsfilter.js";
45
45
  export * from "./billssort.js";
46
+ export * from "./categoriesfilter.js";
46
47
  export * from "./category.js";
47
48
  export * from "./collection.js";
48
49
  export * from "./collectionssort.js";