@unified-api/typescript-sdk 2.54.0 → 2.56.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 (66) hide show
  1. package/funcs/accountingListAccountingReports.js +2 -0
  2. package/funcs/accountingListAccountingReports.js.map +1 -1
  3. package/funcs/reportListAccountingReports.js +2 -0
  4. package/funcs/reportListAccountingReports.js.map +1 -1
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +2 -2
  7. package/lib/config.js +2 -2
  8. package/package.json +1 -1
  9. package/sdk/models/operations/listaccountingreports.d.ts +4 -0
  10. package/sdk/models/operations/listaccountingreports.d.ts.map +1 -1
  11. package/sdk/models/operations/listaccountingreports.js +8 -0
  12. package/sdk/models/operations/listaccountingreports.js.map +1 -1
  13. package/sdk/models/shared/accountingbalancesheetitem.d.ts +36 -0
  14. package/sdk/models/shared/accountingbalancesheetitem.d.ts.map +1 -0
  15. package/sdk/models/shared/accountingbalancesheetitem.js +79 -0
  16. package/sdk/models/shared/accountingbalancesheetitem.js.map +1 -0
  17. package/sdk/models/shared/accountingprofitandlosscategory.d.ts +34 -0
  18. package/sdk/models/shared/accountingprofitandlosscategory.d.ts.map +1 -0
  19. package/sdk/models/shared/accountingprofitandlosscategory.js +75 -0
  20. package/sdk/models/shared/accountingprofitandlosscategory.js.map +1 -0
  21. package/sdk/models/shared/accountingprofitandlosssubcategory.d.ts +33 -0
  22. package/sdk/models/shared/accountingprofitandlosssubcategory.d.ts.map +1 -0
  23. package/sdk/models/shared/accountingprofitandlosssubcategory.js +72 -0
  24. package/sdk/models/shared/accountingprofitandlosssubcategory.js.map +1 -0
  25. package/sdk/models/shared/accountingreport.d.ts +17 -10
  26. package/sdk/models/shared/accountingreport.d.ts.map +1 -1
  27. package/sdk/models/shared/accountingreport.js +31 -14
  28. package/sdk/models/shared/accountingreport.js.map +1 -1
  29. package/sdk/models/shared/accountingtrialbalancesubitem.d.ts +33 -0
  30. package/sdk/models/shared/accountingtrialbalancesubitem.d.ts.map +1 -0
  31. package/sdk/models/shared/accountingtrialbalancesubitem.js +74 -0
  32. package/sdk/models/shared/accountingtrialbalancesubitem.js.map +1 -0
  33. package/sdk/models/shared/index.d.ts +8 -0
  34. package/sdk/models/shared/index.d.ts.map +1 -1
  35. package/sdk/models/shared/index.js +8 -0
  36. package/sdk/models/shared/index.js.map +1 -1
  37. package/sdk/models/shared/propertyaccountingbalancesheetitemsubitems.d.ts +25 -0
  38. package/sdk/models/shared/propertyaccountingbalancesheetitemsubitems.d.ts.map +1 -0
  39. package/sdk/models/shared/propertyaccountingbalancesheetitemsubitems.js +55 -0
  40. package/sdk/models/shared/propertyaccountingbalancesheetitemsubitems.js.map +1 -0
  41. package/sdk/models/shared/propertyaccountingreportbalancesheet.d.ts +36 -0
  42. package/sdk/models/shared/propertyaccountingreportbalancesheet.d.ts.map +1 -0
  43. package/sdk/models/shared/propertyaccountingreportbalancesheet.js +75 -0
  44. package/sdk/models/shared/propertyaccountingreportbalancesheet.js.map +1 -0
  45. package/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts +38 -0
  46. package/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts.map +1 -0
  47. package/sdk/models/shared/propertyaccountingreportprofitandloss.js +83 -0
  48. package/sdk/models/shared/propertyaccountingreportprofitandloss.js.map +1 -0
  49. package/sdk/models/shared/propertyaccountingreporttrialbalance.d.ts +34 -0
  50. package/sdk/models/shared/propertyaccountingreporttrialbalance.d.ts.map +1 -0
  51. package/sdk/models/shared/propertyaccountingreporttrialbalance.js +77 -0
  52. package/sdk/models/shared/propertyaccountingreporttrialbalance.js.map +1 -0
  53. package/src/funcs/accountingListAccountingReports.ts +2 -0
  54. package/src/funcs/reportListAccountingReports.ts +2 -0
  55. package/src/lib/config.ts +2 -2
  56. package/src/sdk/models/operations/listaccountingreports.ts +12 -0
  57. package/src/sdk/models/shared/accountingbalancesheetitem.ts +99 -0
  58. package/src/sdk/models/shared/accountingprofitandlosscategory.ts +93 -0
  59. package/src/sdk/models/shared/accountingprofitandlosssubcategory.ts +87 -0
  60. package/src/sdk/models/shared/accountingreport.ts +60 -24
  61. package/src/sdk/models/shared/accountingtrialbalancesubitem.ts +87 -0
  62. package/src/sdk/models/shared/index.ts +8 -0
  63. package/src/sdk/models/shared/propertyaccountingbalancesheetitemsubitems.ts +68 -0
  64. package/src/sdk/models/shared/propertyaccountingreportbalancesheet.ts +98 -0
  65. package/src/sdk/models/shared/propertyaccountingreportprofitandloss.ts +110 -0
  66. package/src/sdk/models/shared/propertyaccountingreporttrialbalance.ts +98 -0
@@ -0,0 +1,87 @@
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
+
11
+ export type AccountingProfitAndLossSubcategory = {
12
+ amount?: number | undefined;
13
+ name?: string | undefined;
14
+ transactionIds?: Array<string> | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export const AccountingProfitAndLossSubcategory$inboundSchema: z.ZodType<
19
+ AccountingProfitAndLossSubcategory,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ amount: z.number().optional(),
24
+ name: z.string().optional(),
25
+ transaction_ids: z.array(z.string()).optional(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "transaction_ids": "transactionIds",
29
+ });
30
+ });
31
+
32
+ /** @internal */
33
+ export type AccountingProfitAndLossSubcategory$Outbound = {
34
+ amount?: number | undefined;
35
+ name?: string | undefined;
36
+ transaction_ids?: Array<string> | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const AccountingProfitAndLossSubcategory$outboundSchema: z.ZodType<
41
+ AccountingProfitAndLossSubcategory$Outbound,
42
+ z.ZodTypeDef,
43
+ AccountingProfitAndLossSubcategory
44
+ > = z.object({
45
+ amount: z.number().optional(),
46
+ name: z.string().optional(),
47
+ transactionIds: z.array(z.string()).optional(),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ transactionIds: "transaction_ids",
51
+ });
52
+ });
53
+
54
+ /**
55
+ * @internal
56
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
+ */
58
+ export namespace AccountingProfitAndLossSubcategory$ {
59
+ /** @deprecated use `AccountingProfitAndLossSubcategory$inboundSchema` instead. */
60
+ export const inboundSchema = AccountingProfitAndLossSubcategory$inboundSchema;
61
+ /** @deprecated use `AccountingProfitAndLossSubcategory$outboundSchema` instead. */
62
+ export const outboundSchema =
63
+ AccountingProfitAndLossSubcategory$outboundSchema;
64
+ /** @deprecated use `AccountingProfitAndLossSubcategory$Outbound` instead. */
65
+ export type Outbound = AccountingProfitAndLossSubcategory$Outbound;
66
+ }
67
+
68
+ export function accountingProfitAndLossSubcategoryToJSON(
69
+ accountingProfitAndLossSubcategory: AccountingProfitAndLossSubcategory,
70
+ ): string {
71
+ return JSON.stringify(
72
+ AccountingProfitAndLossSubcategory$outboundSchema.parse(
73
+ accountingProfitAndLossSubcategory,
74
+ ),
75
+ );
76
+ }
77
+
78
+ export function accountingProfitAndLossSubcategoryFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<AccountingProfitAndLossSubcategory, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) =>
84
+ AccountingProfitAndLossSubcategory$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'AccountingProfitAndLossSubcategory' from JSON`,
86
+ );
87
+ }
@@ -8,6 +8,24 @@ import { safeParse } from "../../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ PropertyAccountingReportBalanceSheet,
13
+ PropertyAccountingReportBalanceSheet$inboundSchema,
14
+ PropertyAccountingReportBalanceSheet$Outbound,
15
+ PropertyAccountingReportBalanceSheet$outboundSchema,
16
+ } from "./propertyaccountingreportbalancesheet.js";
17
+ import {
18
+ PropertyAccountingReportProfitAndLoss,
19
+ PropertyAccountingReportProfitAndLoss$inboundSchema,
20
+ PropertyAccountingReportProfitAndLoss$Outbound,
21
+ PropertyAccountingReportProfitAndLoss$outboundSchema,
22
+ } from "./propertyaccountingreportprofitandloss.js";
23
+ import {
24
+ PropertyAccountingReportTrialBalance,
25
+ PropertyAccountingReportTrialBalance$inboundSchema,
26
+ PropertyAccountingReportTrialBalance$Outbound,
27
+ PropertyAccountingReportTrialBalance$outboundSchema,
28
+ } from "./propertyaccountingreporttrialbalance.js";
11
29
 
12
30
  export const AccountingReportType = {
13
31
  TrialBalance: "TRIAL_BALANCE",
@@ -17,14 +35,16 @@ export const AccountingReportType = {
17
35
  export type AccountingReportType = ClosedEnum<typeof AccountingReportType>;
18
36
 
19
37
  export type AccountingReport = {
20
- accountId?: string | undefined;
21
- amount?: number | undefined;
22
- contactId?: string | undefined;
38
+ balanceSheet?: PropertyAccountingReportBalanceSheet | undefined;
23
39
  createdAt?: Date | undefined;
24
- group?: string | undefined;
40
+ currency?: string | undefined;
41
+ endAt?: Date | undefined;
25
42
  id?: string | undefined;
43
+ name?: string | undefined;
44
+ profitAndLoss?: PropertyAccountingReportProfitAndLoss | undefined;
26
45
  raw?: { [k: string]: any } | undefined;
27
- subgroup?: string | undefined;
46
+ startAt?: Date | undefined;
47
+ trialBalance?: PropertyAccountingReportTrialBalance | undefined;
28
48
  type?: AccountingReportType | undefined;
29
49
  updatedAt?: Date | undefined;
30
50
  };
@@ -56,37 +76,47 @@ export const AccountingReport$inboundSchema: z.ZodType<
56
76
  z.ZodTypeDef,
57
77
  unknown
58
78
  > = z.object({
59
- account_id: z.string().optional(),
60
- amount: z.number().optional(),
61
- contact_id: z.string().optional(),
79
+ balance_sheet: PropertyAccountingReportBalanceSheet$inboundSchema.optional(),
62
80
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
63
81
  .optional(),
64
- group: z.string().optional(),
82
+ currency: z.string().optional(),
83
+ end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
84
+ .optional(),
65
85
  id: z.string().optional(),
86
+ name: z.string().optional(),
87
+ profit_and_loss: PropertyAccountingReportProfitAndLoss$inboundSchema
88
+ .optional(),
66
89
  raw: z.record(z.any()).optional(),
67
- subgroup: z.string().optional(),
90
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
91
+ .optional(),
92
+ trial_balance: PropertyAccountingReportTrialBalance$inboundSchema.optional(),
68
93
  type: AccountingReportType$inboundSchema.optional(),
69
94
  updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
70
95
  .optional(),
71
96
  }).transform((v) => {
72
97
  return remap$(v, {
73
- "account_id": "accountId",
74
- "contact_id": "contactId",
98
+ "balance_sheet": "balanceSheet",
75
99
  "created_at": "createdAt",
100
+ "end_at": "endAt",
101
+ "profit_and_loss": "profitAndLoss",
102
+ "start_at": "startAt",
103
+ "trial_balance": "trialBalance",
76
104
  "updated_at": "updatedAt",
77
105
  });
78
106
  });
79
107
 
80
108
  /** @internal */
81
109
  export type AccountingReport$Outbound = {
82
- account_id?: string | undefined;
83
- amount?: number | undefined;
84
- contact_id?: string | undefined;
110
+ balance_sheet?: PropertyAccountingReportBalanceSheet$Outbound | undefined;
85
111
  created_at?: string | undefined;
86
- group?: string | undefined;
112
+ currency?: string | undefined;
113
+ end_at?: string | undefined;
87
114
  id?: string | undefined;
115
+ name?: string | undefined;
116
+ profit_and_loss?: PropertyAccountingReportProfitAndLoss$Outbound | undefined;
88
117
  raw?: { [k: string]: any } | undefined;
89
- subgroup?: string | undefined;
118
+ start_at?: string | undefined;
119
+ trial_balance?: PropertyAccountingReportTrialBalance$Outbound | undefined;
90
120
  type?: string | undefined;
91
121
  updated_at?: string | undefined;
92
122
  };
@@ -97,21 +127,27 @@ export const AccountingReport$outboundSchema: z.ZodType<
97
127
  z.ZodTypeDef,
98
128
  AccountingReport
99
129
  > = z.object({
100
- accountId: z.string().optional(),
101
- amount: z.number().optional(),
102
- contactId: z.string().optional(),
130
+ balanceSheet: PropertyAccountingReportBalanceSheet$outboundSchema.optional(),
103
131
  createdAt: z.date().transform(v => v.toISOString()).optional(),
104
- group: z.string().optional(),
132
+ currency: z.string().optional(),
133
+ endAt: z.date().transform(v => v.toISOString()).optional(),
105
134
  id: z.string().optional(),
135
+ name: z.string().optional(),
136
+ profitAndLoss: PropertyAccountingReportProfitAndLoss$outboundSchema
137
+ .optional(),
106
138
  raw: z.record(z.any()).optional(),
107
- subgroup: z.string().optional(),
139
+ startAt: z.date().transform(v => v.toISOString()).optional(),
140
+ trialBalance: PropertyAccountingReportTrialBalance$outboundSchema.optional(),
108
141
  type: AccountingReportType$outboundSchema.optional(),
109
142
  updatedAt: z.date().transform(v => v.toISOString()).optional(),
110
143
  }).transform((v) => {
111
144
  return remap$(v, {
112
- accountId: "account_id",
113
- contactId: "contact_id",
145
+ balanceSheet: "balance_sheet",
114
146
  createdAt: "created_at",
147
+ endAt: "end_at",
148
+ profitAndLoss: "profit_and_loss",
149
+ startAt: "start_at",
150
+ trialBalance: "trial_balance",
115
151
  updatedAt: "updated_at",
116
152
  });
117
153
  });
@@ -0,0 +1,87 @@
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
+
11
+ export type AccountingTrialBalanceSubItem = {
12
+ accountId?: string | undefined;
13
+ accountName?: string | undefined;
14
+ amount?: number | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export const AccountingTrialBalanceSubItem$inboundSchema: z.ZodType<
19
+ AccountingTrialBalanceSubItem,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ account_id: z.string().optional(),
24
+ account_name: z.string().optional(),
25
+ amount: z.number().optional(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "account_id": "accountId",
29
+ "account_name": "accountName",
30
+ });
31
+ });
32
+
33
+ /** @internal */
34
+ export type AccountingTrialBalanceSubItem$Outbound = {
35
+ account_id?: string | undefined;
36
+ account_name?: string | undefined;
37
+ amount?: number | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const AccountingTrialBalanceSubItem$outboundSchema: z.ZodType<
42
+ AccountingTrialBalanceSubItem$Outbound,
43
+ z.ZodTypeDef,
44
+ AccountingTrialBalanceSubItem
45
+ > = z.object({
46
+ accountId: z.string().optional(),
47
+ accountName: z.string().optional(),
48
+ amount: z.number().optional(),
49
+ }).transform((v) => {
50
+ return remap$(v, {
51
+ accountId: "account_id",
52
+ accountName: "account_name",
53
+ });
54
+ });
55
+
56
+ /**
57
+ * @internal
58
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
59
+ */
60
+ export namespace AccountingTrialBalanceSubItem$ {
61
+ /** @deprecated use `AccountingTrialBalanceSubItem$inboundSchema` instead. */
62
+ export const inboundSchema = AccountingTrialBalanceSubItem$inboundSchema;
63
+ /** @deprecated use `AccountingTrialBalanceSubItem$outboundSchema` instead. */
64
+ export const outboundSchema = AccountingTrialBalanceSubItem$outboundSchema;
65
+ /** @deprecated use `AccountingTrialBalanceSubItem$Outbound` instead. */
66
+ export type Outbound = AccountingTrialBalanceSubItem$Outbound;
67
+ }
68
+
69
+ export function accountingTrialBalanceSubItemToJSON(
70
+ accountingTrialBalanceSubItem: AccountingTrialBalanceSubItem,
71
+ ): string {
72
+ return JSON.stringify(
73
+ AccountingTrialBalanceSubItem$outboundSchema.parse(
74
+ accountingTrialBalanceSubItem,
75
+ ),
76
+ );
77
+ }
78
+
79
+ export function accountingTrialBalanceSubItemFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<AccountingTrialBalanceSubItem, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => AccountingTrialBalanceSubItem$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'AccountingTrialBalanceSubItem' from JSON`,
86
+ );
87
+ }
@@ -5,6 +5,7 @@
5
5
  export * from "./accountingaccount.js";
6
6
  export * from "./accountingassociatedcontact.js";
7
7
  export * from "./accountingattachment.js";
8
+ export * from "./accountingbalancesheetitem.js";
8
9
  export * from "./accountingcontact.js";
9
10
  export * from "./accountingcontactpaymentmethod.js";
10
11
  export * from "./accountingemail.js";
@@ -14,12 +15,15 @@ export * from "./accountingjournallineitem.js";
14
15
  export * from "./accountinglineitem.js";
15
16
  export * from "./accountingorder.js";
16
17
  export * from "./accountingorganization.js";
18
+ export * from "./accountingprofitandlosscategory.js";
19
+ export * from "./accountingprofitandlosssubcategory.js";
17
20
  export * from "./accountingreport.js";
18
21
  export * from "./accountingtaxrate.js";
19
22
  export * from "./accountingtelephone.js";
20
23
  export * from "./accountingtransaction.js";
21
24
  export * from "./accountingtransactioncontact.js";
22
25
  export * from "./accountingtransactionlineitem.js";
26
+ export * from "./accountingtrialbalancesubitem.js";
23
27
  export * from "./apicall.js";
24
28
  export * from "./atsactivity.js";
25
29
  export * from "./atsaddress.js";
@@ -122,11 +126,15 @@ export * from "./paymentpayment.js";
122
126
  export * from "./paymentpayout.js";
123
127
  export * from "./paymentrefund.js";
124
128
  export * from "./paymentsubscription.js";
129
+ export * from "./propertyaccountingbalancesheetitemsubitems.js";
125
130
  export * from "./propertyaccountingcontactbillingaddress.js";
126
131
  export * from "./propertyaccountingcontactshippingaddress.js";
127
132
  export * from "./propertyaccountingorderbillingaddress.js";
128
133
  export * from "./propertyaccountingordershippingaddress.js";
129
134
  export * from "./propertyaccountingorganizationaddress.js";
135
+ export * from "./propertyaccountingreportbalancesheet.js";
136
+ export * from "./propertyaccountingreportprofitandloss.js";
137
+ export * from "./propertyaccountingreporttrialbalance.js";
130
138
  export * from "./propertyatsactivityfrom.js";
131
139
  export * from "./propertyatscandidateaddress.js";
132
140
  export * from "./propertyatscompanyaddress.js";
@@ -0,0 +1,68 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type PropertyAccountingBalanceSheetItemSubItems = {};
11
+
12
+ /** @internal */
13
+ export const PropertyAccountingBalanceSheetItemSubItems$inboundSchema:
14
+ z.ZodType<PropertyAccountingBalanceSheetItemSubItems, z.ZodTypeDef, unknown> =
15
+ z.object({});
16
+
17
+ /** @internal */
18
+ export type PropertyAccountingBalanceSheetItemSubItems$Outbound = {};
19
+
20
+ /** @internal */
21
+ export const PropertyAccountingBalanceSheetItemSubItems$outboundSchema:
22
+ z.ZodType<
23
+ PropertyAccountingBalanceSheetItemSubItems$Outbound,
24
+ z.ZodTypeDef,
25
+ PropertyAccountingBalanceSheetItemSubItems
26
+ > = z.object({});
27
+
28
+ /**
29
+ * @internal
30
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
+ */
32
+ export namespace PropertyAccountingBalanceSheetItemSubItems$ {
33
+ /** @deprecated use `PropertyAccountingBalanceSheetItemSubItems$inboundSchema` instead. */
34
+ export const inboundSchema =
35
+ PropertyAccountingBalanceSheetItemSubItems$inboundSchema;
36
+ /** @deprecated use `PropertyAccountingBalanceSheetItemSubItems$outboundSchema` instead. */
37
+ export const outboundSchema =
38
+ PropertyAccountingBalanceSheetItemSubItems$outboundSchema;
39
+ /** @deprecated use `PropertyAccountingBalanceSheetItemSubItems$Outbound` instead. */
40
+ export type Outbound = PropertyAccountingBalanceSheetItemSubItems$Outbound;
41
+ }
42
+
43
+ export function propertyAccountingBalanceSheetItemSubItemsToJSON(
44
+ propertyAccountingBalanceSheetItemSubItems:
45
+ PropertyAccountingBalanceSheetItemSubItems,
46
+ ): string {
47
+ return JSON.stringify(
48
+ PropertyAccountingBalanceSheetItemSubItems$outboundSchema.parse(
49
+ propertyAccountingBalanceSheetItemSubItems,
50
+ ),
51
+ );
52
+ }
53
+
54
+ export function propertyAccountingBalanceSheetItemSubItemsFromJSON(
55
+ jsonString: string,
56
+ ): SafeParseResult<
57
+ PropertyAccountingBalanceSheetItemSubItems,
58
+ SDKValidationError
59
+ > {
60
+ return safeParse(
61
+ jsonString,
62
+ (x) =>
63
+ PropertyAccountingBalanceSheetItemSubItems$inboundSchema.parse(
64
+ JSON.parse(x),
65
+ ),
66
+ `Failed to parse 'PropertyAccountingBalanceSheetItemSubItems' from JSON`,
67
+ );
68
+ }
@@ -0,0 +1,98 @@
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
+ AccountingBalanceSheetItem,
12
+ AccountingBalanceSheetItem$inboundSchema,
13
+ AccountingBalanceSheetItem$Outbound,
14
+ AccountingBalanceSheetItem$outboundSchema,
15
+ } from "./accountingbalancesheetitem.js";
16
+
17
+ export type PropertyAccountingReportBalanceSheet = {
18
+ assets?: Array<AccountingBalanceSheetItem> | undefined;
19
+ equity?: Array<AccountingBalanceSheetItem> | undefined;
20
+ liabilities?: Array<AccountingBalanceSheetItem> | undefined;
21
+ netAssetsAmount?: number | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const PropertyAccountingReportBalanceSheet$inboundSchema: z.ZodType<
26
+ PropertyAccountingReportBalanceSheet,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ assets: z.array(AccountingBalanceSheetItem$inboundSchema).optional(),
31
+ equity: z.array(AccountingBalanceSheetItem$inboundSchema).optional(),
32
+ liabilities: z.array(AccountingBalanceSheetItem$inboundSchema).optional(),
33
+ net_assets_amount: z.number().optional(),
34
+ }).transform((v) => {
35
+ return remap$(v, {
36
+ "net_assets_amount": "netAssetsAmount",
37
+ });
38
+ });
39
+
40
+ /** @internal */
41
+ export type PropertyAccountingReportBalanceSheet$Outbound = {
42
+ assets?: Array<AccountingBalanceSheetItem$Outbound> | undefined;
43
+ equity?: Array<AccountingBalanceSheetItem$Outbound> | undefined;
44
+ liabilities?: Array<AccountingBalanceSheetItem$Outbound> | undefined;
45
+ net_assets_amount?: number | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const PropertyAccountingReportBalanceSheet$outboundSchema: z.ZodType<
50
+ PropertyAccountingReportBalanceSheet$Outbound,
51
+ z.ZodTypeDef,
52
+ PropertyAccountingReportBalanceSheet
53
+ > = z.object({
54
+ assets: z.array(AccountingBalanceSheetItem$outboundSchema).optional(),
55
+ equity: z.array(AccountingBalanceSheetItem$outboundSchema).optional(),
56
+ liabilities: z.array(AccountingBalanceSheetItem$outboundSchema).optional(),
57
+ netAssetsAmount: z.number().optional(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ netAssetsAmount: "net_assets_amount",
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 PropertyAccountingReportBalanceSheet$ {
69
+ /** @deprecated use `PropertyAccountingReportBalanceSheet$inboundSchema` instead. */
70
+ export const inboundSchema =
71
+ PropertyAccountingReportBalanceSheet$inboundSchema;
72
+ /** @deprecated use `PropertyAccountingReportBalanceSheet$outboundSchema` instead. */
73
+ export const outboundSchema =
74
+ PropertyAccountingReportBalanceSheet$outboundSchema;
75
+ /** @deprecated use `PropertyAccountingReportBalanceSheet$Outbound` instead. */
76
+ export type Outbound = PropertyAccountingReportBalanceSheet$Outbound;
77
+ }
78
+
79
+ export function propertyAccountingReportBalanceSheetToJSON(
80
+ propertyAccountingReportBalanceSheet: PropertyAccountingReportBalanceSheet,
81
+ ): string {
82
+ return JSON.stringify(
83
+ PropertyAccountingReportBalanceSheet$outboundSchema.parse(
84
+ propertyAccountingReportBalanceSheet,
85
+ ),
86
+ );
87
+ }
88
+
89
+ export function propertyAccountingReportBalanceSheetFromJSON(
90
+ jsonString: string,
91
+ ): SafeParseResult<PropertyAccountingReportBalanceSheet, SDKValidationError> {
92
+ return safeParse(
93
+ jsonString,
94
+ (x) =>
95
+ PropertyAccountingReportBalanceSheet$inboundSchema.parse(JSON.parse(x)),
96
+ `Failed to parse 'PropertyAccountingReportBalanceSheet' from JSON`,
97
+ );
98
+ }
@@ -0,0 +1,110 @@
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
+ AccountingProfitAndLossCategory,
12
+ AccountingProfitAndLossCategory$inboundSchema,
13
+ AccountingProfitAndLossCategory$Outbound,
14
+ AccountingProfitAndLossCategory$outboundSchema,
15
+ } from "./accountingprofitandlosscategory.js";
16
+
17
+ export type PropertyAccountingReportProfitAndLoss = {
18
+ costOfGoodsSold?: Array<AccountingProfitAndLossCategory> | undefined;
19
+ expenses?: Array<AccountingProfitAndLossCategory> | undefined;
20
+ grossProfitAmount?: number | undefined;
21
+ income?: Array<AccountingProfitAndLossCategory> | undefined;
22
+ netProfitAmount?: number | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const PropertyAccountingReportProfitAndLoss$inboundSchema: z.ZodType<
27
+ PropertyAccountingReportProfitAndLoss,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ cost_of_goods_sold: z.array(AccountingProfitAndLossCategory$inboundSchema)
32
+ .optional(),
33
+ expenses: z.array(AccountingProfitAndLossCategory$inboundSchema).optional(),
34
+ gross_profit_amount: z.number().optional(),
35
+ income: z.array(AccountingProfitAndLossCategory$inboundSchema).optional(),
36
+ net_profit_amount: z.number().optional(),
37
+ }).transform((v) => {
38
+ return remap$(v, {
39
+ "cost_of_goods_sold": "costOfGoodsSold",
40
+ "gross_profit_amount": "grossProfitAmount",
41
+ "net_profit_amount": "netProfitAmount",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type PropertyAccountingReportProfitAndLoss$Outbound = {
47
+ cost_of_goods_sold?:
48
+ | Array<AccountingProfitAndLossCategory$Outbound>
49
+ | undefined;
50
+ expenses?: Array<AccountingProfitAndLossCategory$Outbound> | undefined;
51
+ gross_profit_amount?: number | undefined;
52
+ income?: Array<AccountingProfitAndLossCategory$Outbound> | undefined;
53
+ net_profit_amount?: number | undefined;
54
+ };
55
+
56
+ /** @internal */
57
+ export const PropertyAccountingReportProfitAndLoss$outboundSchema: z.ZodType<
58
+ PropertyAccountingReportProfitAndLoss$Outbound,
59
+ z.ZodTypeDef,
60
+ PropertyAccountingReportProfitAndLoss
61
+ > = z.object({
62
+ costOfGoodsSold: z.array(AccountingProfitAndLossCategory$outboundSchema)
63
+ .optional(),
64
+ expenses: z.array(AccountingProfitAndLossCategory$outboundSchema).optional(),
65
+ grossProfitAmount: z.number().optional(),
66
+ income: z.array(AccountingProfitAndLossCategory$outboundSchema).optional(),
67
+ netProfitAmount: z.number().optional(),
68
+ }).transform((v) => {
69
+ return remap$(v, {
70
+ costOfGoodsSold: "cost_of_goods_sold",
71
+ grossProfitAmount: "gross_profit_amount",
72
+ netProfitAmount: "net_profit_amount",
73
+ });
74
+ });
75
+
76
+ /**
77
+ * @internal
78
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
79
+ */
80
+ export namespace PropertyAccountingReportProfitAndLoss$ {
81
+ /** @deprecated use `PropertyAccountingReportProfitAndLoss$inboundSchema` instead. */
82
+ export const inboundSchema =
83
+ PropertyAccountingReportProfitAndLoss$inboundSchema;
84
+ /** @deprecated use `PropertyAccountingReportProfitAndLoss$outboundSchema` instead. */
85
+ export const outboundSchema =
86
+ PropertyAccountingReportProfitAndLoss$outboundSchema;
87
+ /** @deprecated use `PropertyAccountingReportProfitAndLoss$Outbound` instead. */
88
+ export type Outbound = PropertyAccountingReportProfitAndLoss$Outbound;
89
+ }
90
+
91
+ export function propertyAccountingReportProfitAndLossToJSON(
92
+ propertyAccountingReportProfitAndLoss: PropertyAccountingReportProfitAndLoss,
93
+ ): string {
94
+ return JSON.stringify(
95
+ PropertyAccountingReportProfitAndLoss$outboundSchema.parse(
96
+ propertyAccountingReportProfitAndLoss,
97
+ ),
98
+ );
99
+ }
100
+
101
+ export function propertyAccountingReportProfitAndLossFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<PropertyAccountingReportProfitAndLoss, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) =>
107
+ PropertyAccountingReportProfitAndLoss$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'PropertyAccountingReportProfitAndLoss' from JSON`,
109
+ );
110
+ }