@apideck/unify 0.11.6 → 0.12.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.
Files changed (97) hide show
  1. package/README.md +27 -15
  2. package/docs/sdks/agedcreditors/README.md +113 -0
  3. package/docs/sdks/ageddebtors/README.md +113 -0
  4. package/funcs/accountingAgedCreditorsGet.d.ts +16 -0
  5. package/funcs/accountingAgedCreditorsGet.d.ts.map +1 -0
  6. package/funcs/accountingAgedCreditorsGet.js +121 -0
  7. package/funcs/accountingAgedCreditorsGet.js.map +1 -0
  8. package/funcs/accountingAgedDebtorsGet.d.ts +16 -0
  9. package/funcs/accountingAgedDebtorsGet.d.ts.map +1 -0
  10. package/funcs/accountingAgedDebtorsGet.js +121 -0
  11. package/funcs/accountingAgedDebtorsGet.js.map +1 -0
  12. package/lib/config.d.ts +4 -4
  13. package/lib/config.js +4 -4
  14. package/models/components/agedcreditors.d.ts +51 -0
  15. package/models/components/agedcreditors.d.ts.map +1 -0
  16. package/models/components/agedcreditors.js +86 -0
  17. package/models/components/agedcreditors.js.map +1 -0
  18. package/models/components/ageddebtors.d.ts +51 -0
  19. package/models/components/ageddebtors.d.ts.map +1 -0
  20. package/models/components/ageddebtors.js +86 -0
  21. package/models/components/ageddebtors.js.map +1 -0
  22. package/models/components/agedreportfilter.d.ts +47 -0
  23. package/models/components/agedreportfilter.d.ts.map +1 -0
  24. package/models/components/agedreportfilter.js +80 -0
  25. package/models/components/agedreportfilter.js.map +1 -0
  26. package/models/components/balancebyperiod.d.ts +46 -0
  27. package/models/components/balancebyperiod.d.ts.map +1 -0
  28. package/models/components/balancebyperiod.js +84 -0
  29. package/models/components/balancebyperiod.js.map +1 -0
  30. package/models/components/balancebytransaction.d.ts +99 -0
  31. package/models/components/balancebytransaction.d.ts.map +1 -0
  32. package/models/components/balancebytransaction.js +115 -0
  33. package/models/components/balancebytransaction.js.map +1 -0
  34. package/models/components/getagedcreditorsresponse.d.ts +58 -0
  35. package/models/components/getagedcreditorsresponse.d.ts.map +1 -0
  36. package/models/components/getagedcreditorsresponse.js +79 -0
  37. package/models/components/getagedcreditorsresponse.js.map +1 -0
  38. package/models/components/getageddebtorsresponse.d.ts +58 -0
  39. package/models/components/getageddebtorsresponse.d.ts.map +1 -0
  40. package/models/components/getageddebtorsresponse.js +79 -0
  41. package/models/components/getageddebtorsresponse.js.map +1 -0
  42. package/models/components/index.d.ts +9 -0
  43. package/models/components/index.d.ts.map +1 -1
  44. package/models/components/index.js +9 -0
  45. package/models/components/index.js.map +1 -1
  46. package/models/components/outstandingbalance.d.ts +40 -0
  47. package/models/components/outstandingbalance.d.ts.map +1 -0
  48. package/models/components/outstandingbalance.js +77 -0
  49. package/models/components/outstandingbalance.js.map +1 -0
  50. package/models/components/outstandingbalancebycurrency.d.ts +36 -0
  51. package/models/components/outstandingbalancebycurrency.d.ts.map +1 -0
  52. package/models/components/outstandingbalancebycurrency.js +72 -0
  53. package/models/components/outstandingbalancebycurrency.js.map +1 -0
  54. package/models/operations/accountingagedcreditorsone.d.ts +125 -0
  55. package/models/operations/accountingagedcreditorsone.d.ts.map +1 -0
  56. package/models/operations/accountingagedcreditorsone.js +153 -0
  57. package/models/operations/accountingagedcreditorsone.js.map +1 -0
  58. package/models/operations/accountingageddebtorsone.d.ts +125 -0
  59. package/models/operations/accountingageddebtorsone.d.ts.map +1 -0
  60. package/models/operations/accountingageddebtorsone.js +153 -0
  61. package/models/operations/accountingageddebtorsone.js.map +1 -0
  62. package/models/operations/index.d.ts +2 -0
  63. package/models/operations/index.d.ts.map +1 -1
  64. package/models/operations/index.js +2 -0
  65. package/models/operations/index.js.map +1 -1
  66. package/package.json +1 -1
  67. package/sdk/accounting.d.ts +6 -0
  68. package/sdk/accounting.d.ts.map +1 -1
  69. package/sdk/accounting.js +10 -0
  70. package/sdk/accounting.js.map +1 -1
  71. package/sdk/agedcreditors.d.ts +12 -0
  72. package/sdk/agedcreditors.d.ts.map +1 -0
  73. package/sdk/agedcreditors.js +22 -0
  74. package/sdk/agedcreditors.js.map +1 -0
  75. package/sdk/ageddebtors.d.ts +12 -0
  76. package/sdk/ageddebtors.d.ts.map +1 -0
  77. package/sdk/ageddebtors.js +22 -0
  78. package/sdk/ageddebtors.js.map +1 -0
  79. package/src/funcs/accountingAgedCreditorsGet.ts +192 -0
  80. package/src/funcs/accountingAgedDebtorsGet.ts +192 -0
  81. package/src/lib/config.ts +4 -4
  82. package/src/models/components/agedcreditors.ts +116 -0
  83. package/src/models/components/ageddebtors.ts +116 -0
  84. package/src/models/components/agedreportfilter.ts +105 -0
  85. package/src/models/components/balancebyperiod.ts +109 -0
  86. package/src/models/components/balancebytransaction.ts +162 -0
  87. package/src/models/components/getagedcreditorsresponse.ts +119 -0
  88. package/src/models/components/getageddebtorsresponse.ts +119 -0
  89. package/src/models/components/index.ts +9 -0
  90. package/src/models/components/outstandingbalance.ts +107 -0
  91. package/src/models/components/outstandingbalancebycurrency.ts +95 -0
  92. package/src/models/operations/accountingagedcreditorsone.ts +277 -0
  93. package/src/models/operations/accountingageddebtorsone.ts +273 -0
  94. package/src/models/operations/index.ts +2 -0
  95. package/src/sdk/accounting.ts +12 -0
  96. package/src/sdk/agedcreditors.ts +27 -0
  97. package/src/sdk/ageddebtors.ts +27 -0
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ OutstandingBalanceByCurrency,
12
+ OutstandingBalanceByCurrency$inboundSchema,
13
+ OutstandingBalanceByCurrency$Outbound,
14
+ OutstandingBalanceByCurrency$outboundSchema,
15
+ } from "./outstandingbalancebycurrency.js";
16
+
17
+ export type OutstandingBalance = {
18
+ /**
19
+ * Unique identifier for the customer or supplier.
20
+ */
21
+ customerId?: string | undefined;
22
+ /**
23
+ * Full name of the customer or supplier.
24
+ */
25
+ customerName?: string | undefined;
26
+ outstandingBalancesByCurrency?:
27
+ | Array<OutstandingBalanceByCurrency>
28
+ | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const OutstandingBalance$inboundSchema: z.ZodType<
33
+ OutstandingBalance,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ customer_id: z.string().optional(),
38
+ customer_name: z.string().optional(),
39
+ outstanding_balances_by_currency: z.array(
40
+ OutstandingBalanceByCurrency$inboundSchema,
41
+ ).optional(),
42
+ }).transform((v) => {
43
+ return remap$(v, {
44
+ "customer_id": "customerId",
45
+ "customer_name": "customerName",
46
+ "outstanding_balances_by_currency": "outstandingBalancesByCurrency",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type OutstandingBalance$Outbound = {
52
+ customer_id?: string | undefined;
53
+ customer_name?: string | undefined;
54
+ outstanding_balances_by_currency?:
55
+ | Array<OutstandingBalanceByCurrency$Outbound>
56
+ | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const OutstandingBalance$outboundSchema: z.ZodType<
61
+ OutstandingBalance$Outbound,
62
+ z.ZodTypeDef,
63
+ OutstandingBalance
64
+ > = z.object({
65
+ customerId: z.string().optional(),
66
+ customerName: z.string().optional(),
67
+ outstandingBalancesByCurrency: z.array(
68
+ OutstandingBalanceByCurrency$outboundSchema,
69
+ ).optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ customerId: "customer_id",
73
+ customerName: "customer_name",
74
+ outstandingBalancesByCurrency: "outstanding_balances_by_currency",
75
+ });
76
+ });
77
+
78
+ /**
79
+ * @internal
80
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
+ */
82
+ export namespace OutstandingBalance$ {
83
+ /** @deprecated use `OutstandingBalance$inboundSchema` instead. */
84
+ export const inboundSchema = OutstandingBalance$inboundSchema;
85
+ /** @deprecated use `OutstandingBalance$outboundSchema` instead. */
86
+ export const outboundSchema = OutstandingBalance$outboundSchema;
87
+ /** @deprecated use `OutstandingBalance$Outbound` instead. */
88
+ export type Outbound = OutstandingBalance$Outbound;
89
+ }
90
+
91
+ export function outstandingBalanceToJSON(
92
+ outstandingBalance: OutstandingBalance,
93
+ ): string {
94
+ return JSON.stringify(
95
+ OutstandingBalance$outboundSchema.parse(outstandingBalance),
96
+ );
97
+ }
98
+
99
+ export function outstandingBalanceFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<OutstandingBalance, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => OutstandingBalance$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'OutstandingBalance' from JSON`,
106
+ );
107
+ }
@@ -0,0 +1,95 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ BalanceByPeriod,
12
+ BalanceByPeriod$inboundSchema,
13
+ BalanceByPeriod$Outbound,
14
+ BalanceByPeriod$outboundSchema,
15
+ } from "./balancebyperiod.js";
16
+ import {
17
+ Currency,
18
+ Currency$inboundSchema,
19
+ Currency$outboundSchema,
20
+ } from "./currency.js";
21
+
22
+ export type OutstandingBalanceByCurrency = {
23
+ /**
24
+ * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
25
+ */
26
+ currency?: Currency | null | undefined;
27
+ balancesByPeriod?: Array<BalanceByPeriod> | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const OutstandingBalanceByCurrency$inboundSchema: z.ZodType<
32
+ OutstandingBalanceByCurrency,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ currency: z.nullable(Currency$inboundSchema).optional(),
37
+ balances_by_period: z.array(BalanceByPeriod$inboundSchema).optional(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "balances_by_period": "balancesByPeriod",
41
+ });
42
+ });
43
+
44
+ /** @internal */
45
+ export type OutstandingBalanceByCurrency$Outbound = {
46
+ currency?: string | null | undefined;
47
+ balances_by_period?: Array<BalanceByPeriod$Outbound> | undefined;
48
+ };
49
+
50
+ /** @internal */
51
+ export const OutstandingBalanceByCurrency$outboundSchema: z.ZodType<
52
+ OutstandingBalanceByCurrency$Outbound,
53
+ z.ZodTypeDef,
54
+ OutstandingBalanceByCurrency
55
+ > = z.object({
56
+ currency: z.nullable(Currency$outboundSchema).optional(),
57
+ balancesByPeriod: z.array(BalanceByPeriod$outboundSchema).optional(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ balancesByPeriod: "balances_by_period",
61
+ });
62
+ });
63
+
64
+ /**
65
+ * @internal
66
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
67
+ */
68
+ export namespace OutstandingBalanceByCurrency$ {
69
+ /** @deprecated use `OutstandingBalanceByCurrency$inboundSchema` instead. */
70
+ export const inboundSchema = OutstandingBalanceByCurrency$inboundSchema;
71
+ /** @deprecated use `OutstandingBalanceByCurrency$outboundSchema` instead. */
72
+ export const outboundSchema = OutstandingBalanceByCurrency$outboundSchema;
73
+ /** @deprecated use `OutstandingBalanceByCurrency$Outbound` instead. */
74
+ export type Outbound = OutstandingBalanceByCurrency$Outbound;
75
+ }
76
+
77
+ export function outstandingBalanceByCurrencyToJSON(
78
+ outstandingBalanceByCurrency: OutstandingBalanceByCurrency,
79
+ ): string {
80
+ return JSON.stringify(
81
+ OutstandingBalanceByCurrency$outboundSchema.parse(
82
+ outstandingBalanceByCurrency,
83
+ ),
84
+ );
85
+ }
86
+
87
+ export function outstandingBalanceByCurrencyFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<OutstandingBalanceByCurrency, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => OutstandingBalanceByCurrency$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'OutstandingBalanceByCurrency' from JSON`,
94
+ );
95
+ }
@@ -0,0 +1,277 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type AccountingAgedCreditorsOneGlobals = {
13
+ /**
14
+ * ID of the consumer which you want to get or push data from
15
+ */
16
+ consumerId?: string | undefined;
17
+ /**
18
+ * The ID of your Unify application
19
+ */
20
+ appId?: string | undefined;
21
+ };
22
+
23
+ export type AccountingAgedCreditorsOneRequest = {
24
+ /**
25
+ * Include raw response. Mostly used for debugging purposes
26
+ */
27
+ raw?: boolean | undefined;
28
+ /**
29
+ * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
30
+ */
31
+ serviceId?: string | undefined;
32
+ /**
33
+ * Apply filters
34
+ */
35
+ filter?: components.AgedReportFilter | undefined;
36
+ /**
37
+ * Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads
38
+ */
39
+ passThrough?: { [k: string]: any } | undefined;
40
+ /**
41
+ * The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
42
+ */
43
+ fields?: string | null | undefined;
44
+ };
45
+
46
+ export type AccountingAgedCreditorsOneResponse = {
47
+ httpMeta: components.HTTPMetadata;
48
+ /**
49
+ * Aged Creditors
50
+ */
51
+ getAgedCreditorsResponse?: components.GetAgedCreditorsResponse | undefined;
52
+ /**
53
+ * Unexpected error
54
+ */
55
+ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const AccountingAgedCreditorsOneGlobals$inboundSchema: z.ZodType<
60
+ AccountingAgedCreditorsOneGlobals,
61
+ z.ZodTypeDef,
62
+ unknown
63
+ > = z.object({
64
+ consumerId: z.string().optional(),
65
+ appId: z.string().optional(),
66
+ });
67
+
68
+ /** @internal */
69
+ export type AccountingAgedCreditorsOneGlobals$Outbound = {
70
+ consumerId?: string | undefined;
71
+ appId?: string | undefined;
72
+ };
73
+
74
+ /** @internal */
75
+ export const AccountingAgedCreditorsOneGlobals$outboundSchema: z.ZodType<
76
+ AccountingAgedCreditorsOneGlobals$Outbound,
77
+ z.ZodTypeDef,
78
+ AccountingAgedCreditorsOneGlobals
79
+ > = z.object({
80
+ consumerId: z.string().optional(),
81
+ appId: z.string().optional(),
82
+ });
83
+
84
+ /**
85
+ * @internal
86
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
87
+ */
88
+ export namespace AccountingAgedCreditorsOneGlobals$ {
89
+ /** @deprecated use `AccountingAgedCreditorsOneGlobals$inboundSchema` instead. */
90
+ export const inboundSchema = AccountingAgedCreditorsOneGlobals$inboundSchema;
91
+ /** @deprecated use `AccountingAgedCreditorsOneGlobals$outboundSchema` instead. */
92
+ export const outboundSchema =
93
+ AccountingAgedCreditorsOneGlobals$outboundSchema;
94
+ /** @deprecated use `AccountingAgedCreditorsOneGlobals$Outbound` instead. */
95
+ export type Outbound = AccountingAgedCreditorsOneGlobals$Outbound;
96
+ }
97
+
98
+ export function accountingAgedCreditorsOneGlobalsToJSON(
99
+ accountingAgedCreditorsOneGlobals: AccountingAgedCreditorsOneGlobals,
100
+ ): string {
101
+ return JSON.stringify(
102
+ AccountingAgedCreditorsOneGlobals$outboundSchema.parse(
103
+ accountingAgedCreditorsOneGlobals,
104
+ ),
105
+ );
106
+ }
107
+
108
+ export function accountingAgedCreditorsOneGlobalsFromJSON(
109
+ jsonString: string,
110
+ ): SafeParseResult<AccountingAgedCreditorsOneGlobals, SDKValidationError> {
111
+ return safeParse(
112
+ jsonString,
113
+ (x) => AccountingAgedCreditorsOneGlobals$inboundSchema.parse(JSON.parse(x)),
114
+ `Failed to parse 'AccountingAgedCreditorsOneGlobals' from JSON`,
115
+ );
116
+ }
117
+
118
+ /** @internal */
119
+ export const AccountingAgedCreditorsOneRequest$inboundSchema: z.ZodType<
120
+ AccountingAgedCreditorsOneRequest,
121
+ z.ZodTypeDef,
122
+ unknown
123
+ > = z.object({
124
+ raw: z.boolean().default(false),
125
+ serviceId: z.string().optional(),
126
+ filter: components.AgedReportFilter$inboundSchema.optional(),
127
+ pass_through: z.record(z.any()).optional(),
128
+ fields: z.nullable(z.string()).optional(),
129
+ }).transform((v) => {
130
+ return remap$(v, {
131
+ "pass_through": "passThrough",
132
+ });
133
+ });
134
+
135
+ /** @internal */
136
+ export type AccountingAgedCreditorsOneRequest$Outbound = {
137
+ raw: boolean;
138
+ serviceId?: string | undefined;
139
+ filter?: components.AgedReportFilter$Outbound | undefined;
140
+ pass_through?: { [k: string]: any } | undefined;
141
+ fields?: string | null | undefined;
142
+ };
143
+
144
+ /** @internal */
145
+ export const AccountingAgedCreditorsOneRequest$outboundSchema: z.ZodType<
146
+ AccountingAgedCreditorsOneRequest$Outbound,
147
+ z.ZodTypeDef,
148
+ AccountingAgedCreditorsOneRequest
149
+ > = z.object({
150
+ raw: z.boolean().default(false),
151
+ serviceId: z.string().optional(),
152
+ filter: components.AgedReportFilter$outboundSchema.optional(),
153
+ passThrough: z.record(z.any()).optional(),
154
+ fields: z.nullable(z.string()).optional(),
155
+ }).transform((v) => {
156
+ return remap$(v, {
157
+ passThrough: "pass_through",
158
+ });
159
+ });
160
+
161
+ /**
162
+ * @internal
163
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
164
+ */
165
+ export namespace AccountingAgedCreditorsOneRequest$ {
166
+ /** @deprecated use `AccountingAgedCreditorsOneRequest$inboundSchema` instead. */
167
+ export const inboundSchema = AccountingAgedCreditorsOneRequest$inboundSchema;
168
+ /** @deprecated use `AccountingAgedCreditorsOneRequest$outboundSchema` instead. */
169
+ export const outboundSchema =
170
+ AccountingAgedCreditorsOneRequest$outboundSchema;
171
+ /** @deprecated use `AccountingAgedCreditorsOneRequest$Outbound` instead. */
172
+ export type Outbound = AccountingAgedCreditorsOneRequest$Outbound;
173
+ }
174
+
175
+ export function accountingAgedCreditorsOneRequestToJSON(
176
+ accountingAgedCreditorsOneRequest: AccountingAgedCreditorsOneRequest,
177
+ ): string {
178
+ return JSON.stringify(
179
+ AccountingAgedCreditorsOneRequest$outboundSchema.parse(
180
+ accountingAgedCreditorsOneRequest,
181
+ ),
182
+ );
183
+ }
184
+
185
+ export function accountingAgedCreditorsOneRequestFromJSON(
186
+ jsonString: string,
187
+ ): SafeParseResult<AccountingAgedCreditorsOneRequest, SDKValidationError> {
188
+ return safeParse(
189
+ jsonString,
190
+ (x) => AccountingAgedCreditorsOneRequest$inboundSchema.parse(JSON.parse(x)),
191
+ `Failed to parse 'AccountingAgedCreditorsOneRequest' from JSON`,
192
+ );
193
+ }
194
+
195
+ /** @internal */
196
+ export const AccountingAgedCreditorsOneResponse$inboundSchema: z.ZodType<
197
+ AccountingAgedCreditorsOneResponse,
198
+ z.ZodTypeDef,
199
+ unknown
200
+ > = z.object({
201
+ HttpMeta: components.HTTPMetadata$inboundSchema,
202
+ GetAgedCreditorsResponse: components.GetAgedCreditorsResponse$inboundSchema
203
+ .optional(),
204
+ UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema
205
+ .optional(),
206
+ }).transform((v) => {
207
+ return remap$(v, {
208
+ "HttpMeta": "httpMeta",
209
+ "GetAgedCreditorsResponse": "getAgedCreditorsResponse",
210
+ "UnexpectedErrorResponse": "unexpectedErrorResponse",
211
+ });
212
+ });
213
+
214
+ /** @internal */
215
+ export type AccountingAgedCreditorsOneResponse$Outbound = {
216
+ HttpMeta: components.HTTPMetadata$Outbound;
217
+ GetAgedCreditorsResponse?:
218
+ | components.GetAgedCreditorsResponse$Outbound
219
+ | undefined;
220
+ UnexpectedErrorResponse?:
221
+ | components.UnexpectedErrorResponse$Outbound
222
+ | undefined;
223
+ };
224
+
225
+ /** @internal */
226
+ export const AccountingAgedCreditorsOneResponse$outboundSchema: z.ZodType<
227
+ AccountingAgedCreditorsOneResponse$Outbound,
228
+ z.ZodTypeDef,
229
+ AccountingAgedCreditorsOneResponse
230
+ > = z.object({
231
+ httpMeta: components.HTTPMetadata$outboundSchema,
232
+ getAgedCreditorsResponse: components.GetAgedCreditorsResponse$outboundSchema
233
+ .optional(),
234
+ unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema
235
+ .optional(),
236
+ }).transform((v) => {
237
+ return remap$(v, {
238
+ httpMeta: "HttpMeta",
239
+ getAgedCreditorsResponse: "GetAgedCreditorsResponse",
240
+ unexpectedErrorResponse: "UnexpectedErrorResponse",
241
+ });
242
+ });
243
+
244
+ /**
245
+ * @internal
246
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
247
+ */
248
+ export namespace AccountingAgedCreditorsOneResponse$ {
249
+ /** @deprecated use `AccountingAgedCreditorsOneResponse$inboundSchema` instead. */
250
+ export const inboundSchema = AccountingAgedCreditorsOneResponse$inboundSchema;
251
+ /** @deprecated use `AccountingAgedCreditorsOneResponse$outboundSchema` instead. */
252
+ export const outboundSchema =
253
+ AccountingAgedCreditorsOneResponse$outboundSchema;
254
+ /** @deprecated use `AccountingAgedCreditorsOneResponse$Outbound` instead. */
255
+ export type Outbound = AccountingAgedCreditorsOneResponse$Outbound;
256
+ }
257
+
258
+ export function accountingAgedCreditorsOneResponseToJSON(
259
+ accountingAgedCreditorsOneResponse: AccountingAgedCreditorsOneResponse,
260
+ ): string {
261
+ return JSON.stringify(
262
+ AccountingAgedCreditorsOneResponse$outboundSchema.parse(
263
+ accountingAgedCreditorsOneResponse,
264
+ ),
265
+ );
266
+ }
267
+
268
+ export function accountingAgedCreditorsOneResponseFromJSON(
269
+ jsonString: string,
270
+ ): SafeParseResult<AccountingAgedCreditorsOneResponse, SDKValidationError> {
271
+ return safeParse(
272
+ jsonString,
273
+ (x) =>
274
+ AccountingAgedCreditorsOneResponse$inboundSchema.parse(JSON.parse(x)),
275
+ `Failed to parse 'AccountingAgedCreditorsOneResponse' from JSON`,
276
+ );
277
+ }