@unified-api/typescript-sdk 2.73.10 → 2.73.12
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/README.md +12 -0
- package/bin/mcp-server.js +4421 -3450
- package/bin/mcp-server.js.map +32 -13
- package/docs/sdks/account/README.md +6 -0
- package/docs/sdks/accounting/README.md +558 -0
- package/docs/sdks/activity/README.md +6 -0
- package/docs/sdks/apicall/README.md +2 -0
- package/docs/sdks/application/README.md +6 -0
- package/docs/sdks/applicationstatus/README.md +1 -0
- package/docs/sdks/ats/README.md +49 -0
- package/docs/sdks/auth/README.md +2 -0
- package/docs/sdks/balancesheet/README.md +2 -0
- package/docs/sdks/bill/README.md +6 -0
- package/docs/sdks/branch/README.md +6 -0
- package/docs/sdks/busy/README.md +1 -0
- package/docs/sdks/calendar/README.md +21 -0
- package/docs/sdks/call/README.md +1 -0
- package/docs/sdks/candidate/README.md +6 -0
- package/docs/sdks/category/README.md +489 -0
- package/docs/sdks/channel/README.md +2 -0
- package/docs/sdks/class/README.md +6 -0
- package/docs/sdks/collection/README.md +6 -0
- package/docs/sdks/comment/README.md +18 -0
- package/docs/sdks/commerce/README.md +30 -0
- package/docs/sdks/commit/README.md +6 -0
- package/docs/sdks/company/README.md +19 -0
- package/docs/sdks/connection/README.md +6 -0
- package/docs/sdks/contact/README.md +18 -0
- package/docs/sdks/course/README.md +6 -0
- package/docs/sdks/creditmemo/README.md +6 -0
- package/docs/sdks/crm/README.md +36 -0
- package/docs/sdks/customer/README.md +6 -0
- package/docs/sdks/deal/README.md +6 -0
- package/docs/sdks/device/README.md +6 -0
- package/docs/sdks/document/README.md +6 -0
- package/docs/sdks/employee/README.md +6 -0
- package/docs/sdks/enrich/README.md +2 -0
- package/docs/sdks/event/README.md +12 -0
- package/docs/sdks/file/README.md +6 -0
- package/docs/sdks/genai/README.md +2 -0
- package/docs/sdks/group/README.md +12 -0
- package/docs/sdks/hris/README.md +40 -0
- package/docs/sdks/instructor/README.md +6 -0
- package/docs/sdks/integration/README.md +3 -0
- package/docs/sdks/interview/README.md +6 -0
- package/docs/sdks/inventory/README.md +6 -0
- package/docs/sdks/invoice/README.md +6 -0
- package/docs/sdks/issue/README.md +1 -0
- package/docs/sdks/item/README.md +6 -0
- package/docs/sdks/job/README.md +6 -0
- package/docs/sdks/journal/README.md +6 -0
- package/docs/sdks/kms/README.md +18 -0
- package/docs/sdks/lead/README.md +6 -0
- package/docs/sdks/link/README.md +12 -0
- package/docs/sdks/list/README.md +6 -0
- package/docs/sdks/lms/README.md +24 -0
- package/docs/sdks/location/README.md +12 -0
- package/docs/sdks/login/README.md +1 -0
- package/docs/sdks/martech/README.md +12 -0
- package/docs/sdks/member/README.md +6 -0
- package/docs/sdks/message/README.md +6 -0
- package/docs/sdks/messaging/README.md +8 -0
- package/docs/sdks/metadata/README.md +6 -0
- package/docs/sdks/model/README.md +1 -0
- package/docs/sdks/note/README.md +6 -0
- package/docs/sdks/order/README.md +6 -0
- package/docs/sdks/organization/README.md +8 -0
- package/docs/sdks/page/README.md +6 -0
- package/docs/sdks/passthrough/README.md +8 -0
- package/docs/sdks/payment/README.md +22 -0
- package/docs/sdks/payout/README.md +2 -0
- package/docs/sdks/payslip/README.md +2 -0
- package/docs/sdks/person/README.md +1 -0
- package/docs/sdks/pipeline/README.md +6 -0
- package/docs/sdks/profitloss/README.md +2 -0
- package/docs/sdks/project/README.md +6 -0
- package/docs/sdks/prompt/README.md +1 -0
- package/docs/sdks/pullrequest/README.md +6 -0
- package/docs/sdks/purchaseorder/README.md +6 -0
- package/docs/sdks/recording/README.md +8 -0
- package/docs/sdks/refund/README.md +2 -0
- package/docs/sdks/repo/README.md +30 -0
- package/docs/sdks/report/README.md +2 -0
- package/docs/sdks/repository/README.md +6 -0
- package/docs/sdks/review/README.md +6 -0
- package/docs/sdks/salesorder/README.md +6 -0
- package/docs/sdks/scim/README.md +12 -0
- package/docs/sdks/scorecard/README.md +6 -0
- package/docs/sdks/space/README.md +6 -0
- package/docs/sdks/storage/README.md +6 -0
- package/docs/sdks/student/README.md +6 -0
- package/docs/sdks/subscription/README.md +6 -0
- package/docs/sdks/task/README.md +18 -0
- package/docs/sdks/taxrate/README.md +6 -0
- package/docs/sdks/ticket/README.md +6 -0
- package/docs/sdks/ticketing/README.md +18 -0
- package/docs/sdks/timeoff/README.md +2 -0
- package/docs/sdks/timeshift/README.md +6 -0
- package/docs/sdks/transaction/README.md +6 -0
- package/docs/sdks/trialbalance/README.md +2 -0
- package/docs/sdks/uc/README.md +19 -0
- package/docs/sdks/unified/README.md +20 -0
- package/docs/sdks/user/README.md +6 -0
- package/docs/sdks/webhook/README.md +8 -0
- package/examples/README.md +5 -0
- package/examples/accountingCreateAccountingAccount.example.ts +2 -0
- package/examples/package-lock.json +6 -5
- package/funcs/accountingCreateAccountingCategory.d.ts +15 -0
- package/funcs/accountingCreateAccountingCategory.d.ts.map +1 -0
- package/funcs/accountingCreateAccountingCategory.js +114 -0
- package/funcs/accountingCreateAccountingCategory.js.map +1 -0
- package/funcs/accountingGetAccountingCategory.d.ts +15 -0
- package/funcs/accountingGetAccountingCategory.d.ts.map +1 -0
- package/funcs/accountingGetAccountingCategory.js +115 -0
- package/funcs/accountingGetAccountingCategory.js.map +1 -0
- package/funcs/accountingListAccountingCategories.d.ts +15 -0
- package/funcs/accountingListAccountingCategories.d.ts.map +1 -0
- package/funcs/accountingListAccountingCategories.js +119 -0
- package/funcs/accountingListAccountingCategories.js.map +1 -0
- package/funcs/accountingPatchAccountingCategory.d.ts +15 -0
- package/funcs/accountingPatchAccountingCategory.d.ts.map +1 -0
- package/funcs/accountingPatchAccountingCategory.js +118 -0
- package/funcs/accountingPatchAccountingCategory.js.map +1 -0
- package/funcs/accountingRemoveAccountingCategory.d.ts +14 -0
- package/funcs/accountingRemoveAccountingCategory.d.ts.map +1 -0
- package/funcs/accountingRemoveAccountingCategory.js +112 -0
- package/funcs/accountingRemoveAccountingCategory.js.map +1 -0
- package/funcs/accountingUpdateAccountingCategory.d.ts +15 -0
- package/funcs/accountingUpdateAccountingCategory.d.ts.map +1 -0
- package/funcs/accountingUpdateAccountingCategory.js +118 -0
- package/funcs/accountingUpdateAccountingCategory.js.map +1 -0
- 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.d.ts.map +1 -1
- package/mcp-server/server.js +13 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/accountingCreateAccountingCategory.d.ts +8 -0
- package/mcp-server/tools/accountingCreateAccountingCategory.d.ts.map +1 -0
- package/mcp-server/tools/accountingCreateAccountingCategory.js +52 -0
- package/mcp-server/tools/accountingCreateAccountingCategory.js.map +1 -0
- package/mcp-server/tools/accountingGetAccountingCategory.d.ts +8 -0
- package/mcp-server/tools/accountingGetAccountingCategory.d.ts.map +1 -0
- package/mcp-server/tools/accountingGetAccountingCategory.js +52 -0
- package/mcp-server/tools/accountingGetAccountingCategory.js.map +1 -0
- package/mcp-server/tools/accountingListAccountingCategories.d.ts +8 -0
- package/mcp-server/tools/accountingListAccountingCategories.d.ts.map +1 -0
- package/mcp-server/tools/accountingListAccountingCategories.js +52 -0
- package/mcp-server/tools/accountingListAccountingCategories.js.map +1 -0
- package/mcp-server/tools/accountingPatchAccountingCategory.d.ts +8 -0
- package/mcp-server/tools/accountingPatchAccountingCategory.d.ts.map +1 -0
- package/mcp-server/tools/accountingPatchAccountingCategory.js +52 -0
- package/mcp-server/tools/accountingPatchAccountingCategory.js.map +1 -0
- package/mcp-server/tools/accountingRemoveAccountingCategory.d.ts +8 -0
- package/mcp-server/tools/accountingRemoveAccountingCategory.d.ts.map +1 -0
- package/mcp-server/tools/accountingRemoveAccountingCategory.js +51 -0
- package/mcp-server/tools/accountingRemoveAccountingCategory.js.map +1 -0
- package/mcp-server/tools/accountingUpdateAccountingCategory.d.ts +8 -0
- package/mcp-server/tools/accountingUpdateAccountingCategory.d.ts.map +1 -0
- package/mcp-server/tools/accountingUpdateAccountingCategory.js +52 -0
- package/mcp-server/tools/accountingUpdateAccountingCategory.js.map +1 -0
- package/package.json +4 -6
- package/sdk/accounting.d.ts +24 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +42 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/category.d.ts +30 -0
- package/sdk/category.d.ts.map +1 -0
- package/sdk/category.js +54 -0
- package/sdk/category.js.map +1 -0
- package/sdk/models/operations/createaccountingcategory.d.ts +45 -0
- package/sdk/models/operations/createaccountingcategory.d.ts.map +1 -0
- package/sdk/models/operations/createaccountingcategory.js +77 -0
- package/sdk/models/operations/createaccountingcategory.js.map +1 -0
- package/sdk/models/operations/getaccountingcategory.d.ts +47 -0
- package/sdk/models/operations/getaccountingcategory.d.ts.map +1 -0
- package/sdk/models/operations/getaccountingcategory.js +74 -0
- package/sdk/models/operations/getaccountingcategory.js.map +1 -0
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listaccountingcategories.d.ts +65 -0
- package/sdk/models/operations/listaccountingcategories.d.ts.map +1 -0
- package/sdk/models/operations/listaccountingcategories.js +90 -0
- package/sdk/models/operations/listaccountingcategories.js.map +1 -0
- package/sdk/models/operations/patchaccountingcategory.d.ts +50 -0
- package/sdk/models/operations/patchaccountingcategory.d.ts.map +1 -0
- package/sdk/models/operations/patchaccountingcategory.js +79 -0
- package/sdk/models/operations/patchaccountingcategory.js.map +1 -0
- package/sdk/models/operations/removeaccountingcategory.d.ts +66 -0
- package/sdk/models/operations/removeaccountingcategory.d.ts.map +1 -0
- package/sdk/models/operations/removeaccountingcategory.js +105 -0
- package/sdk/models/operations/removeaccountingcategory.js.map +1 -0
- package/sdk/models/operations/updateaccountingcategory.d.ts +50 -0
- package/sdk/models/operations/updateaccountingcategory.d.ts.map +1 -0
- package/sdk/models/operations/updateaccountingcategory.js +79 -0
- package/sdk/models/operations/updateaccountingcategory.js.map +1 -0
- package/sdk/models/shared/accountingcategory.d.ts +47 -0
- package/sdk/models/shared/accountingcategory.d.ts.map +1 -0
- package/sdk/models/shared/accountingcategory.js +90 -0
- package/sdk/models/shared/accountingcategory.js.map +1 -0
- package/sdk/models/shared/accountinglineitem.d.ts +2 -0
- package/sdk/models/shared/accountinglineitem.d.ts.map +1 -1
- package/sdk/models/shared/accountinglineitem.js +4 -0
- package/sdk/models/shared/accountinglineitem.js.map +1 -1
- package/sdk/models/shared/accountingprofitloss.d.ts +3 -3
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts +3 -3
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +1 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/accountingCreateAccountingCategory.ts +173 -0
- package/src/funcs/accountingGetAccountingCategory.ts +176 -0
- package/src/funcs/accountingListAccountingCategories.ts +178 -0
- package/src/funcs/accountingPatchAccountingCategory.ts +179 -0
- package/src/funcs/accountingRemoveAccountingCategory.ts +181 -0
- package/src/funcs/accountingUpdateAccountingCategory.ts +179 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +13 -1
- package/src/mcp-server/tools/accountingCreateAccountingCategory.ts +37 -0
- package/src/mcp-server/tools/accountingGetAccountingCategory.ts +36 -0
- package/src/mcp-server/tools/accountingListAccountingCategories.ts +37 -0
- package/src/mcp-server/tools/accountingPatchAccountingCategory.ts +37 -0
- package/src/mcp-server/tools/accountingRemoveAccountingCategory.ts +35 -0
- package/src/mcp-server/tools/accountingUpdateAccountingCategory.ts +37 -0
- package/src/sdk/accounting.ts +90 -0
- package/src/sdk/category.ts +100 -0
- package/src/sdk/models/operations/createaccountingcategory.ts +101 -0
- package/src/sdk/models/operations/getaccountingcategory.ts +101 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listaccountingcategories.ts +135 -0
- package/src/sdk/models/operations/patchaccountingcategory.ts +108 -0
- package/src/sdk/models/operations/removeaccountingcategory.ts +155 -0
- package/src/sdk/models/operations/updateaccountingcategory.ts +108 -0
- package/src/sdk/models/shared/accountingcategory.ts +111 -0
- package/src/sdk/models/shared/accountinglineitem.ts +6 -0
- package/src/sdk/models/shared/accountingprofitloss.ts +3 -3
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/propertyaccountingreportprofitandloss.ts +3 -3
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { accountingUpdateAccountingCategory } from "../../funcs/accountingUpdateAccountingCategory.js";
|
|
6
|
+
import * as operations from "../../sdk/models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UpdateAccountingCategoryRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$accountingUpdateAccountingCategory: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "accounting-update-accounting-category",
|
|
17
|
+
description: `Update a category`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await accountingUpdateAccountingCategory(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { accountingCreateAccountingAccount } from "../funcs/accountingCreateAccountingAccount.js";
|
|
6
6
|
import { accountingCreateAccountingBill } from "../funcs/accountingCreateAccountingBill.js";
|
|
7
|
+
import { accountingCreateAccountingCategory } from "../funcs/accountingCreateAccountingCategory.js";
|
|
7
8
|
import { accountingCreateAccountingContact } from "../funcs/accountingCreateAccountingContact.js";
|
|
8
9
|
import { accountingCreateAccountingCreditmemo } from "../funcs/accountingCreateAccountingCreditmemo.js";
|
|
9
10
|
import { accountingCreateAccountingInvoice } from "../funcs/accountingCreateAccountingInvoice.js";
|
|
@@ -16,6 +17,7 @@ import { accountingCreateAccountingTransaction } from "../funcs/accountingCreate
|
|
|
16
17
|
import { accountingGetAccountingAccount } from "../funcs/accountingGetAccountingAccount.js";
|
|
17
18
|
import { accountingGetAccountingBalancesheet } from "../funcs/accountingGetAccountingBalancesheet.js";
|
|
18
19
|
import { accountingGetAccountingBill } from "../funcs/accountingGetAccountingBill.js";
|
|
20
|
+
import { accountingGetAccountingCategory } from "../funcs/accountingGetAccountingCategory.js";
|
|
19
21
|
import { accountingGetAccountingContact } from "../funcs/accountingGetAccountingContact.js";
|
|
20
22
|
import { accountingGetAccountingCreditmemo } from "../funcs/accountingGetAccountingCreditmemo.js";
|
|
21
23
|
import { accountingGetAccountingInvoice } from "../funcs/accountingGetAccountingInvoice.js";
|
|
@@ -32,6 +34,7 @@ import { accountingGetAccountingTrialbalance } from "../funcs/accountingGetAccou
|
|
|
32
34
|
import { accountingListAccountingAccounts } from "../funcs/accountingListAccountingAccounts.js";
|
|
33
35
|
import { accountingListAccountingBalancesheets } from "../funcs/accountingListAccountingBalancesheets.js";
|
|
34
36
|
import { accountingListAccountingBills } from "../funcs/accountingListAccountingBills.js";
|
|
37
|
+
import { accountingListAccountingCategories } from "../funcs/accountingListAccountingCategories.js";
|
|
35
38
|
import { accountingListAccountingContacts } from "../funcs/accountingListAccountingContacts.js";
|
|
36
39
|
import { accountingListAccountingCreditmemoes } from "../funcs/accountingListAccountingCreditmemoes.js";
|
|
37
40
|
import { accountingListAccountingInvoices } from "../funcs/accountingListAccountingInvoices.js";
|
|
@@ -47,6 +50,7 @@ import { accountingListAccountingTransactions } from "../funcs/accountingListAcc
|
|
|
47
50
|
import { accountingListAccountingTrialbalances } from "../funcs/accountingListAccountingTrialbalances.js";
|
|
48
51
|
import { accountingPatchAccountingAccount } from "../funcs/accountingPatchAccountingAccount.js";
|
|
49
52
|
import { accountingPatchAccountingBill } from "../funcs/accountingPatchAccountingBill.js";
|
|
53
|
+
import { accountingPatchAccountingCategory } from "../funcs/accountingPatchAccountingCategory.js";
|
|
50
54
|
import { accountingPatchAccountingContact } from "../funcs/accountingPatchAccountingContact.js";
|
|
51
55
|
import { accountingPatchAccountingCreditmemo } from "../funcs/accountingPatchAccountingCreditmemo.js";
|
|
52
56
|
import { accountingPatchAccountingInvoice } from "../funcs/accountingPatchAccountingInvoice.js";
|
|
@@ -58,6 +62,7 @@ import { accountingPatchAccountingTaxrate } from "../funcs/accountingPatchAccoun
|
|
|
58
62
|
import { accountingPatchAccountingTransaction } from "../funcs/accountingPatchAccountingTransaction.js";
|
|
59
63
|
import { accountingRemoveAccountingAccount } from "../funcs/accountingRemoveAccountingAccount.js";
|
|
60
64
|
import { accountingRemoveAccountingBill } from "../funcs/accountingRemoveAccountingBill.js";
|
|
65
|
+
import { accountingRemoveAccountingCategory } from "../funcs/accountingRemoveAccountingCategory.js";
|
|
61
66
|
import { accountingRemoveAccountingContact } from "../funcs/accountingRemoveAccountingContact.js";
|
|
62
67
|
import { accountingRemoveAccountingCreditmemo } from "../funcs/accountingRemoveAccountingCreditmemo.js";
|
|
63
68
|
import { accountingRemoveAccountingInvoice } from "../funcs/accountingRemoveAccountingInvoice.js";
|
|
@@ -69,6 +74,7 @@ import { accountingRemoveAccountingTaxrate } from "../funcs/accountingRemoveAcco
|
|
|
69
74
|
import { accountingRemoveAccountingTransaction } from "../funcs/accountingRemoveAccountingTransaction.js";
|
|
70
75
|
import { accountingUpdateAccountingAccount } from "../funcs/accountingUpdateAccountingAccount.js";
|
|
71
76
|
import { accountingUpdateAccountingBill } from "../funcs/accountingUpdateAccountingBill.js";
|
|
77
|
+
import { accountingUpdateAccountingCategory } from "../funcs/accountingUpdateAccountingCategory.js";
|
|
72
78
|
import { accountingUpdateAccountingContact } from "../funcs/accountingUpdateAccountingContact.js";
|
|
73
79
|
import { accountingUpdateAccountingCreditmemo } from "../funcs/accountingUpdateAccountingCreditmemo.js";
|
|
74
80
|
import { accountingUpdateAccountingInvoice } from "../funcs/accountingUpdateAccountingInvoice.js";
|
|
@@ -112,6 +118,20 @@ export class Accounting extends ClientSDK {
|
|
|
112
118
|
));
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Create a category
|
|
123
|
+
*/
|
|
124
|
+
async createAccountingCategory(
|
|
125
|
+
request: operations.CreateAccountingCategoryRequest,
|
|
126
|
+
options?: RequestOptions,
|
|
127
|
+
): Promise<shared.AccountingCategory> {
|
|
128
|
+
return unwrapAsync(accountingCreateAccountingCategory(
|
|
129
|
+
this,
|
|
130
|
+
request,
|
|
131
|
+
options,
|
|
132
|
+
));
|
|
133
|
+
}
|
|
134
|
+
|
|
115
135
|
/**
|
|
116
136
|
* Create a contact
|
|
117
137
|
*/
|
|
@@ -280,6 +300,20 @@ export class Accounting extends ClientSDK {
|
|
|
280
300
|
));
|
|
281
301
|
}
|
|
282
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Retrieve a category
|
|
305
|
+
*/
|
|
306
|
+
async getAccountingCategory(
|
|
307
|
+
request: operations.GetAccountingCategoryRequest,
|
|
308
|
+
options?: RequestOptions,
|
|
309
|
+
): Promise<shared.AccountingCategory> {
|
|
310
|
+
return unwrapAsync(accountingGetAccountingCategory(
|
|
311
|
+
this,
|
|
312
|
+
request,
|
|
313
|
+
options,
|
|
314
|
+
));
|
|
315
|
+
}
|
|
316
|
+
|
|
283
317
|
/**
|
|
284
318
|
* Retrieve a contact
|
|
285
319
|
*/
|
|
@@ -504,6 +538,20 @@ export class Accounting extends ClientSDK {
|
|
|
504
538
|
));
|
|
505
539
|
}
|
|
506
540
|
|
|
541
|
+
/**
|
|
542
|
+
* List all categories
|
|
543
|
+
*/
|
|
544
|
+
async listAccountingCategories(
|
|
545
|
+
request: operations.ListAccountingCategoriesRequest,
|
|
546
|
+
options?: RequestOptions,
|
|
547
|
+
): Promise<Array<shared.AccountingCategory>> {
|
|
548
|
+
return unwrapAsync(accountingListAccountingCategories(
|
|
549
|
+
this,
|
|
550
|
+
request,
|
|
551
|
+
options,
|
|
552
|
+
));
|
|
553
|
+
}
|
|
554
|
+
|
|
507
555
|
/**
|
|
508
556
|
* List all contacts
|
|
509
557
|
*/
|
|
@@ -714,6 +762,20 @@ export class Accounting extends ClientSDK {
|
|
|
714
762
|
));
|
|
715
763
|
}
|
|
716
764
|
|
|
765
|
+
/**
|
|
766
|
+
* Update a category
|
|
767
|
+
*/
|
|
768
|
+
async patchAccountingCategory(
|
|
769
|
+
request: operations.PatchAccountingCategoryRequest,
|
|
770
|
+
options?: RequestOptions,
|
|
771
|
+
): Promise<shared.AccountingCategory> {
|
|
772
|
+
return unwrapAsync(accountingPatchAccountingCategory(
|
|
773
|
+
this,
|
|
774
|
+
request,
|
|
775
|
+
options,
|
|
776
|
+
));
|
|
777
|
+
}
|
|
778
|
+
|
|
717
779
|
/**
|
|
718
780
|
* Update a contact
|
|
719
781
|
*/
|
|
@@ -868,6 +930,20 @@ export class Accounting extends ClientSDK {
|
|
|
868
930
|
));
|
|
869
931
|
}
|
|
870
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Remove a category
|
|
935
|
+
*/
|
|
936
|
+
async removeAccountingCategory(
|
|
937
|
+
request: operations.RemoveAccountingCategoryRequest,
|
|
938
|
+
options?: RequestOptions,
|
|
939
|
+
): Promise<operations.RemoveAccountingCategoryResponse | undefined> {
|
|
940
|
+
return unwrapAsync(accountingRemoveAccountingCategory(
|
|
941
|
+
this,
|
|
942
|
+
request,
|
|
943
|
+
options,
|
|
944
|
+
));
|
|
945
|
+
}
|
|
946
|
+
|
|
871
947
|
/**
|
|
872
948
|
* Remove a contact
|
|
873
949
|
*/
|
|
@@ -1022,6 +1098,20 @@ export class Accounting extends ClientSDK {
|
|
|
1022
1098
|
));
|
|
1023
1099
|
}
|
|
1024
1100
|
|
|
1101
|
+
/**
|
|
1102
|
+
* Update a category
|
|
1103
|
+
*/
|
|
1104
|
+
async updateAccountingCategory(
|
|
1105
|
+
request: operations.UpdateAccountingCategoryRequest,
|
|
1106
|
+
options?: RequestOptions,
|
|
1107
|
+
): Promise<shared.AccountingCategory> {
|
|
1108
|
+
return unwrapAsync(accountingUpdateAccountingCategory(
|
|
1109
|
+
this,
|
|
1110
|
+
request,
|
|
1111
|
+
options,
|
|
1112
|
+
));
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1025
1115
|
/**
|
|
1026
1116
|
* Update a contact
|
|
1027
1117
|
*/
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { accountingCreateAccountingCategory } from "../funcs/accountingCreateAccountingCategory.js";
|
|
6
|
+
import { accountingGetAccountingCategory } from "../funcs/accountingGetAccountingCategory.js";
|
|
7
|
+
import { accountingListAccountingCategories } from "../funcs/accountingListAccountingCategories.js";
|
|
8
|
+
import { accountingPatchAccountingCategory } from "../funcs/accountingPatchAccountingCategory.js";
|
|
9
|
+
import { accountingRemoveAccountingCategory } from "../funcs/accountingRemoveAccountingCategory.js";
|
|
10
|
+
import { accountingUpdateAccountingCategory } from "../funcs/accountingUpdateAccountingCategory.js";
|
|
11
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import * as operations from "./models/operations/index.js";
|
|
13
|
+
import * as shared from "./models/shared/index.js";
|
|
14
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
15
|
+
|
|
16
|
+
export class Category extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* Create a category
|
|
19
|
+
*/
|
|
20
|
+
async createAccountingCategory(
|
|
21
|
+
request: operations.CreateAccountingCategoryRequest,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): Promise<shared.AccountingCategory> {
|
|
24
|
+
return unwrapAsync(accountingCreateAccountingCategory(
|
|
25
|
+
this,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve a category
|
|
33
|
+
*/
|
|
34
|
+
async getAccountingCategory(
|
|
35
|
+
request: operations.GetAccountingCategoryRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<shared.AccountingCategory> {
|
|
38
|
+
return unwrapAsync(accountingGetAccountingCategory(
|
|
39
|
+
this,
|
|
40
|
+
request,
|
|
41
|
+
options,
|
|
42
|
+
));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* List all categories
|
|
47
|
+
*/
|
|
48
|
+
async listAccountingCategories(
|
|
49
|
+
request: operations.ListAccountingCategoriesRequest,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): Promise<Array<shared.AccountingCategory>> {
|
|
52
|
+
return unwrapAsync(accountingListAccountingCategories(
|
|
53
|
+
this,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Update a category
|
|
61
|
+
*/
|
|
62
|
+
async patchAccountingCategory(
|
|
63
|
+
request: operations.PatchAccountingCategoryRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<shared.AccountingCategory> {
|
|
66
|
+
return unwrapAsync(accountingPatchAccountingCategory(
|
|
67
|
+
this,
|
|
68
|
+
request,
|
|
69
|
+
options,
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Remove a category
|
|
75
|
+
*/
|
|
76
|
+
async removeAccountingCategory(
|
|
77
|
+
request: operations.RemoveAccountingCategoryRequest,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): Promise<operations.RemoveAccountingCategoryResponse | undefined> {
|
|
80
|
+
return unwrapAsync(accountingRemoveAccountingCategory(
|
|
81
|
+
this,
|
|
82
|
+
request,
|
|
83
|
+
options,
|
|
84
|
+
));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update a category
|
|
89
|
+
*/
|
|
90
|
+
async updateAccountingCategory(
|
|
91
|
+
request: operations.UpdateAccountingCategoryRequest,
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<shared.AccountingCategory> {
|
|
94
|
+
return unwrapAsync(accountingUpdateAccountingCategory(
|
|
95
|
+
this,
|
|
96
|
+
request,
|
|
97
|
+
options,
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type CreateAccountingCategoryRequest = {
|
|
13
|
+
accountingCategory: shared.AccountingCategory;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the connection
|
|
16
|
+
*/
|
|
17
|
+
connectionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-delimited fields to return
|
|
20
|
+
*/
|
|
21
|
+
fields?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
24
|
+
*/
|
|
25
|
+
raw?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CreateAccountingCategoryRequest$inboundSchema: z.ZodType<
|
|
30
|
+
CreateAccountingCategoryRequest,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
AccountingCategory: shared.AccountingCategory$inboundSchema,
|
|
35
|
+
connection_id: z.string(),
|
|
36
|
+
fields: z.array(z.string()).optional(),
|
|
37
|
+
raw: z.string().optional(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"AccountingCategory": "accountingCategory",
|
|
41
|
+
"connection_id": "connectionId",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type CreateAccountingCategoryRequest$Outbound = {
|
|
47
|
+
AccountingCategory: shared.AccountingCategory$Outbound;
|
|
48
|
+
connection_id: string;
|
|
49
|
+
fields?: Array<string> | undefined;
|
|
50
|
+
raw?: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const CreateAccountingCategoryRequest$outboundSchema: z.ZodType<
|
|
55
|
+
CreateAccountingCategoryRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
CreateAccountingCategoryRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
accountingCategory: shared.AccountingCategory$outboundSchema,
|
|
60
|
+
connectionId: z.string(),
|
|
61
|
+
fields: z.array(z.string()).optional(),
|
|
62
|
+
raw: z.string().optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
accountingCategory: "AccountingCategory",
|
|
66
|
+
connectionId: "connection_id",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace CreateAccountingCategoryRequest$ {
|
|
75
|
+
/** @deprecated use `CreateAccountingCategoryRequest$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = CreateAccountingCategoryRequest$inboundSchema;
|
|
77
|
+
/** @deprecated use `CreateAccountingCategoryRequest$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = CreateAccountingCategoryRequest$outboundSchema;
|
|
79
|
+
/** @deprecated use `CreateAccountingCategoryRequest$Outbound` instead. */
|
|
80
|
+
export type Outbound = CreateAccountingCategoryRequest$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function createAccountingCategoryRequestToJSON(
|
|
84
|
+
createAccountingCategoryRequest: CreateAccountingCategoryRequest,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
CreateAccountingCategoryRequest$outboundSchema.parse(
|
|
88
|
+
createAccountingCategoryRequest,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function createAccountingCategoryRequestFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<CreateAccountingCategoryRequest, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => CreateAccountingCategoryRequest$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'CreateAccountingCategoryRequest' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 GetAccountingCategoryRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-delimited fields to return
|
|
18
|
+
*/
|
|
19
|
+
fields?: Array<string> | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* ID of the Category
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
26
|
+
*/
|
|
27
|
+
raw?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const GetAccountingCategoryRequest$inboundSchema: z.ZodType<
|
|
32
|
+
GetAccountingCategoryRequest,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
connection_id: z.string(),
|
|
37
|
+
fields: z.array(z.string()).optional(),
|
|
38
|
+
id: z.string(),
|
|
39
|
+
raw: z.string().optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"connection_id": "connectionId",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type GetAccountingCategoryRequest$Outbound = {
|
|
48
|
+
connection_id: string;
|
|
49
|
+
fields?: Array<string> | undefined;
|
|
50
|
+
id: string;
|
|
51
|
+
raw?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const GetAccountingCategoryRequest$outboundSchema: z.ZodType<
|
|
56
|
+
GetAccountingCategoryRequest$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
GetAccountingCategoryRequest
|
|
59
|
+
> = z.object({
|
|
60
|
+
connectionId: z.string(),
|
|
61
|
+
fields: z.array(z.string()).optional(),
|
|
62
|
+
id: z.string(),
|
|
63
|
+
raw: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
connectionId: "connection_id",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace GetAccountingCategoryRequest$ {
|
|
75
|
+
/** @deprecated use `GetAccountingCategoryRequest$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = GetAccountingCategoryRequest$inboundSchema;
|
|
77
|
+
/** @deprecated use `GetAccountingCategoryRequest$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = GetAccountingCategoryRequest$outboundSchema;
|
|
79
|
+
/** @deprecated use `GetAccountingCategoryRequest$Outbound` instead. */
|
|
80
|
+
export type Outbound = GetAccountingCategoryRequest$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function getAccountingCategoryRequestToJSON(
|
|
84
|
+
getAccountingCategoryRequest: GetAccountingCategoryRequest,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
GetAccountingCategoryRequest$outboundSchema.parse(
|
|
88
|
+
getAccountingCategoryRequest,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function getAccountingCategoryRequestFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<GetAccountingCategoryRequest, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => GetAccountingCategoryRequest$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'GetAccountingCategoryRequest' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
export * from "./createaccountingaccount.js";
|
|
6
6
|
export * from "./createaccountingbill.js";
|
|
7
|
+
export * from "./createaccountingcategory.js";
|
|
7
8
|
export * from "./createaccountingcontact.js";
|
|
8
9
|
export * from "./createaccountingcreditmemo.js";
|
|
9
10
|
export * from "./createaccountinginvoice.js";
|
|
@@ -79,6 +80,7 @@ export * from "./createunifiedwebhook.js";
|
|
|
79
80
|
export * from "./getaccountingaccount.js";
|
|
80
81
|
export * from "./getaccountingbalancesheet.js";
|
|
81
82
|
export * from "./getaccountingbill.js";
|
|
83
|
+
export * from "./getaccountingcategory.js";
|
|
82
84
|
export * from "./getaccountingcontact.js";
|
|
83
85
|
export * from "./getaccountingcreditmemo.js";
|
|
84
86
|
export * from "./getaccountinginvoice.js";
|
|
@@ -165,6 +167,7 @@ export * from "./getunifiedwebhook.js";
|
|
|
165
167
|
export * from "./listaccountingaccounts.js";
|
|
166
168
|
export * from "./listaccountingbalancesheets.js";
|
|
167
169
|
export * from "./listaccountingbills.js";
|
|
170
|
+
export * from "./listaccountingcategories.js";
|
|
168
171
|
export * from "./listaccountingcontacts.js";
|
|
169
172
|
export * from "./listaccountingcreditmemoes.js";
|
|
170
173
|
export * from "./listaccountinginvoices.js";
|
|
@@ -258,6 +261,7 @@ export * from "./listunifiedissues.js";
|
|
|
258
261
|
export * from "./listunifiedwebhooks.js";
|
|
259
262
|
export * from "./patchaccountingaccount.js";
|
|
260
263
|
export * from "./patchaccountingbill.js";
|
|
264
|
+
export * from "./patchaccountingcategory.js";
|
|
261
265
|
export * from "./patchaccountingcontact.js";
|
|
262
266
|
export * from "./patchaccountingcreditmemo.js";
|
|
263
267
|
export * from "./patchaccountinginvoice.js";
|
|
@@ -333,6 +337,7 @@ export * from "./patchunifiedwebhook.js";
|
|
|
333
337
|
export * from "./patchunifiedwebhooktrigger.js";
|
|
334
338
|
export * from "./removeaccountingaccount.js";
|
|
335
339
|
export * from "./removeaccountingbill.js";
|
|
340
|
+
export * from "./removeaccountingcategory.js";
|
|
336
341
|
export * from "./removeaccountingcontact.js";
|
|
337
342
|
export * from "./removeaccountingcreditmemo.js";
|
|
338
343
|
export * from "./removeaccountinginvoice.js";
|
|
@@ -406,6 +411,7 @@ export * from "./removeunifiedconnection.js";
|
|
|
406
411
|
export * from "./removeunifiedwebhook.js";
|
|
407
412
|
export * from "./updateaccountingaccount.js";
|
|
408
413
|
export * from "./updateaccountingbill.js";
|
|
414
|
+
export * from "./updateaccountingcategory.js";
|
|
409
415
|
export * from "./updateaccountingcontact.js";
|
|
410
416
|
export * from "./updateaccountingcreditmemo.js";
|
|
411
417
|
export * from "./updateaccountinginvoice.js";
|
|
@@ -0,0 +1,135 @@
|
|
|
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 ListAccountingCategoriesRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-delimited fields to return
|
|
18
|
+
*/
|
|
19
|
+
fields?: Array<string> | undefined;
|
|
20
|
+
limit?: number | undefined;
|
|
21
|
+
offset?: number | undefined;
|
|
22
|
+
order?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The parent ID to filter by
|
|
25
|
+
*/
|
|
26
|
+
parentId?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Query string to search. eg. email address or name
|
|
29
|
+
*/
|
|
30
|
+
query?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
33
|
+
*/
|
|
34
|
+
raw?: string | undefined;
|
|
35
|
+
sort?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Return only results whose updated date is equal or greater to this value
|
|
38
|
+
*/
|
|
39
|
+
updatedGte?: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const ListAccountingCategoriesRequest$inboundSchema: z.ZodType<
|
|
44
|
+
ListAccountingCategoriesRequest,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
connection_id: z.string(),
|
|
49
|
+
fields: z.array(z.string()).optional(),
|
|
50
|
+
limit: z.number().optional(),
|
|
51
|
+
offset: z.number().optional(),
|
|
52
|
+
order: z.string().optional(),
|
|
53
|
+
parent_id: z.string().optional(),
|
|
54
|
+
query: z.string().optional(),
|
|
55
|
+
raw: z.string().optional(),
|
|
56
|
+
sort: z.string().optional(),
|
|
57
|
+
updated_gte: z.string().optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
"connection_id": "connectionId",
|
|
61
|
+
"parent_id": "parentId",
|
|
62
|
+
"updated_gte": "updatedGte",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type ListAccountingCategoriesRequest$Outbound = {
|
|
68
|
+
connection_id: string;
|
|
69
|
+
fields?: Array<string> | undefined;
|
|
70
|
+
limit?: number | undefined;
|
|
71
|
+
offset?: number | undefined;
|
|
72
|
+
order?: string | undefined;
|
|
73
|
+
parent_id?: string | undefined;
|
|
74
|
+
query?: string | undefined;
|
|
75
|
+
raw?: string | undefined;
|
|
76
|
+
sort?: string | undefined;
|
|
77
|
+
updated_gte?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const ListAccountingCategoriesRequest$outboundSchema: z.ZodType<
|
|
82
|
+
ListAccountingCategoriesRequest$Outbound,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
ListAccountingCategoriesRequest
|
|
85
|
+
> = z.object({
|
|
86
|
+
connectionId: z.string(),
|
|
87
|
+
fields: z.array(z.string()).optional(),
|
|
88
|
+
limit: z.number().optional(),
|
|
89
|
+
offset: z.number().optional(),
|
|
90
|
+
order: z.string().optional(),
|
|
91
|
+
parentId: z.string().optional(),
|
|
92
|
+
query: z.string().optional(),
|
|
93
|
+
raw: z.string().optional(),
|
|
94
|
+
sort: z.string().optional(),
|
|
95
|
+
updatedGte: z.string().optional(),
|
|
96
|
+
}).transform((v) => {
|
|
97
|
+
return remap$(v, {
|
|
98
|
+
connectionId: "connection_id",
|
|
99
|
+
parentId: "parent_id",
|
|
100
|
+
updatedGte: "updated_gte",
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
107
|
+
*/
|
|
108
|
+
export namespace ListAccountingCategoriesRequest$ {
|
|
109
|
+
/** @deprecated use `ListAccountingCategoriesRequest$inboundSchema` instead. */
|
|
110
|
+
export const inboundSchema = ListAccountingCategoriesRequest$inboundSchema;
|
|
111
|
+
/** @deprecated use `ListAccountingCategoriesRequest$outboundSchema` instead. */
|
|
112
|
+
export const outboundSchema = ListAccountingCategoriesRequest$outboundSchema;
|
|
113
|
+
/** @deprecated use `ListAccountingCategoriesRequest$Outbound` instead. */
|
|
114
|
+
export type Outbound = ListAccountingCategoriesRequest$Outbound;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function listAccountingCategoriesRequestToJSON(
|
|
118
|
+
listAccountingCategoriesRequest: ListAccountingCategoriesRequest,
|
|
119
|
+
): string {
|
|
120
|
+
return JSON.stringify(
|
|
121
|
+
ListAccountingCategoriesRequest$outboundSchema.parse(
|
|
122
|
+
listAccountingCategoriesRequest,
|
|
123
|
+
),
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function listAccountingCategoriesRequestFromJSON(
|
|
128
|
+
jsonString: string,
|
|
129
|
+
): SafeParseResult<ListAccountingCategoriesRequest, SDKValidationError> {
|
|
130
|
+
return safeParse(
|
|
131
|
+
jsonString,
|
|
132
|
+
(x) => ListAccountingCategoriesRequest$inboundSchema.parse(JSON.parse(x)),
|
|
133
|
+
`Failed to parse 'ListAccountingCategoriesRequest' from JSON`,
|
|
134
|
+
);
|
|
135
|
+
}
|