@unified-api/typescript-sdk 2.73.4 → 2.73.5
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/bin/mcp-server.js +110 -6
- package/bin/mcp-server.js.map +12 -10
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +3 -3
- package/sdk/models/shared/accountingprofitandlossaccount.d.ts +35 -0
- package/sdk/models/shared/accountingprofitandlossaccount.d.ts.map +1 -0
- package/sdk/models/shared/accountingprofitandlossaccount.js +80 -0
- package/sdk/models/shared/accountingprofitandlossaccount.js.map +1 -0
- package/sdk/models/shared/accountingprofitandlosscategory.d.ts +3 -0
- package/sdk/models/shared/accountingprofitandlosscategory.d.ts.map +1 -1
- package/sdk/models/shared/accountingprofitandlosscategory.js.map +1 -1
- package/sdk/models/shared/accountingprofitandlosssection.d.ts +36 -0
- package/sdk/models/shared/accountingprofitandlosssection.d.ts.map +1 -0
- package/sdk/models/shared/accountingprofitandlosssection.js +79 -0
- package/sdk/models/shared/accountingprofitandlosssection.js.map +1 -0
- package/sdk/models/shared/accountingprofitandlosssubcategory.d.ts +3 -0
- package/sdk/models/shared/accountingprofitandlosssubcategory.d.ts.map +1 -1
- package/sdk/models/shared/accountingprofitandlosssubcategory.js.map +1 -1
- package/sdk/models/shared/index.d.ts +2 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +2 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts +24 -0
- package/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts.map +1 -1
- package/sdk/models/shared/propertyaccountingreportprofitandloss.js +33 -0
- package/sdk/models/shared/propertyaccountingreportprofitandloss.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/sdk/models/shared/accountingprofitandlossaccount.ts +95 -0
- package/src/sdk/models/shared/accountingprofitandlosscategory.ts +3 -0
- package/src/sdk/models/shared/accountingprofitandlosssection.ts +99 -0
- package/src/sdk/models/shared/accountingprofitandlosssubcategory.ts +3 -0
- package/src/sdk/models/shared/index.ts +2 -0
- package/src/sdk/models/shared/propertyaccountingreportprofitandloss.ts +69 -0
package/src/mcp-server/server.ts
CHANGED
|
@@ -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
|
+
|
|
11
|
+
export type AccountingProfitAndLossAccount = {
|
|
12
|
+
accountId?: string | undefined;
|
|
13
|
+
accountName?: string | undefined;
|
|
14
|
+
totalAmount?: number | undefined;
|
|
15
|
+
transactionIds?: Array<string> | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const AccountingProfitAndLossAccount$inboundSchema: z.ZodType<
|
|
20
|
+
AccountingProfitAndLossAccount,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
account_id: z.string().optional(),
|
|
25
|
+
account_name: z.string().optional(),
|
|
26
|
+
total_amount: z.number().optional(),
|
|
27
|
+
transaction_ids: z.array(z.string()).optional(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"account_id": "accountId",
|
|
31
|
+
"account_name": "accountName",
|
|
32
|
+
"total_amount": "totalAmount",
|
|
33
|
+
"transaction_ids": "transactionIds",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type AccountingProfitAndLossAccount$Outbound = {
|
|
39
|
+
account_id?: string | undefined;
|
|
40
|
+
account_name?: string | undefined;
|
|
41
|
+
total_amount?: number | undefined;
|
|
42
|
+
transaction_ids?: Array<string> | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const AccountingProfitAndLossAccount$outboundSchema: z.ZodType<
|
|
47
|
+
AccountingProfitAndLossAccount$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
AccountingProfitAndLossAccount
|
|
50
|
+
> = z.object({
|
|
51
|
+
accountId: z.string().optional(),
|
|
52
|
+
accountName: z.string().optional(),
|
|
53
|
+
totalAmount: z.number().optional(),
|
|
54
|
+
transactionIds: z.array(z.string()).optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
accountId: "account_id",
|
|
58
|
+
accountName: "account_name",
|
|
59
|
+
totalAmount: "total_amount",
|
|
60
|
+
transactionIds: "transaction_ids",
|
|
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 AccountingProfitAndLossAccount$ {
|
|
69
|
+
/** @deprecated use `AccountingProfitAndLossAccount$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = AccountingProfitAndLossAccount$inboundSchema;
|
|
71
|
+
/** @deprecated use `AccountingProfitAndLossAccount$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = AccountingProfitAndLossAccount$outboundSchema;
|
|
73
|
+
/** @deprecated use `AccountingProfitAndLossAccount$Outbound` instead. */
|
|
74
|
+
export type Outbound = AccountingProfitAndLossAccount$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function accountingProfitAndLossAccountToJSON(
|
|
78
|
+
accountingProfitAndLossAccount: AccountingProfitAndLossAccount,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
AccountingProfitAndLossAccount$outboundSchema.parse(
|
|
82
|
+
accountingProfitAndLossAccount,
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function accountingProfitAndLossAccountFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<AccountingProfitAndLossAccount, SDKValidationError> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) => AccountingProfitAndLossAccount$inboundSchema.parse(JSON.parse(x)),
|
|
93
|
+
`Failed to parse 'AccountingProfitAndLossAccount' from JSON`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
AccountingProfitAndLossSubcategory$outboundSchema,
|
|
15
15
|
} from "./accountingprofitandlosssubcategory.js";
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
*/
|
|
17
20
|
export type AccountingProfitAndLossCategory = {
|
|
18
21
|
amount?: number | undefined;
|
|
19
22
|
name?: string | undefined;
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
AccountingProfitAndLossAccount,
|
|
12
|
+
AccountingProfitAndLossAccount$inboundSchema,
|
|
13
|
+
AccountingProfitAndLossAccount$Outbound,
|
|
14
|
+
AccountingProfitAndLossAccount$outboundSchema,
|
|
15
|
+
} from "./accountingprofitandlossaccount.js";
|
|
16
|
+
|
|
17
|
+
export type AccountingProfitAndLossSection = {
|
|
18
|
+
accounts?: Array<AccountingProfitAndLossAccount> | undefined;
|
|
19
|
+
sectionName?: string | undefined;
|
|
20
|
+
sectionType?: string | undefined;
|
|
21
|
+
totalAmount?: number | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AccountingProfitAndLossSection$inboundSchema: z.ZodType<
|
|
26
|
+
AccountingProfitAndLossSection,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
accounts: z.array(AccountingProfitAndLossAccount$inboundSchema).optional(),
|
|
31
|
+
section_name: z.string().optional(),
|
|
32
|
+
section_type: z.string().optional(),
|
|
33
|
+
total_amount: z.number().optional(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"section_name": "sectionName",
|
|
37
|
+
"section_type": "sectionType",
|
|
38
|
+
"total_amount": "totalAmount",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type AccountingProfitAndLossSection$Outbound = {
|
|
44
|
+
accounts?: Array<AccountingProfitAndLossAccount$Outbound> | undefined;
|
|
45
|
+
section_name?: string | undefined;
|
|
46
|
+
section_type?: string | undefined;
|
|
47
|
+
total_amount?: number | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const AccountingProfitAndLossSection$outboundSchema: z.ZodType<
|
|
52
|
+
AccountingProfitAndLossSection$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
AccountingProfitAndLossSection
|
|
55
|
+
> = z.object({
|
|
56
|
+
accounts: z.array(AccountingProfitAndLossAccount$outboundSchema).optional(),
|
|
57
|
+
sectionName: z.string().optional(),
|
|
58
|
+
sectionType: z.string().optional(),
|
|
59
|
+
totalAmount: z.number().optional(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
sectionName: "section_name",
|
|
63
|
+
sectionType: "section_type",
|
|
64
|
+
totalAmount: "total_amount",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
71
|
+
*/
|
|
72
|
+
export namespace AccountingProfitAndLossSection$ {
|
|
73
|
+
/** @deprecated use `AccountingProfitAndLossSection$inboundSchema` instead. */
|
|
74
|
+
export const inboundSchema = AccountingProfitAndLossSection$inboundSchema;
|
|
75
|
+
/** @deprecated use `AccountingProfitAndLossSection$outboundSchema` instead. */
|
|
76
|
+
export const outboundSchema = AccountingProfitAndLossSection$outboundSchema;
|
|
77
|
+
/** @deprecated use `AccountingProfitAndLossSection$Outbound` instead. */
|
|
78
|
+
export type Outbound = AccountingProfitAndLossSection$Outbound;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function accountingProfitAndLossSectionToJSON(
|
|
82
|
+
accountingProfitAndLossSection: AccountingProfitAndLossSection,
|
|
83
|
+
): string {
|
|
84
|
+
return JSON.stringify(
|
|
85
|
+
AccountingProfitAndLossSection$outboundSchema.parse(
|
|
86
|
+
accountingProfitAndLossSection,
|
|
87
|
+
),
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function accountingProfitAndLossSectionFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<AccountingProfitAndLossSection, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => AccountingProfitAndLossSection$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'AccountingProfitAndLossSection' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -8,6 +8,9 @@ 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
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
11
14
|
export type AccountingProfitAndLossSubcategory = {
|
|
12
15
|
amount?: number | undefined;
|
|
13
16
|
name?: string | undefined;
|
|
@@ -15,7 +15,9 @@ export * from "./accountingjournallineitem.js";
|
|
|
15
15
|
export * from "./accountinglineitem.js";
|
|
16
16
|
export * from "./accountingorder.js";
|
|
17
17
|
export * from "./accountingorganization.js";
|
|
18
|
+
export * from "./accountingprofitandlossaccount.js";
|
|
18
19
|
export * from "./accountingprofitandlosscategory.js";
|
|
20
|
+
export * from "./accountingprofitandlosssection.js";
|
|
19
21
|
export * from "./accountingprofitandlosssubcategory.js";
|
|
20
22
|
export * from "./accountingreport.js";
|
|
21
23
|
export * from "./accountingtaxrate.js";
|
|
@@ -13,12 +13,34 @@ import {
|
|
|
13
13
|
AccountingProfitAndLossCategory$Outbound,
|
|
14
14
|
AccountingProfitAndLossCategory$outboundSchema,
|
|
15
15
|
} from "./accountingprofitandlosscategory.js";
|
|
16
|
+
import {
|
|
17
|
+
AccountingProfitAndLossSection,
|
|
18
|
+
AccountingProfitAndLossSection$inboundSchema,
|
|
19
|
+
AccountingProfitAndLossSection$Outbound,
|
|
20
|
+
AccountingProfitAndLossSection$outboundSchema,
|
|
21
|
+
} from "./accountingprofitandlosssection.js";
|
|
16
22
|
|
|
17
23
|
export type PropertyAccountingReportProfitAndLoss = {
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
18
27
|
costOfGoodsSold?: Array<AccountingProfitAndLossCategory> | undefined;
|
|
28
|
+
costOfGoodsSoldSections?: Array<AccountingProfitAndLossSection> | undefined;
|
|
29
|
+
costOfGoodsSoldTotalAmount?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated
|
|
32
|
+
*/
|
|
19
33
|
expenses?: Array<AccountingProfitAndLossCategory> | undefined;
|
|
34
|
+
expensesSections?: Array<AccountingProfitAndLossSection> | undefined;
|
|
35
|
+
expensesTotalAmount?: number | undefined;
|
|
20
36
|
grossProfitAmount?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated
|
|
39
|
+
*/
|
|
21
40
|
income?: Array<AccountingProfitAndLossCategory> | undefined;
|
|
41
|
+
incomeSections?: Array<AccountingProfitAndLossSection> | undefined;
|
|
42
|
+
incomeTotalAmount?: number | undefined;
|
|
43
|
+
netIncomeAmount?: number | undefined;
|
|
22
44
|
netProfitAmount?: number | undefined;
|
|
23
45
|
};
|
|
24
46
|
|
|
@@ -30,14 +52,32 @@ export const PropertyAccountingReportProfitAndLoss$inboundSchema: z.ZodType<
|
|
|
30
52
|
> = z.object({
|
|
31
53
|
cost_of_goods_sold: z.array(AccountingProfitAndLossCategory$inboundSchema)
|
|
32
54
|
.optional(),
|
|
55
|
+
cost_of_goods_sold_sections: z.array(
|
|
56
|
+
AccountingProfitAndLossSection$inboundSchema,
|
|
57
|
+
).optional(),
|
|
58
|
+
cost_of_goods_sold_total_amount: z.number().optional(),
|
|
33
59
|
expenses: z.array(AccountingProfitAndLossCategory$inboundSchema).optional(),
|
|
60
|
+
expenses_sections: z.array(AccountingProfitAndLossSection$inboundSchema)
|
|
61
|
+
.optional(),
|
|
62
|
+
expenses_total_amount: z.number().optional(),
|
|
34
63
|
gross_profit_amount: z.number().optional(),
|
|
35
64
|
income: z.array(AccountingProfitAndLossCategory$inboundSchema).optional(),
|
|
65
|
+
income_sections: z.array(AccountingProfitAndLossSection$inboundSchema)
|
|
66
|
+
.optional(),
|
|
67
|
+
income_total_amount: z.number().optional(),
|
|
68
|
+
net_income_amount: z.number().optional(),
|
|
36
69
|
net_profit_amount: z.number().optional(),
|
|
37
70
|
}).transform((v) => {
|
|
38
71
|
return remap$(v, {
|
|
39
72
|
"cost_of_goods_sold": "costOfGoodsSold",
|
|
73
|
+
"cost_of_goods_sold_sections": "costOfGoodsSoldSections",
|
|
74
|
+
"cost_of_goods_sold_total_amount": "costOfGoodsSoldTotalAmount",
|
|
75
|
+
"expenses_sections": "expensesSections",
|
|
76
|
+
"expenses_total_amount": "expensesTotalAmount",
|
|
40
77
|
"gross_profit_amount": "grossProfitAmount",
|
|
78
|
+
"income_sections": "incomeSections",
|
|
79
|
+
"income_total_amount": "incomeTotalAmount",
|
|
80
|
+
"net_income_amount": "netIncomeAmount",
|
|
41
81
|
"net_profit_amount": "netProfitAmount",
|
|
42
82
|
});
|
|
43
83
|
});
|
|
@@ -47,9 +87,20 @@ export type PropertyAccountingReportProfitAndLoss$Outbound = {
|
|
|
47
87
|
cost_of_goods_sold?:
|
|
48
88
|
| Array<AccountingProfitAndLossCategory$Outbound>
|
|
49
89
|
| undefined;
|
|
90
|
+
cost_of_goods_sold_sections?:
|
|
91
|
+
| Array<AccountingProfitAndLossSection$Outbound>
|
|
92
|
+
| undefined;
|
|
93
|
+
cost_of_goods_sold_total_amount?: number | undefined;
|
|
50
94
|
expenses?: Array<AccountingProfitAndLossCategory$Outbound> | undefined;
|
|
95
|
+
expenses_sections?:
|
|
96
|
+
| Array<AccountingProfitAndLossSection$Outbound>
|
|
97
|
+
| undefined;
|
|
98
|
+
expenses_total_amount?: number | undefined;
|
|
51
99
|
gross_profit_amount?: number | undefined;
|
|
52
100
|
income?: Array<AccountingProfitAndLossCategory$Outbound> | undefined;
|
|
101
|
+
income_sections?: Array<AccountingProfitAndLossSection$Outbound> | undefined;
|
|
102
|
+
income_total_amount?: number | undefined;
|
|
103
|
+
net_income_amount?: number | undefined;
|
|
53
104
|
net_profit_amount?: number | undefined;
|
|
54
105
|
};
|
|
55
106
|
|
|
@@ -61,14 +112,32 @@ export const PropertyAccountingReportProfitAndLoss$outboundSchema: z.ZodType<
|
|
|
61
112
|
> = z.object({
|
|
62
113
|
costOfGoodsSold: z.array(AccountingProfitAndLossCategory$outboundSchema)
|
|
63
114
|
.optional(),
|
|
115
|
+
costOfGoodsSoldSections: z.array(
|
|
116
|
+
AccountingProfitAndLossSection$outboundSchema,
|
|
117
|
+
).optional(),
|
|
118
|
+
costOfGoodsSoldTotalAmount: z.number().optional(),
|
|
64
119
|
expenses: z.array(AccountingProfitAndLossCategory$outboundSchema).optional(),
|
|
120
|
+
expensesSections: z.array(AccountingProfitAndLossSection$outboundSchema)
|
|
121
|
+
.optional(),
|
|
122
|
+
expensesTotalAmount: z.number().optional(),
|
|
65
123
|
grossProfitAmount: z.number().optional(),
|
|
66
124
|
income: z.array(AccountingProfitAndLossCategory$outboundSchema).optional(),
|
|
125
|
+
incomeSections: z.array(AccountingProfitAndLossSection$outboundSchema)
|
|
126
|
+
.optional(),
|
|
127
|
+
incomeTotalAmount: z.number().optional(),
|
|
128
|
+
netIncomeAmount: z.number().optional(),
|
|
67
129
|
netProfitAmount: z.number().optional(),
|
|
68
130
|
}).transform((v) => {
|
|
69
131
|
return remap$(v, {
|
|
70
132
|
costOfGoodsSold: "cost_of_goods_sold",
|
|
133
|
+
costOfGoodsSoldSections: "cost_of_goods_sold_sections",
|
|
134
|
+
costOfGoodsSoldTotalAmount: "cost_of_goods_sold_total_amount",
|
|
135
|
+
expensesSections: "expenses_sections",
|
|
136
|
+
expensesTotalAmount: "expenses_total_amount",
|
|
71
137
|
grossProfitAmount: "gross_profit_amount",
|
|
138
|
+
incomeSections: "income_sections",
|
|
139
|
+
incomeTotalAmount: "income_total_amount",
|
|
140
|
+
netIncomeAmount: "net_income_amount",
|
|
72
141
|
netProfitAmount: "net_profit_amount",
|
|
73
142
|
});
|
|
74
143
|
});
|