@apideck/unify 0.19.0 → 0.20.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.
- package/docs/sdks/connections/README.md +190 -42
- package/docs/sdks/connectionsettings/README.md +190 -42
- package/docs/sdks/customers/README.md +2 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +2 -8
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +4 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -1
- package/lib/security.js.map +1 -1
- package/models/components/address.d.ts +8 -8
- package/models/components/address.d.ts.map +1 -1
- package/models/components/address.js +13 -14
- package/models/components/address.js.map +1 -1
- package/models/components/balancesheetfilter.d.ts +2 -0
- package/models/components/balancesheetfilter.d.ts.map +1 -1
- package/models/components/balancesheetfilter.js.map +1 -1
- package/models/components/bill.d.ts +10 -0
- package/models/components/bill.d.ts.map +1 -1
- package/models/components/bill.js +8 -0
- package/models/components/bill.js.map +1 -1
- package/models/components/billpayment.d.ts +2 -2
- package/models/components/connectionimportdata.d.ts +15 -15
- package/models/components/connectionimportdata.d.ts.map +1 -1
- package/models/components/connectionimportdata.js +18 -19
- package/models/components/connectionimportdata.js.map +1 -1
- package/models/components/consumerconnection.d.ts +6 -26
- package/models/components/consumerconnection.d.ts.map +1 -1
- package/models/components/consumerconnection.js +3 -26
- package/models/components/consumerconnection.js.map +1 -1
- package/models/components/contact.d.ts +9 -9
- package/models/components/contact.d.ts.map +1 -1
- package/models/components/contact.js +16 -15
- package/models/components/contact.js.map +1 -1
- package/models/components/customersfilter.d.ts +5 -0
- package/models/components/customersfilter.d.ts.map +1 -1
- package/models/components/customersfilter.js +4 -0
- package/models/components/customersfilter.js.map +1 -1
- package/models/components/employee.d.ts +5 -0
- package/models/components/employee.d.ts.map +1 -1
- package/models/components/employee.js +4 -0
- package/models/components/employee.js.map +1 -1
- package/models/components/employeesfilter.d.ts +5 -0
- package/models/components/employeesfilter.d.ts.map +1 -1
- package/models/components/employeesfilter.js +2 -0
- package/models/components/employeesfilter.js.map +1 -1
- package/models/components/formfieldoption.d.ts +10 -2
- package/models/components/formfieldoption.d.ts.map +1 -1
- package/models/components/formfieldoption.js +12 -4
- package/models/components/formfieldoption.js.map +1 -1
- package/models/components/formfieldoptiongroup.d.ts +29 -4
- package/models/components/formfieldoptiongroup.d.ts.map +1 -1
- package/models/components/formfieldoptiongroup.js +34 -5
- package/models/components/formfieldoptiongroup.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/payment.d.ts +1 -1
- package/models/components/paymentinput.d.ts +1 -1
- package/models/components/profitandloss.d.ts +256 -56
- package/models/components/profitandloss.d.ts.map +1 -1
- package/models/components/profitandloss.js +158 -62
- package/models/components/profitandloss.js.map +1 -1
- package/models/components/profitandlossindicator.d.ts +32 -0
- package/models/components/profitandlossindicator.d.ts.map +1 -0
- package/models/components/profitandlossindicator.js +59 -0
- package/models/components/profitandlossindicator.js.map +1 -0
- package/models/components/profitandlosstype.d.ts +34 -0
- package/models/components/profitandlosstype.d.ts.map +1 -0
- package/models/components/profitandlosstype.js +53 -0
- package/models/components/profitandlosstype.js.map +1 -0
- package/models/components/simpleformfieldoption.d.ts +27 -2
- package/models/components/simpleformfieldoption.d.ts.map +1 -1
- package/models/components/simpleformfieldoption.js +33 -3
- package/models/components/simpleformfieldoption.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/sdks.ts +2 -7
- package/src/lib/security.ts +11 -3
- package/src/models/components/address.ts +15 -14
- package/src/models/components/balancesheetfilter.ts +2 -0
- package/src/models/components/bill.ts +18 -0
- package/src/models/components/billpayment.ts +2 -2
- package/src/models/components/connectionimportdata.ts +24 -33
- package/src/models/components/consumerconnection.ts +4 -53
- package/src/models/components/contact.ts +17 -18
- package/src/models/components/customersfilter.ts +9 -0
- package/src/models/components/employee.ts +9 -0
- package/src/models/components/employeesfilter.ts +7 -0
- package/src/models/components/formfieldoption.ts +25 -7
- package/src/models/components/formfieldoptiongroup.ts +50 -8
- package/src/models/components/index.ts +2 -0
- package/src/models/components/payment.ts +1 -1
- package/src/models/components/paymentinput.ts +1 -1
- package/src/models/components/profitandloss.ts +407 -101
- package/src/models/components/profitandlossindicator.ts +69 -0
- package/src/models/components/profitandlosstype.ts +39 -0
- package/src/models/components/simpleformfieldoption.ts +42 -4
|
@@ -7,48 +7,186 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
Currency,
|
|
12
|
+
Currency$inboundSchema,
|
|
13
|
+
Currency$outboundSchema,
|
|
14
|
+
} from "./currency.js";
|
|
10
15
|
import {
|
|
11
16
|
CustomMappings,
|
|
12
17
|
CustomMappings$inboundSchema,
|
|
13
18
|
CustomMappings$Outbound,
|
|
14
19
|
CustomMappings$outboundSchema,
|
|
15
20
|
} from "./custommappings.js";
|
|
21
|
+
import {
|
|
22
|
+
ProfitAndLossIndicator,
|
|
23
|
+
ProfitAndLossIndicator$inboundSchema,
|
|
24
|
+
ProfitAndLossIndicator$Outbound,
|
|
25
|
+
ProfitAndLossIndicator$outboundSchema,
|
|
26
|
+
} from "./profitandlossindicator.js";
|
|
27
|
+
import {
|
|
28
|
+
ProfitAndLossType,
|
|
29
|
+
ProfitAndLossType$inboundSchema,
|
|
30
|
+
ProfitAndLossType$outboundSchema,
|
|
31
|
+
} from "./profitandlosstype.js";
|
|
16
32
|
|
|
33
|
+
/**
|
|
34
|
+
* The operating income accounts
|
|
35
|
+
*/
|
|
17
36
|
export type Income = {
|
|
18
37
|
/**
|
|
19
|
-
*
|
|
38
|
+
* A unique identifier for an object.
|
|
39
|
+
*/
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The account code of the account
|
|
43
|
+
*/
|
|
44
|
+
code?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The name of the account.
|
|
47
|
+
*/
|
|
48
|
+
title?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The type of profit and loss
|
|
51
|
+
*/
|
|
52
|
+
type?: ProfitAndLossType | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The aggregated total of all accounts within this category.
|
|
20
55
|
*/
|
|
21
56
|
total: number | null;
|
|
22
57
|
records?: any | undefined;
|
|
23
58
|
};
|
|
24
59
|
|
|
60
|
+
/**
|
|
61
|
+
* The cost of goods sold accounts
|
|
62
|
+
*/
|
|
63
|
+
export type CostOfGoodsSold = {
|
|
64
|
+
/**
|
|
65
|
+
* A unique identifier for an object.
|
|
66
|
+
*/
|
|
67
|
+
id?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The account code of the account
|
|
70
|
+
*/
|
|
71
|
+
code?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The name of the account.
|
|
74
|
+
*/
|
|
75
|
+
title?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The type of profit and loss
|
|
78
|
+
*/
|
|
79
|
+
type?: ProfitAndLossType | null | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The aggregated total of all accounts within this category.
|
|
82
|
+
*/
|
|
83
|
+
total: number | null;
|
|
84
|
+
records?: any | undefined;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The operating expenses accounts
|
|
89
|
+
*/
|
|
25
90
|
export type Expenses = {
|
|
26
91
|
/**
|
|
27
|
-
*
|
|
92
|
+
* A unique identifier for an object.
|
|
93
|
+
*/
|
|
94
|
+
id?: string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* The account code of the account
|
|
97
|
+
*/
|
|
98
|
+
code?: string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* The name of the account.
|
|
101
|
+
*/
|
|
102
|
+
title?: string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* The type of profit and loss
|
|
105
|
+
*/
|
|
106
|
+
type?: ProfitAndLossType | null | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* The aggregated total of all accounts within this category.
|
|
28
109
|
*/
|
|
29
110
|
total: number | null;
|
|
30
111
|
records?: any | undefined;
|
|
31
112
|
};
|
|
32
113
|
|
|
33
|
-
|
|
114
|
+
/**
|
|
115
|
+
* The other income accounts
|
|
116
|
+
*/
|
|
117
|
+
export type OtherIncome = {
|
|
118
|
+
/**
|
|
119
|
+
* A unique identifier for an object.
|
|
120
|
+
*/
|
|
121
|
+
id?: string | undefined;
|
|
34
122
|
/**
|
|
35
|
-
*
|
|
123
|
+
* The account code of the account
|
|
124
|
+
*/
|
|
125
|
+
code?: string | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* The name of the account.
|
|
128
|
+
*/
|
|
129
|
+
title?: string | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* The type of profit and loss
|
|
132
|
+
*/
|
|
133
|
+
type?: ProfitAndLossType | null | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* The aggregated total of all accounts within this category.
|
|
36
136
|
*/
|
|
37
137
|
total: number | null;
|
|
38
138
|
records?: any | undefined;
|
|
39
139
|
};
|
|
40
140
|
|
|
41
|
-
|
|
141
|
+
/**
|
|
142
|
+
* The other expenses accounts
|
|
143
|
+
*/
|
|
144
|
+
export type OtherExpenses = {
|
|
145
|
+
/**
|
|
146
|
+
* A unique identifier for an object.
|
|
147
|
+
*/
|
|
148
|
+
id?: string | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* The account code of the account
|
|
151
|
+
*/
|
|
152
|
+
code?: string | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* The name of the account.
|
|
155
|
+
*/
|
|
156
|
+
title?: string | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* The type of profit and loss
|
|
159
|
+
*/
|
|
160
|
+
type?: ProfitAndLossType | null | undefined;
|
|
42
161
|
/**
|
|
43
|
-
*
|
|
162
|
+
* The aggregated total of all accounts within this category.
|
|
44
163
|
*/
|
|
45
164
|
total: number | null;
|
|
46
165
|
records?: any | undefined;
|
|
47
166
|
};
|
|
48
167
|
|
|
49
|
-
|
|
168
|
+
/**
|
|
169
|
+
* The accounts not categorized in the other sections
|
|
170
|
+
*/
|
|
171
|
+
export type UncategorizedAccounts = {
|
|
172
|
+
/**
|
|
173
|
+
* A unique identifier for an object.
|
|
174
|
+
*/
|
|
175
|
+
id?: string | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* The account code of the account
|
|
178
|
+
*/
|
|
179
|
+
code?: string | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* The name of the account.
|
|
182
|
+
*/
|
|
183
|
+
title?: string | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* The type of profit and loss
|
|
186
|
+
*/
|
|
187
|
+
type?: ProfitAndLossType | null | undefined;
|
|
50
188
|
/**
|
|
51
|
-
*
|
|
189
|
+
* The aggregated total of all accounts within this category.
|
|
52
190
|
*/
|
|
53
191
|
total: number | null;
|
|
54
192
|
records?: any | undefined;
|
|
@@ -68,34 +206,67 @@ export type ProfitAndLoss = {
|
|
|
68
206
|
*/
|
|
69
207
|
startDate?: string | undefined;
|
|
70
208
|
/**
|
|
71
|
-
* The
|
|
209
|
+
* The end date of the report
|
|
72
210
|
*/
|
|
73
211
|
endDate?: string | undefined;
|
|
74
|
-
currency: string;
|
|
75
212
|
/**
|
|
76
|
-
*
|
|
213
|
+
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
214
|
+
*/
|
|
215
|
+
currency: Currency | null;
|
|
216
|
+
/**
|
|
217
|
+
* The operating income accounts
|
|
77
218
|
*/
|
|
78
|
-
customerId?: string | undefined;
|
|
79
219
|
income: Income;
|
|
220
|
+
/**
|
|
221
|
+
* The cost of goods sold accounts
|
|
222
|
+
*/
|
|
223
|
+
costOfGoodsSold?: CostOfGoodsSold | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* The operating expenses accounts
|
|
226
|
+
*/
|
|
80
227
|
expenses: Expenses;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
228
|
+
/**
|
|
229
|
+
* The other income accounts
|
|
230
|
+
*/
|
|
231
|
+
otherIncome?: OtherIncome | undefined;
|
|
232
|
+
/**
|
|
233
|
+
* The other expenses accounts
|
|
234
|
+
*/
|
|
235
|
+
otherExpenses?: OtherExpenses | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* The accounts not categorized in the other sections
|
|
238
|
+
*/
|
|
239
|
+
uncategorizedAccounts?: UncategorizedAccounts | undefined;
|
|
240
|
+
grossProfit?: ProfitAndLossIndicator | undefined;
|
|
241
|
+
netOperatingIncome?: ProfitAndLossIndicator | undefined;
|
|
242
|
+
netIncome?: ProfitAndLossIndicator | undefined;
|
|
84
243
|
/**
|
|
85
244
|
* When custom mappings are configured on the resource, the result is included here.
|
|
86
245
|
*/
|
|
87
246
|
customMappings?: CustomMappings | null | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* The customer id
|
|
249
|
+
*/
|
|
250
|
+
customer?: string | undefined;
|
|
88
251
|
};
|
|
89
252
|
|
|
90
253
|
/** @internal */
|
|
91
254
|
export const Income$inboundSchema: z.ZodType<Income, z.ZodTypeDef, unknown> = z
|
|
92
255
|
.object({
|
|
256
|
+
id: z.string().optional(),
|
|
257
|
+
code: z.string().optional(),
|
|
258
|
+
title: z.string().optional(),
|
|
259
|
+
type: z.nullable(ProfitAndLossType$inboundSchema).optional(),
|
|
93
260
|
total: z.nullable(z.number()),
|
|
94
261
|
records: z.any().optional(),
|
|
95
262
|
});
|
|
96
263
|
|
|
97
264
|
/** @internal */
|
|
98
265
|
export type Income$Outbound = {
|
|
266
|
+
id?: string | undefined;
|
|
267
|
+
code?: string | undefined;
|
|
268
|
+
title?: string | undefined;
|
|
269
|
+
type?: string | null | undefined;
|
|
99
270
|
total: number | null;
|
|
100
271
|
records?: any | undefined;
|
|
101
272
|
};
|
|
@@ -106,6 +277,10 @@ export const Income$outboundSchema: z.ZodType<
|
|
|
106
277
|
z.ZodTypeDef,
|
|
107
278
|
Income
|
|
108
279
|
> = z.object({
|
|
280
|
+
id: z.string().optional(),
|
|
281
|
+
code: z.string().optional(),
|
|
282
|
+
title: z.string().optional(),
|
|
283
|
+
type: z.nullable(ProfitAndLossType$outboundSchema).optional(),
|
|
109
284
|
total: z.nullable(z.number()),
|
|
110
285
|
records: z.any().optional(),
|
|
111
286
|
});
|
|
@@ -137,18 +312,93 @@ export function incomeFromJSON(
|
|
|
137
312
|
);
|
|
138
313
|
}
|
|
139
314
|
|
|
315
|
+
/** @internal */
|
|
316
|
+
export const CostOfGoodsSold$inboundSchema: z.ZodType<
|
|
317
|
+
CostOfGoodsSold,
|
|
318
|
+
z.ZodTypeDef,
|
|
319
|
+
unknown
|
|
320
|
+
> = z.object({
|
|
321
|
+
id: z.string().optional(),
|
|
322
|
+
code: z.string().optional(),
|
|
323
|
+
title: z.string().optional(),
|
|
324
|
+
type: z.nullable(ProfitAndLossType$inboundSchema).optional(),
|
|
325
|
+
total: z.nullable(z.number()),
|
|
326
|
+
records: z.any().optional(),
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
/** @internal */
|
|
330
|
+
export type CostOfGoodsSold$Outbound = {
|
|
331
|
+
id?: string | undefined;
|
|
332
|
+
code?: string | undefined;
|
|
333
|
+
title?: string | undefined;
|
|
334
|
+
type?: string | null | undefined;
|
|
335
|
+
total: number | null;
|
|
336
|
+
records?: any | undefined;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
/** @internal */
|
|
340
|
+
export const CostOfGoodsSold$outboundSchema: z.ZodType<
|
|
341
|
+
CostOfGoodsSold$Outbound,
|
|
342
|
+
z.ZodTypeDef,
|
|
343
|
+
CostOfGoodsSold
|
|
344
|
+
> = z.object({
|
|
345
|
+
id: z.string().optional(),
|
|
346
|
+
code: z.string().optional(),
|
|
347
|
+
title: z.string().optional(),
|
|
348
|
+
type: z.nullable(ProfitAndLossType$outboundSchema).optional(),
|
|
349
|
+
total: z.nullable(z.number()),
|
|
350
|
+
records: z.any().optional(),
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* @internal
|
|
355
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
356
|
+
*/
|
|
357
|
+
export namespace CostOfGoodsSold$ {
|
|
358
|
+
/** @deprecated use `CostOfGoodsSold$inboundSchema` instead. */
|
|
359
|
+
export const inboundSchema = CostOfGoodsSold$inboundSchema;
|
|
360
|
+
/** @deprecated use `CostOfGoodsSold$outboundSchema` instead. */
|
|
361
|
+
export const outboundSchema = CostOfGoodsSold$outboundSchema;
|
|
362
|
+
/** @deprecated use `CostOfGoodsSold$Outbound` instead. */
|
|
363
|
+
export type Outbound = CostOfGoodsSold$Outbound;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export function costOfGoodsSoldToJSON(
|
|
367
|
+
costOfGoodsSold: CostOfGoodsSold,
|
|
368
|
+
): string {
|
|
369
|
+
return JSON.stringify(CostOfGoodsSold$outboundSchema.parse(costOfGoodsSold));
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export function costOfGoodsSoldFromJSON(
|
|
373
|
+
jsonString: string,
|
|
374
|
+
): SafeParseResult<CostOfGoodsSold, SDKValidationError> {
|
|
375
|
+
return safeParse(
|
|
376
|
+
jsonString,
|
|
377
|
+
(x) => CostOfGoodsSold$inboundSchema.parse(JSON.parse(x)),
|
|
378
|
+
`Failed to parse 'CostOfGoodsSold' from JSON`,
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
|
|
140
382
|
/** @internal */
|
|
141
383
|
export const Expenses$inboundSchema: z.ZodType<
|
|
142
384
|
Expenses,
|
|
143
385
|
z.ZodTypeDef,
|
|
144
386
|
unknown
|
|
145
387
|
> = z.object({
|
|
388
|
+
id: z.string().optional(),
|
|
389
|
+
code: z.string().optional(),
|
|
390
|
+
title: z.string().optional(),
|
|
391
|
+
type: z.nullable(ProfitAndLossType$inboundSchema).optional(),
|
|
146
392
|
total: z.nullable(z.number()),
|
|
147
393
|
records: z.any().optional(),
|
|
148
394
|
});
|
|
149
395
|
|
|
150
396
|
/** @internal */
|
|
151
397
|
export type Expenses$Outbound = {
|
|
398
|
+
id?: string | undefined;
|
|
399
|
+
code?: string | undefined;
|
|
400
|
+
title?: string | undefined;
|
|
401
|
+
type?: string | null | undefined;
|
|
152
402
|
total: number | null;
|
|
153
403
|
records?: any | undefined;
|
|
154
404
|
};
|
|
@@ -159,6 +409,10 @@ export const Expenses$outboundSchema: z.ZodType<
|
|
|
159
409
|
z.ZodTypeDef,
|
|
160
410
|
Expenses
|
|
161
411
|
> = z.object({
|
|
412
|
+
id: z.string().optional(),
|
|
413
|
+
code: z.string().optional(),
|
|
414
|
+
title: z.string().optional(),
|
|
415
|
+
type: z.nullable(ProfitAndLossType$outboundSchema).optional(),
|
|
162
416
|
total: z.nullable(z.number()),
|
|
163
417
|
records: z.any().optional(),
|
|
164
418
|
});
|
|
@@ -191,27 +445,39 @@ export function expensesFromJSON(
|
|
|
191
445
|
}
|
|
192
446
|
|
|
193
447
|
/** @internal */
|
|
194
|
-
export const
|
|
195
|
-
|
|
448
|
+
export const OtherIncome$inboundSchema: z.ZodType<
|
|
449
|
+
OtherIncome,
|
|
196
450
|
z.ZodTypeDef,
|
|
197
451
|
unknown
|
|
198
452
|
> = z.object({
|
|
453
|
+
id: z.string().optional(),
|
|
454
|
+
code: z.string().optional(),
|
|
455
|
+
title: z.string().optional(),
|
|
456
|
+
type: z.nullable(ProfitAndLossType$inboundSchema).optional(),
|
|
199
457
|
total: z.nullable(z.number()),
|
|
200
458
|
records: z.any().optional(),
|
|
201
459
|
});
|
|
202
460
|
|
|
203
461
|
/** @internal */
|
|
204
|
-
export type
|
|
462
|
+
export type OtherIncome$Outbound = {
|
|
463
|
+
id?: string | undefined;
|
|
464
|
+
code?: string | undefined;
|
|
465
|
+
title?: string | undefined;
|
|
466
|
+
type?: string | null | undefined;
|
|
205
467
|
total: number | null;
|
|
206
468
|
records?: any | undefined;
|
|
207
469
|
};
|
|
208
470
|
|
|
209
471
|
/** @internal */
|
|
210
|
-
export const
|
|
211
|
-
|
|
472
|
+
export const OtherIncome$outboundSchema: z.ZodType<
|
|
473
|
+
OtherIncome$Outbound,
|
|
212
474
|
z.ZodTypeDef,
|
|
213
|
-
|
|
475
|
+
OtherIncome
|
|
214
476
|
> = z.object({
|
|
477
|
+
id: z.string().optional(),
|
|
478
|
+
code: z.string().optional(),
|
|
479
|
+
title: z.string().optional(),
|
|
480
|
+
type: z.nullable(ProfitAndLossType$outboundSchema).optional(),
|
|
215
481
|
total: z.nullable(z.number()),
|
|
216
482
|
records: z.any().optional(),
|
|
217
483
|
});
|
|
@@ -220,51 +486,63 @@ export const NetIncome$outboundSchema: z.ZodType<
|
|
|
220
486
|
* @internal
|
|
221
487
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
222
488
|
*/
|
|
223
|
-
export namespace
|
|
224
|
-
/** @deprecated use `
|
|
225
|
-
export const inboundSchema =
|
|
226
|
-
/** @deprecated use `
|
|
227
|
-
export const outboundSchema =
|
|
228
|
-
/** @deprecated use `
|
|
229
|
-
export type Outbound =
|
|
489
|
+
export namespace OtherIncome$ {
|
|
490
|
+
/** @deprecated use `OtherIncome$inboundSchema` instead. */
|
|
491
|
+
export const inboundSchema = OtherIncome$inboundSchema;
|
|
492
|
+
/** @deprecated use `OtherIncome$outboundSchema` instead. */
|
|
493
|
+
export const outboundSchema = OtherIncome$outboundSchema;
|
|
494
|
+
/** @deprecated use `OtherIncome$Outbound` instead. */
|
|
495
|
+
export type Outbound = OtherIncome$Outbound;
|
|
230
496
|
}
|
|
231
497
|
|
|
232
|
-
export function
|
|
233
|
-
return JSON.stringify(
|
|
498
|
+
export function otherIncomeToJSON(otherIncome: OtherIncome): string {
|
|
499
|
+
return JSON.stringify(OtherIncome$outboundSchema.parse(otherIncome));
|
|
234
500
|
}
|
|
235
501
|
|
|
236
|
-
export function
|
|
502
|
+
export function otherIncomeFromJSON(
|
|
237
503
|
jsonString: string,
|
|
238
|
-
): SafeParseResult<
|
|
504
|
+
): SafeParseResult<OtherIncome, SDKValidationError> {
|
|
239
505
|
return safeParse(
|
|
240
506
|
jsonString,
|
|
241
|
-
(x) =>
|
|
242
|
-
`Failed to parse '
|
|
507
|
+
(x) => OtherIncome$inboundSchema.parse(JSON.parse(x)),
|
|
508
|
+
`Failed to parse 'OtherIncome' from JSON`,
|
|
243
509
|
);
|
|
244
510
|
}
|
|
245
511
|
|
|
246
512
|
/** @internal */
|
|
247
|
-
export const
|
|
248
|
-
|
|
513
|
+
export const OtherExpenses$inboundSchema: z.ZodType<
|
|
514
|
+
OtherExpenses,
|
|
249
515
|
z.ZodTypeDef,
|
|
250
516
|
unknown
|
|
251
517
|
> = z.object({
|
|
518
|
+
id: z.string().optional(),
|
|
519
|
+
code: z.string().optional(),
|
|
520
|
+
title: z.string().optional(),
|
|
521
|
+
type: z.nullable(ProfitAndLossType$inboundSchema).optional(),
|
|
252
522
|
total: z.nullable(z.number()),
|
|
253
523
|
records: z.any().optional(),
|
|
254
524
|
});
|
|
255
525
|
|
|
256
526
|
/** @internal */
|
|
257
|
-
export type
|
|
527
|
+
export type OtherExpenses$Outbound = {
|
|
528
|
+
id?: string | undefined;
|
|
529
|
+
code?: string | undefined;
|
|
530
|
+
title?: string | undefined;
|
|
531
|
+
type?: string | null | undefined;
|
|
258
532
|
total: number | null;
|
|
259
533
|
records?: any | undefined;
|
|
260
534
|
};
|
|
261
535
|
|
|
262
536
|
/** @internal */
|
|
263
|
-
export const
|
|
264
|
-
|
|
537
|
+
export const OtherExpenses$outboundSchema: z.ZodType<
|
|
538
|
+
OtherExpenses$Outbound,
|
|
265
539
|
z.ZodTypeDef,
|
|
266
|
-
|
|
540
|
+
OtherExpenses
|
|
267
541
|
> = z.object({
|
|
542
|
+
id: z.string().optional(),
|
|
543
|
+
code: z.string().optional(),
|
|
544
|
+
title: z.string().optional(),
|
|
545
|
+
type: z.nullable(ProfitAndLossType$outboundSchema).optional(),
|
|
268
546
|
total: z.nullable(z.number()),
|
|
269
547
|
records: z.any().optional(),
|
|
270
548
|
});
|
|
@@ -273,55 +551,63 @@ export const NetOperatingIncome$outboundSchema: z.ZodType<
|
|
|
273
551
|
* @internal
|
|
274
552
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
275
553
|
*/
|
|
276
|
-
export namespace
|
|
277
|
-
/** @deprecated use `
|
|
278
|
-
export const inboundSchema =
|
|
279
|
-
/** @deprecated use `
|
|
280
|
-
export const outboundSchema =
|
|
281
|
-
/** @deprecated use `
|
|
282
|
-
export type Outbound =
|
|
554
|
+
export namespace OtherExpenses$ {
|
|
555
|
+
/** @deprecated use `OtherExpenses$inboundSchema` instead. */
|
|
556
|
+
export const inboundSchema = OtherExpenses$inboundSchema;
|
|
557
|
+
/** @deprecated use `OtherExpenses$outboundSchema` instead. */
|
|
558
|
+
export const outboundSchema = OtherExpenses$outboundSchema;
|
|
559
|
+
/** @deprecated use `OtherExpenses$Outbound` instead. */
|
|
560
|
+
export type Outbound = OtherExpenses$Outbound;
|
|
283
561
|
}
|
|
284
562
|
|
|
285
|
-
export function
|
|
286
|
-
|
|
287
|
-
): string {
|
|
288
|
-
return JSON.stringify(
|
|
289
|
-
NetOperatingIncome$outboundSchema.parse(netOperatingIncome),
|
|
290
|
-
);
|
|
563
|
+
export function otherExpensesToJSON(otherExpenses: OtherExpenses): string {
|
|
564
|
+
return JSON.stringify(OtherExpenses$outboundSchema.parse(otherExpenses));
|
|
291
565
|
}
|
|
292
566
|
|
|
293
|
-
export function
|
|
567
|
+
export function otherExpensesFromJSON(
|
|
294
568
|
jsonString: string,
|
|
295
|
-
): SafeParseResult<
|
|
569
|
+
): SafeParseResult<OtherExpenses, SDKValidationError> {
|
|
296
570
|
return safeParse(
|
|
297
571
|
jsonString,
|
|
298
|
-
(x) =>
|
|
299
|
-
`Failed to parse '
|
|
572
|
+
(x) => OtherExpenses$inboundSchema.parse(JSON.parse(x)),
|
|
573
|
+
`Failed to parse 'OtherExpenses' from JSON`,
|
|
300
574
|
);
|
|
301
575
|
}
|
|
302
576
|
|
|
303
577
|
/** @internal */
|
|
304
|
-
export const
|
|
305
|
-
|
|
578
|
+
export const UncategorizedAccounts$inboundSchema: z.ZodType<
|
|
579
|
+
UncategorizedAccounts,
|
|
306
580
|
z.ZodTypeDef,
|
|
307
581
|
unknown
|
|
308
582
|
> = z.object({
|
|
583
|
+
id: z.string().optional(),
|
|
584
|
+
code: z.string().optional(),
|
|
585
|
+
title: z.string().optional(),
|
|
586
|
+
type: z.nullable(ProfitAndLossType$inboundSchema).optional(),
|
|
309
587
|
total: z.nullable(z.number()),
|
|
310
588
|
records: z.any().optional(),
|
|
311
589
|
});
|
|
312
590
|
|
|
313
591
|
/** @internal */
|
|
314
|
-
export type
|
|
592
|
+
export type UncategorizedAccounts$Outbound = {
|
|
593
|
+
id?: string | undefined;
|
|
594
|
+
code?: string | undefined;
|
|
595
|
+
title?: string | undefined;
|
|
596
|
+
type?: string | null | undefined;
|
|
315
597
|
total: number | null;
|
|
316
598
|
records?: any | undefined;
|
|
317
599
|
};
|
|
318
600
|
|
|
319
601
|
/** @internal */
|
|
320
|
-
export const
|
|
321
|
-
|
|
602
|
+
export const UncategorizedAccounts$outboundSchema: z.ZodType<
|
|
603
|
+
UncategorizedAccounts$Outbound,
|
|
322
604
|
z.ZodTypeDef,
|
|
323
|
-
|
|
605
|
+
UncategorizedAccounts
|
|
324
606
|
> = z.object({
|
|
607
|
+
id: z.string().optional(),
|
|
608
|
+
code: z.string().optional(),
|
|
609
|
+
title: z.string().optional(),
|
|
610
|
+
type: z.nullable(ProfitAndLossType$outboundSchema).optional(),
|
|
325
611
|
total: z.nullable(z.number()),
|
|
326
612
|
records: z.any().optional(),
|
|
327
613
|
});
|
|
@@ -330,26 +616,30 @@ export const GrossProfit$outboundSchema: z.ZodType<
|
|
|
330
616
|
* @internal
|
|
331
617
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
332
618
|
*/
|
|
333
|
-
export namespace
|
|
334
|
-
/** @deprecated use `
|
|
335
|
-
export const inboundSchema =
|
|
336
|
-
/** @deprecated use `
|
|
337
|
-
export const outboundSchema =
|
|
338
|
-
/** @deprecated use `
|
|
339
|
-
export type Outbound =
|
|
619
|
+
export namespace UncategorizedAccounts$ {
|
|
620
|
+
/** @deprecated use `UncategorizedAccounts$inboundSchema` instead. */
|
|
621
|
+
export const inboundSchema = UncategorizedAccounts$inboundSchema;
|
|
622
|
+
/** @deprecated use `UncategorizedAccounts$outboundSchema` instead. */
|
|
623
|
+
export const outboundSchema = UncategorizedAccounts$outboundSchema;
|
|
624
|
+
/** @deprecated use `UncategorizedAccounts$Outbound` instead. */
|
|
625
|
+
export type Outbound = UncategorizedAccounts$Outbound;
|
|
340
626
|
}
|
|
341
627
|
|
|
342
|
-
export function
|
|
343
|
-
|
|
628
|
+
export function uncategorizedAccountsToJSON(
|
|
629
|
+
uncategorizedAccounts: UncategorizedAccounts,
|
|
630
|
+
): string {
|
|
631
|
+
return JSON.stringify(
|
|
632
|
+
UncategorizedAccounts$outboundSchema.parse(uncategorizedAccounts),
|
|
633
|
+
);
|
|
344
634
|
}
|
|
345
635
|
|
|
346
|
-
export function
|
|
636
|
+
export function uncategorizedAccountsFromJSON(
|
|
347
637
|
jsonString: string,
|
|
348
|
-
): SafeParseResult<
|
|
638
|
+
): SafeParseResult<UncategorizedAccounts, SDKValidationError> {
|
|
349
639
|
return safeParse(
|
|
350
640
|
jsonString,
|
|
351
|
-
(x) =>
|
|
352
|
-
`Failed to parse '
|
|
641
|
+
(x) => UncategorizedAccounts$inboundSchema.parse(JSON.parse(x)),
|
|
642
|
+
`Failed to parse 'UncategorizedAccounts' from JSON`,
|
|
353
643
|
);
|
|
354
644
|
}
|
|
355
645
|
|
|
@@ -363,25 +653,31 @@ export const ProfitAndLoss$inboundSchema: z.ZodType<
|
|
|
363
653
|
report_name: z.string(),
|
|
364
654
|
start_date: z.string().optional(),
|
|
365
655
|
end_date: z.string().optional(),
|
|
366
|
-
currency: z.
|
|
367
|
-
customer_id: z.string().optional(),
|
|
656
|
+
currency: z.nullable(Currency$inboundSchema),
|
|
368
657
|
income: z.lazy(() => Income$inboundSchema),
|
|
658
|
+
cost_of_goods_sold: z.lazy(() => CostOfGoodsSold$inboundSchema).optional(),
|
|
369
659
|
expenses: z.lazy(() => Expenses$inboundSchema),
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
gross_profit:
|
|
660
|
+
other_income: z.lazy(() => OtherIncome$inboundSchema).optional(),
|
|
661
|
+
other_expenses: z.lazy(() => OtherExpenses$inboundSchema).optional(),
|
|
662
|
+
uncategorized_accounts: z.lazy(() => UncategorizedAccounts$inboundSchema)
|
|
663
|
+
.optional(),
|
|
664
|
+
gross_profit: ProfitAndLossIndicator$inboundSchema.optional(),
|
|
665
|
+
net_operating_income: ProfitAndLossIndicator$inboundSchema.optional(),
|
|
666
|
+
net_income: ProfitAndLossIndicator$inboundSchema.optional(),
|
|
375
667
|
custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
|
|
668
|
+
customer: z.string().optional(),
|
|
376
669
|
}).transform((v) => {
|
|
377
670
|
return remap$(v, {
|
|
378
671
|
"report_name": "reportName",
|
|
379
672
|
"start_date": "startDate",
|
|
380
673
|
"end_date": "endDate",
|
|
381
|
-
"
|
|
382
|
-
"
|
|
383
|
-
"
|
|
674
|
+
"cost_of_goods_sold": "costOfGoodsSold",
|
|
675
|
+
"other_income": "otherIncome",
|
|
676
|
+
"other_expenses": "otherExpenses",
|
|
677
|
+
"uncategorized_accounts": "uncategorizedAccounts",
|
|
384
678
|
"gross_profit": "grossProfit",
|
|
679
|
+
"net_operating_income": "netOperatingIncome",
|
|
680
|
+
"net_income": "netIncome",
|
|
385
681
|
"custom_mappings": "customMappings",
|
|
386
682
|
});
|
|
387
683
|
});
|
|
@@ -392,14 +688,18 @@ export type ProfitAndLoss$Outbound = {
|
|
|
392
688
|
report_name: string;
|
|
393
689
|
start_date?: string | undefined;
|
|
394
690
|
end_date?: string | undefined;
|
|
395
|
-
currency: string;
|
|
396
|
-
customer_id?: string | undefined;
|
|
691
|
+
currency: string | null;
|
|
397
692
|
income: Income$Outbound;
|
|
693
|
+
cost_of_goods_sold?: CostOfGoodsSold$Outbound | undefined;
|
|
398
694
|
expenses: Expenses$Outbound;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
695
|
+
other_income?: OtherIncome$Outbound | undefined;
|
|
696
|
+
other_expenses?: OtherExpenses$Outbound | undefined;
|
|
697
|
+
uncategorized_accounts?: UncategorizedAccounts$Outbound | undefined;
|
|
698
|
+
gross_profit?: ProfitAndLossIndicator$Outbound | undefined;
|
|
699
|
+
net_operating_income?: ProfitAndLossIndicator$Outbound | undefined;
|
|
700
|
+
net_income?: ProfitAndLossIndicator$Outbound | undefined;
|
|
402
701
|
custom_mappings?: CustomMappings$Outbound | null | undefined;
|
|
702
|
+
customer?: string | undefined;
|
|
403
703
|
};
|
|
404
704
|
|
|
405
705
|
/** @internal */
|
|
@@ -412,25 +712,31 @@ export const ProfitAndLoss$outboundSchema: z.ZodType<
|
|
|
412
712
|
reportName: z.string(),
|
|
413
713
|
startDate: z.string().optional(),
|
|
414
714
|
endDate: z.string().optional(),
|
|
415
|
-
currency: z.
|
|
416
|
-
customerId: z.string().optional(),
|
|
715
|
+
currency: z.nullable(Currency$outboundSchema),
|
|
417
716
|
income: z.lazy(() => Income$outboundSchema),
|
|
717
|
+
costOfGoodsSold: z.lazy(() => CostOfGoodsSold$outboundSchema).optional(),
|
|
418
718
|
expenses: z.lazy(() => Expenses$outboundSchema),
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
grossProfit:
|
|
719
|
+
otherIncome: z.lazy(() => OtherIncome$outboundSchema).optional(),
|
|
720
|
+
otherExpenses: z.lazy(() => OtherExpenses$outboundSchema).optional(),
|
|
721
|
+
uncategorizedAccounts: z.lazy(() => UncategorizedAccounts$outboundSchema)
|
|
722
|
+
.optional(),
|
|
723
|
+
grossProfit: ProfitAndLossIndicator$outboundSchema.optional(),
|
|
724
|
+
netOperatingIncome: ProfitAndLossIndicator$outboundSchema.optional(),
|
|
725
|
+
netIncome: ProfitAndLossIndicator$outboundSchema.optional(),
|
|
424
726
|
customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
|
|
727
|
+
customer: z.string().optional(),
|
|
425
728
|
}).transform((v) => {
|
|
426
729
|
return remap$(v, {
|
|
427
730
|
reportName: "report_name",
|
|
428
731
|
startDate: "start_date",
|
|
429
732
|
endDate: "end_date",
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
733
|
+
costOfGoodsSold: "cost_of_goods_sold",
|
|
734
|
+
otherIncome: "other_income",
|
|
735
|
+
otherExpenses: "other_expenses",
|
|
736
|
+
uncategorizedAccounts: "uncategorized_accounts",
|
|
433
737
|
grossProfit: "gross_profit",
|
|
738
|
+
netOperatingIncome: "net_operating_income",
|
|
739
|
+
netIncome: "net_income",
|
|
434
740
|
customMappings: "custom_mappings",
|
|
435
741
|
});
|
|
436
742
|
});
|