@unified-api/typescript-sdk 2.78.0 → 2.78.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 (84) hide show
  1. package/README.md +4 -0
  2. package/docs/sdks/accounting/README.md +158 -0
  3. package/docs/sdks/cashflow/README.md +165 -0
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/accountingGetAccountingCashflow.d.ts +15 -0
  6. package/funcs/accountingGetAccountingCashflow.d.ts.map +1 -0
  7. package/funcs/accountingGetAccountingCashflow.js +125 -0
  8. package/funcs/accountingGetAccountingCashflow.js.map +1 -0
  9. package/funcs/accountingListAccountingCashflows.d.ts +15 -0
  10. package/funcs/accountingListAccountingCashflows.d.ts.map +1 -0
  11. package/funcs/accountingListAccountingCashflows.js +133 -0
  12. package/funcs/accountingListAccountingCashflows.js.map +1 -0
  13. package/jsr.json +1 -1
  14. package/lib/config.d.ts +3 -3
  15. package/lib/config.js +3 -3
  16. package/package.json +1 -1
  17. package/sdk/accounting.d.ts +8 -0
  18. package/sdk/accounting.d.ts.map +1 -1
  19. package/sdk/accounting.js +14 -0
  20. package/sdk/accounting.js.map +1 -1
  21. package/sdk/cashflow.d.ts +14 -0
  22. package/sdk/cashflow.d.ts.map +1 -0
  23. package/sdk/cashflow.js +26 -0
  24. package/sdk/cashflow.js.map +1 -0
  25. package/sdk/models/operations/getaccountingcashflow.d.ts +47 -0
  26. package/sdk/models/operations/getaccountingcashflow.d.ts.map +1 -0
  27. package/sdk/models/operations/getaccountingcashflow.js +84 -0
  28. package/sdk/models/operations/getaccountingcashflow.js.map +1 -0
  29. package/sdk/models/operations/index.d.ts +2 -0
  30. package/sdk/models/operations/index.d.ts.map +1 -1
  31. package/sdk/models/operations/index.js +2 -0
  32. package/sdk/models/operations/index.js.map +1 -1
  33. package/sdk/models/operations/listaccountingcashflows.d.ts +85 -0
  34. package/sdk/models/operations/listaccountingcashflows.d.ts.map +1 -0
  35. package/sdk/models/operations/listaccountingcashflows.js +116 -0
  36. package/sdk/models/operations/listaccountingcashflows.js.map +1 -0
  37. package/sdk/models/shared/accountingcashflow.d.ts +67 -0
  38. package/sdk/models/shared/accountingcashflow.d.ts.map +1 -0
  39. package/sdk/models/shared/accountingcashflow.js +141 -0
  40. package/sdk/models/shared/accountingcashflow.js.map +1 -0
  41. package/sdk/models/shared/accountingcashflowitem.d.ts +41 -0
  42. package/sdk/models/shared/accountingcashflowitem.d.ts.map +1 -0
  43. package/sdk/models/shared/accountingcashflowitem.js +93 -0
  44. package/sdk/models/shared/accountingcashflowitem.js.map +1 -0
  45. package/sdk/models/shared/accountingcashflowsection.d.ts +34 -0
  46. package/sdk/models/shared/accountingcashflowsection.d.ts.map +1 -0
  47. package/sdk/models/shared/accountingcashflowsection.js +85 -0
  48. package/sdk/models/shared/accountingcashflowsection.js.map +1 -0
  49. package/sdk/models/shared/index.d.ts +4 -0
  50. package/sdk/models/shared/index.d.ts.map +1 -1
  51. package/sdk/models/shared/index.js +4 -0
  52. package/sdk/models/shared/index.js.map +1 -1
  53. package/sdk/models/shared/propertyaccountingcashflowitemsubitems.d.ts +25 -0
  54. package/sdk/models/shared/propertyaccountingcashflowitemsubitems.d.ts.map +1 -0
  55. package/sdk/models/shared/propertyaccountingcashflowitemsubitems.js +65 -0
  56. package/sdk/models/shared/propertyaccountingcashflowitemsubitems.js.map +1 -0
  57. package/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
  58. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  59. package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  60. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  61. package/sdk/models/shared/webhook.d.ts +1 -0
  62. package/sdk/models/shared/webhook.d.ts.map +1 -1
  63. package/sdk/models/shared/webhook.js +1 -0
  64. package/sdk/models/shared/webhook.js.map +1 -1
  65. package/sdk/sdk.d.ts +3 -0
  66. package/sdk/sdk.d.ts.map +1 -1
  67. package/sdk/sdk.js +4 -0
  68. package/sdk/sdk.js.map +1 -1
  69. package/src/funcs/accountingGetAccountingCashflow.ts +176 -0
  70. package/src/funcs/accountingListAccountingCashflows.ts +182 -0
  71. package/src/lib/config.ts +3 -3
  72. package/src/sdk/accounting.ts +30 -0
  73. package/src/sdk/cashflow.ts +40 -0
  74. package/src/sdk/models/operations/getaccountingcashflow.ts +101 -0
  75. package/src/sdk/models/operations/index.ts +2 -0
  76. package/src/sdk/models/operations/listaccountingcashflows.ts +171 -0
  77. package/src/sdk/models/shared/accountingcashflow.ts +176 -0
  78. package/src/sdk/models/shared/accountingcashflowitem.ts +108 -0
  79. package/src/sdk/models/shared/accountingcashflowsection.ts +91 -0
  80. package/src/sdk/models/shared/index.ts +4 -0
  81. package/src/sdk/models/shared/propertyaccountingcashflowitemsubitems.ts +64 -0
  82. package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
  83. package/src/sdk/models/shared/webhook.ts +1 -0
  84. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type GetAccountingCashflowRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * Comma-delimited fields to return
18
+ */
19
+ fields?: Array<string> | undefined;
20
+ /**
21
+ * ID of the Cashflow
22
+ */
23
+ id: string;
24
+ /**
25
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
26
+ */
27
+ raw?: string | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const GetAccountingCashflowRequest$inboundSchema: z.ZodType<
32
+ GetAccountingCashflowRequest,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ connection_id: z.string(),
37
+ fields: z.array(z.string()).optional(),
38
+ id: z.string(),
39
+ raw: z.string().optional(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "connection_id": "connectionId",
43
+ });
44
+ });
45
+
46
+ /** @internal */
47
+ export type GetAccountingCashflowRequest$Outbound = {
48
+ connection_id: string;
49
+ fields?: Array<string> | undefined;
50
+ id: string;
51
+ raw?: string | undefined;
52
+ };
53
+
54
+ /** @internal */
55
+ export const GetAccountingCashflowRequest$outboundSchema: z.ZodType<
56
+ GetAccountingCashflowRequest$Outbound,
57
+ z.ZodTypeDef,
58
+ GetAccountingCashflowRequest
59
+ > = z.object({
60
+ connectionId: z.string(),
61
+ fields: z.array(z.string()).optional(),
62
+ id: z.string(),
63
+ raw: z.string().optional(),
64
+ }).transform((v) => {
65
+ return remap$(v, {
66
+ connectionId: "connection_id",
67
+ });
68
+ });
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace GetAccountingCashflowRequest$ {
75
+ /** @deprecated use `GetAccountingCashflowRequest$inboundSchema` instead. */
76
+ export const inboundSchema = GetAccountingCashflowRequest$inboundSchema;
77
+ /** @deprecated use `GetAccountingCashflowRequest$outboundSchema` instead. */
78
+ export const outboundSchema = GetAccountingCashflowRequest$outboundSchema;
79
+ /** @deprecated use `GetAccountingCashflowRequest$Outbound` instead. */
80
+ export type Outbound = GetAccountingCashflowRequest$Outbound;
81
+ }
82
+
83
+ export function getAccountingCashflowRequestToJSON(
84
+ getAccountingCashflowRequest: GetAccountingCashflowRequest,
85
+ ): string {
86
+ return JSON.stringify(
87
+ GetAccountingCashflowRequest$outboundSchema.parse(
88
+ getAccountingCashflowRequest,
89
+ ),
90
+ );
91
+ }
92
+
93
+ export function getAccountingCashflowRequestFromJSON(
94
+ jsonString: string,
95
+ ): SafeParseResult<GetAccountingCashflowRequest, SDKValidationError> {
96
+ return safeParse(
97
+ jsonString,
98
+ (x) => GetAccountingCashflowRequest$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'GetAccountingCashflowRequest' from JSON`,
100
+ );
101
+ }
@@ -84,6 +84,7 @@ export * from "./createverificationrequest.js";
84
84
  export * from "./getaccountingaccount.js";
85
85
  export * from "./getaccountingbalancesheet.js";
86
86
  export * from "./getaccountingbill.js";
87
+ export * from "./getaccountingcashflow.js";
87
88
  export * from "./getaccountingcategory.js";
88
89
  export * from "./getaccountingcontact.js";
89
90
  export * from "./getaccountingcreditmemo.js";
@@ -178,6 +179,7 @@ export * from "./getverificationrequest.js";
178
179
  export * from "./listaccountingaccounts.js";
179
180
  export * from "./listaccountingbalancesheets.js";
180
181
  export * from "./listaccountingbills.js";
182
+ export * from "./listaccountingcashflows.js";
181
183
  export * from "./listaccountingcategories.js";
182
184
  export * from "./listaccountingcontacts.js";
183
185
  export * from "./listaccountingcreditmemoes.js";
@@ -0,0 +1,171 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type ListAccountingCashflowsRequest = {
12
+ /**
13
+ * The category ID to filter by
14
+ */
15
+ categoryId?: string | undefined;
16
+ /**
17
+ * ID of the connection
18
+ */
19
+ connectionId: string;
20
+ /**
21
+ * The contact ID to filter by
22
+ */
23
+ contactId?: string | undefined;
24
+ /**
25
+ * The end date to filter by (deprecated)
26
+ */
27
+ endLe?: string | undefined;
28
+ /**
29
+ * The end date to filter by
30
+ */
31
+ endLt?: string | undefined;
32
+ /**
33
+ * Comma-delimited fields to return
34
+ */
35
+ fields?: Array<string> | undefined;
36
+ limit?: number | undefined;
37
+ offset?: number | undefined;
38
+ order?: string | undefined;
39
+ /**
40
+ * Query string to search. eg. email address or name
41
+ */
42
+ query?: string | undefined;
43
+ /**
44
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
45
+ */
46
+ raw?: string | undefined;
47
+ sort?: string | undefined;
48
+ /**
49
+ * The start date to filter by
50
+ */
51
+ startGte?: string | undefined;
52
+ /**
53
+ * Return only results whose updated date is equal or greater to this value
54
+ */
55
+ updatedGte?: string | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const ListAccountingCashflowsRequest$inboundSchema: z.ZodType<
60
+ ListAccountingCashflowsRequest,
61
+ z.ZodTypeDef,
62
+ unknown
63
+ > = z.object({
64
+ category_id: z.string().optional(),
65
+ connection_id: z.string(),
66
+ contact_id: z.string().optional(),
67
+ end_le: z.string().optional(),
68
+ end_lt: z.string().optional(),
69
+ fields: z.array(z.string()).optional(),
70
+ limit: z.number().optional(),
71
+ offset: z.number().optional(),
72
+ order: z.string().optional(),
73
+ query: z.string().optional(),
74
+ raw: z.string().optional(),
75
+ sort: z.string().optional(),
76
+ start_gte: z.string().optional(),
77
+ updated_gte: z.string().optional(),
78
+ }).transform((v) => {
79
+ return remap$(v, {
80
+ "category_id": "categoryId",
81
+ "connection_id": "connectionId",
82
+ "contact_id": "contactId",
83
+ "end_le": "endLe",
84
+ "end_lt": "endLt",
85
+ "start_gte": "startGte",
86
+ "updated_gte": "updatedGte",
87
+ });
88
+ });
89
+
90
+ /** @internal */
91
+ export type ListAccountingCashflowsRequest$Outbound = {
92
+ category_id?: string | undefined;
93
+ connection_id: string;
94
+ contact_id?: string | undefined;
95
+ end_le?: string | undefined;
96
+ end_lt?: string | undefined;
97
+ fields?: Array<string> | undefined;
98
+ limit?: number | undefined;
99
+ offset?: number | undefined;
100
+ order?: string | undefined;
101
+ query?: string | undefined;
102
+ raw?: string | undefined;
103
+ sort?: string | undefined;
104
+ start_gte?: string | undefined;
105
+ updated_gte?: string | undefined;
106
+ };
107
+
108
+ /** @internal */
109
+ export const ListAccountingCashflowsRequest$outboundSchema: z.ZodType<
110
+ ListAccountingCashflowsRequest$Outbound,
111
+ z.ZodTypeDef,
112
+ ListAccountingCashflowsRequest
113
+ > = z.object({
114
+ categoryId: z.string().optional(),
115
+ connectionId: z.string(),
116
+ contactId: z.string().optional(),
117
+ endLe: z.string().optional(),
118
+ endLt: z.string().optional(),
119
+ fields: z.array(z.string()).optional(),
120
+ limit: z.number().optional(),
121
+ offset: z.number().optional(),
122
+ order: z.string().optional(),
123
+ query: z.string().optional(),
124
+ raw: z.string().optional(),
125
+ sort: z.string().optional(),
126
+ startGte: z.string().optional(),
127
+ updatedGte: z.string().optional(),
128
+ }).transform((v) => {
129
+ return remap$(v, {
130
+ categoryId: "category_id",
131
+ connectionId: "connection_id",
132
+ contactId: "contact_id",
133
+ endLe: "end_le",
134
+ endLt: "end_lt",
135
+ startGte: "start_gte",
136
+ updatedGte: "updated_gte",
137
+ });
138
+ });
139
+
140
+ /**
141
+ * @internal
142
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
143
+ */
144
+ export namespace ListAccountingCashflowsRequest$ {
145
+ /** @deprecated use `ListAccountingCashflowsRequest$inboundSchema` instead. */
146
+ export const inboundSchema = ListAccountingCashflowsRequest$inboundSchema;
147
+ /** @deprecated use `ListAccountingCashflowsRequest$outboundSchema` instead. */
148
+ export const outboundSchema = ListAccountingCashflowsRequest$outboundSchema;
149
+ /** @deprecated use `ListAccountingCashflowsRequest$Outbound` instead. */
150
+ export type Outbound = ListAccountingCashflowsRequest$Outbound;
151
+ }
152
+
153
+ export function listAccountingCashflowsRequestToJSON(
154
+ listAccountingCashflowsRequest: ListAccountingCashflowsRequest,
155
+ ): string {
156
+ return JSON.stringify(
157
+ ListAccountingCashflowsRequest$outboundSchema.parse(
158
+ listAccountingCashflowsRequest,
159
+ ),
160
+ );
161
+ }
162
+
163
+ export function listAccountingCashflowsRequestFromJSON(
164
+ jsonString: string,
165
+ ): SafeParseResult<ListAccountingCashflowsRequest, SDKValidationError> {
166
+ return safeParse(
167
+ jsonString,
168
+ (x) => ListAccountingCashflowsRequest$inboundSchema.parse(JSON.parse(x)),
169
+ `Failed to parse 'ListAccountingCashflowsRequest' from JSON`,
170
+ );
171
+ }
@@ -0,0 +1,176 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AccountingCashflowSection,
12
+ AccountingCashflowSection$inboundSchema,
13
+ AccountingCashflowSection$Outbound,
14
+ AccountingCashflowSection$outboundSchema,
15
+ } from "./accountingcashflowsection.js";
16
+
17
+ /**
18
+ * Sections
19
+ */
20
+ export type AccountingCashflow = {
21
+ cashBeginningAmount?: number | undefined;
22
+ cashEndingAmount?: number | undefined;
23
+ categoryIds?: Array<string> | undefined;
24
+ contactId?: string | undefined;
25
+ createdAt?: Date | undefined;
26
+ currency?: string | undefined;
27
+ endAt?: Date | undefined;
28
+ financingSections?: Array<AccountingCashflowSection> | undefined;
29
+ id?: string | undefined;
30
+ investingSections?: Array<AccountingCashflowSection> | undefined;
31
+ name?: string | undefined;
32
+ netChangeInCashAmount?: number | undefined;
33
+ operatingSections?: Array<AccountingCashflowSection> | undefined;
34
+ raw?: { [k: string]: any } | undefined;
35
+ startAt?: Date | undefined;
36
+ updatedAt?: Date | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const AccountingCashflow$inboundSchema: z.ZodType<
41
+ AccountingCashflow,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({
45
+ cash_beginning_amount: z.number().optional(),
46
+ cash_ending_amount: z.number().optional(),
47
+ category_ids: z.array(z.string()).optional(),
48
+ contact_id: z.string().optional(),
49
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
50
+ .optional(),
51
+ currency: z.string().optional(),
52
+ end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
53
+ .optional(),
54
+ financing_sections: z.array(AccountingCashflowSection$inboundSchema)
55
+ .optional(),
56
+ id: z.string().optional(),
57
+ investing_sections: z.array(AccountingCashflowSection$inboundSchema)
58
+ .optional(),
59
+ name: z.string().optional(),
60
+ net_change_in_cash_amount: z.number().optional(),
61
+ operating_sections: z.array(AccountingCashflowSection$inboundSchema)
62
+ .optional(),
63
+ raw: z.record(z.any()).optional(),
64
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
65
+ .optional(),
66
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
67
+ .optional(),
68
+ }).transform((v) => {
69
+ return remap$(v, {
70
+ "cash_beginning_amount": "cashBeginningAmount",
71
+ "cash_ending_amount": "cashEndingAmount",
72
+ "category_ids": "categoryIds",
73
+ "contact_id": "contactId",
74
+ "created_at": "createdAt",
75
+ "end_at": "endAt",
76
+ "financing_sections": "financingSections",
77
+ "investing_sections": "investingSections",
78
+ "net_change_in_cash_amount": "netChangeInCashAmount",
79
+ "operating_sections": "operatingSections",
80
+ "start_at": "startAt",
81
+ "updated_at": "updatedAt",
82
+ });
83
+ });
84
+
85
+ /** @internal */
86
+ export type AccountingCashflow$Outbound = {
87
+ cash_beginning_amount?: number | undefined;
88
+ cash_ending_amount?: number | undefined;
89
+ category_ids?: Array<string> | undefined;
90
+ contact_id?: string | undefined;
91
+ created_at?: string | undefined;
92
+ currency?: string | undefined;
93
+ end_at?: string | undefined;
94
+ financing_sections?: Array<AccountingCashflowSection$Outbound> | undefined;
95
+ id?: string | undefined;
96
+ investing_sections?: Array<AccountingCashflowSection$Outbound> | undefined;
97
+ name?: string | undefined;
98
+ net_change_in_cash_amount?: number | undefined;
99
+ operating_sections?: Array<AccountingCashflowSection$Outbound> | undefined;
100
+ raw?: { [k: string]: any } | undefined;
101
+ start_at?: string | undefined;
102
+ updated_at?: string | undefined;
103
+ };
104
+
105
+ /** @internal */
106
+ export const AccountingCashflow$outboundSchema: z.ZodType<
107
+ AccountingCashflow$Outbound,
108
+ z.ZodTypeDef,
109
+ AccountingCashflow
110
+ > = z.object({
111
+ cashBeginningAmount: z.number().optional(),
112
+ cashEndingAmount: z.number().optional(),
113
+ categoryIds: z.array(z.string()).optional(),
114
+ contactId: z.string().optional(),
115
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
116
+ currency: z.string().optional(),
117
+ endAt: z.date().transform(v => v.toISOString()).optional(),
118
+ financingSections: z.array(AccountingCashflowSection$outboundSchema)
119
+ .optional(),
120
+ id: z.string().optional(),
121
+ investingSections: z.array(AccountingCashflowSection$outboundSchema)
122
+ .optional(),
123
+ name: z.string().optional(),
124
+ netChangeInCashAmount: z.number().optional(),
125
+ operatingSections: z.array(AccountingCashflowSection$outboundSchema)
126
+ .optional(),
127
+ raw: z.record(z.any()).optional(),
128
+ startAt: z.date().transform(v => v.toISOString()).optional(),
129
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
130
+ }).transform((v) => {
131
+ return remap$(v, {
132
+ cashBeginningAmount: "cash_beginning_amount",
133
+ cashEndingAmount: "cash_ending_amount",
134
+ categoryIds: "category_ids",
135
+ contactId: "contact_id",
136
+ createdAt: "created_at",
137
+ endAt: "end_at",
138
+ financingSections: "financing_sections",
139
+ investingSections: "investing_sections",
140
+ netChangeInCashAmount: "net_change_in_cash_amount",
141
+ operatingSections: "operating_sections",
142
+ startAt: "start_at",
143
+ updatedAt: "updated_at",
144
+ });
145
+ });
146
+
147
+ /**
148
+ * @internal
149
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
150
+ */
151
+ export namespace AccountingCashflow$ {
152
+ /** @deprecated use `AccountingCashflow$inboundSchema` instead. */
153
+ export const inboundSchema = AccountingCashflow$inboundSchema;
154
+ /** @deprecated use `AccountingCashflow$outboundSchema` instead. */
155
+ export const outboundSchema = AccountingCashflow$outboundSchema;
156
+ /** @deprecated use `AccountingCashflow$Outbound` instead. */
157
+ export type Outbound = AccountingCashflow$Outbound;
158
+ }
159
+
160
+ export function accountingCashflowToJSON(
161
+ accountingCashflow: AccountingCashflow,
162
+ ): string {
163
+ return JSON.stringify(
164
+ AccountingCashflow$outboundSchema.parse(accountingCashflow),
165
+ );
166
+ }
167
+
168
+ export function accountingCashflowFromJSON(
169
+ jsonString: string,
170
+ ): SafeParseResult<AccountingCashflow, SDKValidationError> {
171
+ return safeParse(
172
+ jsonString,
173
+ (x) => AccountingCashflow$inboundSchema.parse(JSON.parse(x)),
174
+ `Failed to parse 'AccountingCashflow' from JSON`,
175
+ );
176
+ }
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ PropertyAccountingCashflowItemSubItems,
12
+ PropertyAccountingCashflowItemSubItems$inboundSchema,
13
+ PropertyAccountingCashflowItemSubItems$Outbound,
14
+ PropertyAccountingCashflowItemSubItems$outboundSchema,
15
+ } from "./propertyaccountingcashflowitemsubitems.js";
16
+
17
+ export type AccountingCashflowItem = {
18
+ accountId?: string | undefined;
19
+ amount?: number | undefined;
20
+ name?: string | undefined;
21
+ subItems?: Array<PropertyAccountingCashflowItemSubItems> | undefined;
22
+ /**
23
+ * Optional linkage to transactions
24
+ */
25
+ transactionIds?: Array<string> | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const AccountingCashflowItem$inboundSchema: z.ZodType<
30
+ AccountingCashflowItem,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ account_id: z.string().optional(),
35
+ amount: z.number().optional(),
36
+ name: z.string().optional(),
37
+ sub_items: z.array(PropertyAccountingCashflowItemSubItems$inboundSchema)
38
+ .optional(),
39
+ transaction_ids: z.array(z.string()).optional(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "account_id": "accountId",
43
+ "sub_items": "subItems",
44
+ "transaction_ids": "transactionIds",
45
+ });
46
+ });
47
+
48
+ /** @internal */
49
+ export type AccountingCashflowItem$Outbound = {
50
+ account_id?: string | undefined;
51
+ amount?: number | undefined;
52
+ name?: string | undefined;
53
+ sub_items?:
54
+ | Array<PropertyAccountingCashflowItemSubItems$Outbound>
55
+ | undefined;
56
+ transaction_ids?: Array<string> | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const AccountingCashflowItem$outboundSchema: z.ZodType<
61
+ AccountingCashflowItem$Outbound,
62
+ z.ZodTypeDef,
63
+ AccountingCashflowItem
64
+ > = z.object({
65
+ accountId: z.string().optional(),
66
+ amount: z.number().optional(),
67
+ name: z.string().optional(),
68
+ subItems: z.array(PropertyAccountingCashflowItemSubItems$outboundSchema)
69
+ .optional(),
70
+ transactionIds: z.array(z.string()).optional(),
71
+ }).transform((v) => {
72
+ return remap$(v, {
73
+ accountId: "account_id",
74
+ subItems: "sub_items",
75
+ transactionIds: "transaction_ids",
76
+ });
77
+ });
78
+
79
+ /**
80
+ * @internal
81
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
+ */
83
+ export namespace AccountingCashflowItem$ {
84
+ /** @deprecated use `AccountingCashflowItem$inboundSchema` instead. */
85
+ export const inboundSchema = AccountingCashflowItem$inboundSchema;
86
+ /** @deprecated use `AccountingCashflowItem$outboundSchema` instead. */
87
+ export const outboundSchema = AccountingCashflowItem$outboundSchema;
88
+ /** @deprecated use `AccountingCashflowItem$Outbound` instead. */
89
+ export type Outbound = AccountingCashflowItem$Outbound;
90
+ }
91
+
92
+ export function accountingCashflowItemToJSON(
93
+ accountingCashflowItem: AccountingCashflowItem,
94
+ ): string {
95
+ return JSON.stringify(
96
+ AccountingCashflowItem$outboundSchema.parse(accountingCashflowItem),
97
+ );
98
+ }
99
+
100
+ export function accountingCashflowItemFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<AccountingCashflowItem, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => AccountingCashflowItem$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'AccountingCashflowItem' from JSON`,
107
+ );
108
+ }
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AccountingCashflowItem,
12
+ AccountingCashflowItem$inboundSchema,
13
+ AccountingCashflowItem$Outbound,
14
+ AccountingCashflowItem$outboundSchema,
15
+ } from "./accountingcashflowitem.js";
16
+
17
+ export type AccountingCashflowSection = {
18
+ items?: Array<AccountingCashflowItem> | undefined;
19
+ sectionName?: string | undefined;
20
+ totalAmount?: number | undefined;
21
+ };
22
+
23
+ /** @internal */
24
+ export const AccountingCashflowSection$inboundSchema: z.ZodType<
25
+ AccountingCashflowSection,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ items: z.array(AccountingCashflowItem$inboundSchema).optional(),
30
+ section_name: z.string().optional(),
31
+ total_amount: z.number().optional(),
32
+ }).transform((v) => {
33
+ return remap$(v, {
34
+ "section_name": "sectionName",
35
+ "total_amount": "totalAmount",
36
+ });
37
+ });
38
+
39
+ /** @internal */
40
+ export type AccountingCashflowSection$Outbound = {
41
+ items?: Array<AccountingCashflowItem$Outbound> | undefined;
42
+ section_name?: string | undefined;
43
+ total_amount?: number | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const AccountingCashflowSection$outboundSchema: z.ZodType<
48
+ AccountingCashflowSection$Outbound,
49
+ z.ZodTypeDef,
50
+ AccountingCashflowSection
51
+ > = z.object({
52
+ items: z.array(AccountingCashflowItem$outboundSchema).optional(),
53
+ sectionName: z.string().optional(),
54
+ totalAmount: z.number().optional(),
55
+ }).transform((v) => {
56
+ return remap$(v, {
57
+ sectionName: "section_name",
58
+ totalAmount: "total_amount",
59
+ });
60
+ });
61
+
62
+ /**
63
+ * @internal
64
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
+ */
66
+ export namespace AccountingCashflowSection$ {
67
+ /** @deprecated use `AccountingCashflowSection$inboundSchema` instead. */
68
+ export const inboundSchema = AccountingCashflowSection$inboundSchema;
69
+ /** @deprecated use `AccountingCashflowSection$outboundSchema` instead. */
70
+ export const outboundSchema = AccountingCashflowSection$outboundSchema;
71
+ /** @deprecated use `AccountingCashflowSection$Outbound` instead. */
72
+ export type Outbound = AccountingCashflowSection$Outbound;
73
+ }
74
+
75
+ export function accountingCashflowSectionToJSON(
76
+ accountingCashflowSection: AccountingCashflowSection,
77
+ ): string {
78
+ return JSON.stringify(
79
+ AccountingCashflowSection$outboundSchema.parse(accountingCashflowSection),
80
+ );
81
+ }
82
+
83
+ export function accountingCashflowSectionFromJSON(
84
+ jsonString: string,
85
+ ): SafeParseResult<AccountingCashflowSection, SDKValidationError> {
86
+ return safeParse(
87
+ jsonString,
88
+ (x) => AccountingCashflowSection$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'AccountingCashflowSection' from JSON`,
90
+ );
91
+ }
@@ -8,6 +8,9 @@ export * from "./accountingattachment.js";
8
8
  export * from "./accountingbalancesheet.js";
9
9
  export * from "./accountingbalancesheetitem.js";
10
10
  export * from "./accountingbill.js";
11
+ export * from "./accountingcashflow.js";
12
+ export * from "./accountingcashflowitem.js";
13
+ export * from "./accountingcashflowsection.js";
11
14
  export * from "./accountingcategory.js";
12
15
  export * from "./accountingcontact.js";
13
16
  export * from "./accountingcontactpaymentmethod.js";
@@ -147,6 +150,7 @@ export * from "./paymentpayout.js";
147
150
  export * from "./paymentrefund.js";
148
151
  export * from "./paymentsubscription.js";
149
152
  export * from "./propertyaccountingbalancesheetitemsubitems.js";
153
+ export * from "./propertyaccountingcashflowitemsubitems.js";
150
154
  export * from "./propertyaccountingcontactbillingaddress.js";
151
155
  export * from "./propertyaccountingcontactshippingaddress.js";
152
156
  export * from "./propertyaccountingorderbillingaddress.js";