@chift/chift-nodejs 1.0.22 → 1.0.24
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 +37 -0
- package/dist/src/modules/accounting.d.ts +46 -42
- package/dist/src/modules/accounting.js +117 -42
- package/dist/src/modules/api.d.ts +13477 -11015
- package/dist/src/modules/banking.d.ts +13 -0
- package/dist/src/modules/banking.js +38 -0
- package/dist/src/modules/consumer.d.ts +2639 -2163
- package/dist/src/modules/consumer.js +3 -0
- package/dist/src/modules/consumers.d.ts +13432 -10982
- package/dist/src/modules/custom.d.ts +4 -4
- package/dist/src/modules/custom.js +6 -3
- package/dist/src/modules/datastores.d.ts +12 -6
- package/dist/src/modules/ecommerce.d.ts +18 -15
- package/dist/src/modules/ecommerce.js +32 -14
- package/dist/src/modules/flow.d.ts +2 -2
- package/dist/src/modules/integrations.d.ts +4 -2
- package/dist/src/modules/internalApi.js +8 -0
- package/dist/src/modules/invoicing.d.ts +16 -16
- package/dist/src/modules/invoicing.js +33 -18
- package/dist/src/modules/payment.d.ts +6 -6
- package/dist/src/modules/payment.js +10 -5
- package/dist/src/modules/pms.d.ts +8 -8
- package/dist/src/modules/pms.js +16 -8
- package/dist/src/modules/pos.d.ts +15 -15
- package/dist/src/modules/pos.js +29 -15
- package/dist/src/modules/sync.d.ts +10804 -8842
- package/dist/src/modules/webhooks.d.ts +12 -12
- package/dist/src/types/api.d.ts +8 -0
- package/dist/src/types/public-api/mappings.d.ts +128 -1
- package/dist/src/types/public-api/schema.d.ts +4575 -1985
- package/dist/test/modules/accounting.test.js +101 -28
- package/dist/test/modules/banking.test.d.ts +1 -0
- package/dist/test/modules/banking.test.js +94 -0
- package/dist/test/modules/client-request-id.test.d.ts +1 -0
- package/dist/test/modules/client-request-id.test.js +135 -0
- package/dist/test/modules/consumer.test.js +2 -2
- package/dist/test/modules/ecommerce.test.js +2 -1
- package/dist/test/modules/invoicing-pdf.test.d.ts +1 -0
- package/dist/test/modules/invoicing-pdf.test.js +34 -0
- package/dist/test/modules/invoicing.test.js +3 -1
- package/dist/test/modules/payment.test.js +5 -4
- package/dist/test/modules/raw-data.test.d.ts +1 -0
- package/dist/test/modules/raw-data.test.js +55 -0
- package/package.json +1 -1
- package/src/types/public-api/schema.d.ts +4575 -1985
package/README.md
CHANGED
|
@@ -40,6 +40,43 @@ const consumers = await client.Consumers.getConsumers();
|
|
|
40
40
|
const locations = await consumers[0].pos.getLocations();
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
### Idempotency with Client Request ID
|
|
46
|
+
|
|
47
|
+
The SDK supports idempotency for create and update operations using the `x-chift-client-requestid` header. This helps prevent duplicate resource creation. See [developer guide](https://docs.chift.eu/developer-guides/advanced/idempotency#idempotency)
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
// Create a client with idempotency
|
|
51
|
+
const client = await consumer.accounting.createClient({ name: 'Acme Corp' }, undefined, {
|
|
52
|
+
clientRequestId: 'unique-request-id-123',
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Update a client with idempotency
|
|
56
|
+
const updatedClient = await consumer.accounting.updateClient(
|
|
57
|
+
'client-id',
|
|
58
|
+
{ name: 'Acme Corporation' },
|
|
59
|
+
undefined,
|
|
60
|
+
{ clientRequestId: 'unique-update-id-456' }
|
|
61
|
+
);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Raw Data Access
|
|
65
|
+
|
|
66
|
+
The SDK supports accessing raw data from the API using the `rawData` parameter:
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// Get raw data from invoices
|
|
70
|
+
const rawInvoices = await consumer.accounting.getInvoicesByType(
|
|
71
|
+
'customer_invoice',
|
|
72
|
+
{},
|
|
73
|
+
{ rawData: true }
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
// Get raw data from orders
|
|
77
|
+
const rawOrders = await consumer.ecommerce.getOrders({}, { rawData: true });
|
|
78
|
+
```
|
|
79
|
+
|
|
43
80
|
## Development
|
|
44
81
|
|
|
45
82
|
How to generate the typescript schemas from the OpenAPI schema of Chift:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { operations, components } from '../types/public-api/schema';
|
|
2
|
-
import { AutoPaginatedParams, RequestData } from '../types/api';
|
|
2
|
+
import { AutoPaginatedParams, RequestData, RawDataOption, ClientRequestOption } from '../types/api';
|
|
3
3
|
type GetChartOfAccountsParams = AutoPaginatedParams<operations['accounting_get_chart_of_accounts']['parameters']['query']>;
|
|
4
4
|
type GetMiscOperationsParams = AutoPaginatedParams<operations['accounting_get_miscellaneous_operations']['parameters']['query']>;
|
|
5
5
|
type GetInvoicesByTypeWithMultiplePlansParams = AutoPaginatedParams<operations['accounting_get_invoices_by_type_multi_analytic_plans']['parameters']['query']>;
|
|
@@ -19,53 +19,57 @@ type GetAnalyticAccountsParams = AutoPaginatedParams<operations['accounting_get_
|
|
|
19
19
|
type GetAnalyticAccountsWithMultiplePlansParams = AutoPaginatedParams<operations['accounting_get_analytic_accounts_multi_plans']['parameters']['query']>;
|
|
20
20
|
type GetBookyearsParams = AutoPaginatedParams<operations['accounting_get_bookyears']['parameters']['query']>;
|
|
21
21
|
declare const accountingFactory: {
|
|
22
|
-
getAnalyticPlans(params?: GetAnalyticPlansParams): RequestData<components['schemas']['AnalyticPlanItem'][]>;
|
|
23
|
-
getClients(params?: GetClientsParams): RequestData<components['schemas']['ClientItemOut'][]>;
|
|
24
|
-
createClient(client: components['schemas']['ClientItemIn'], params?: operations['accounting_create_client']['parameters']['query']): RequestData<components['schemas']['ClientItemOut']>;
|
|
25
|
-
getClient(clientId: string, params?: operations['accounting_get_client']['parameters']['query']): RequestData<components['schemas']['ClientItemOut']>;
|
|
26
|
-
updateClient(clientId: string, client: components['schemas']['ClientItemUpdate'], params?: operations['accounting_update_client']['parameters']['query']): RequestData<components['schemas']['ClientItemOut']>;
|
|
27
|
-
getSuppliers(params?: GetSuppliersParams): RequestData<components['schemas']['SupplierItemOut'][]>;
|
|
28
|
-
createSupplier(supplier: components['schemas']['SupplierItemIn'], params?: operations['accounting_create_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
29
|
-
getSupplier(supplierId: string, params?: operations['accounting_get_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
30
|
-
updateSupplier(supplierId: string, supplier: components['schemas']['SupplierItemUpdate'], params?: operations['accounting_update_supplier']['parameters']['query']): RequestData<components['schemas']['SupplierItemOut']>;
|
|
31
|
-
createInvoice(invoice: components['schemas']['InvoiceItemInMonoAnalyticPlan'], params?: operations['accounting_create_invoice']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
32
|
-
createInvoiceWithMultiplePlans(invoice: components['schemas']['InvoiceItemInMultiAnalyticPlans'], params?: operations['accounting_create_invoice_multiple_plans']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
33
|
-
getInvoicesByType(invoice_type: components['schemas']['backbone_common__models__accounting__common__InvoiceType'], params?: GetInvoicesByTypeParams): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan'][]>;
|
|
34
|
-
getInvoice(invoiceId: string, params?: operations['accounting_get_invoice']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
35
|
-
getInvoiceWithMultiplePlans(invoiceId: string, params?: operations['accounting_get_invoice_multi_analytic_plans']['parameters']['query']): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
36
|
-
getInvoicesByTypeWithMultiplePlans(invoice_type: components['schemas']['backbone_common__models__accounting__common__InvoiceType'], params?: GetInvoicesByTypeWithMultiplePlansParams): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans'][]>;
|
|
37
|
-
createAnalyticAccount(analyticAccount: components['schemas']['AnalyticAccountItemIn'], params?: operations['accounting_create_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
38
|
-
getAnalyticAccounts(params?: GetAnalyticAccountsParams): RequestData<components['schemas']['AnalyticAccountItemOut'][]>;
|
|
39
|
-
createAnalyticAccountWithMultiplePlans(analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemIn'], params?: operations['accounting_create_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
40
|
-
getAnalyticAccount(analytic_account_id: string, params?: operations['accounting_get_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
41
|
-
updateAnalyticAccount(analytic_account_id: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate'], params?: operations['accounting_update_analytic_account']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
42
|
-
getAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, params?: operations['accounting_get_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
22
|
+
getAnalyticPlans(params?: GetAnalyticPlansParams, options?: RawDataOption): RequestData<components['schemas']['AnalyticPlanItem'][]>;
|
|
23
|
+
getClients(params?: GetClientsParams, options?: RawDataOption): RequestData<components['schemas']['ClientItemOut'][]>;
|
|
24
|
+
createClient(client: components['schemas']['ClientItemIn'], params?: operations['accounting_create_client']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['ClientItemOut']>;
|
|
25
|
+
getClient(clientId: string, params?: operations['accounting_get_client']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['ClientItemOut']>;
|
|
26
|
+
updateClient(clientId: string, client: components['schemas']['ClientItemUpdate'], params?: operations['accounting_update_client']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['ClientItemOut']>;
|
|
27
|
+
getSuppliers(params?: GetSuppliersParams, options?: RawDataOption): RequestData<components['schemas']['SupplierItemOut'][]>;
|
|
28
|
+
createSupplier(supplier: components['schemas']['SupplierItemIn'], params?: operations['accounting_create_supplier']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['SupplierItemOut']>;
|
|
29
|
+
getSupplier(supplierId: string, params?: operations['accounting_get_supplier']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['SupplierItemOut']>;
|
|
30
|
+
updateSupplier(supplierId: string, supplier: components['schemas']['SupplierItemUpdate'], params?: operations['accounting_update_supplier']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['SupplierItemOut']>;
|
|
31
|
+
createInvoice(invoice: components['schemas']['InvoiceItemInMonoAnalyticPlan'], params?: operations['accounting_create_invoice']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
32
|
+
createInvoiceWithMultiplePlans(invoice: components['schemas']['InvoiceItemInMultiAnalyticPlans'], params?: operations['accounting_create_invoice_multiple_plans']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
33
|
+
getInvoicesByType(invoice_type: components['schemas']['backbone_common__models__accounting__common__InvoiceType'], params?: GetInvoicesByTypeParams, options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan'][]>;
|
|
34
|
+
getInvoice(invoiceId: string, params?: operations['accounting_get_invoice']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOutMonoAnalyticPlan']>;
|
|
35
|
+
getInvoiceWithMultiplePlans(invoiceId: string, params?: operations['accounting_get_invoice_multi_analytic_plans']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans']>;
|
|
36
|
+
getInvoicesByTypeWithMultiplePlans(invoice_type: components['schemas']['backbone_common__models__accounting__common__InvoiceType'], params?: GetInvoicesByTypeWithMultiplePlansParams, options?: RawDataOption): RequestData<components['schemas']['InvoiceItemOutMultiAnalyticPlans'][]>;
|
|
37
|
+
createAnalyticAccount(analyticAccount: components['schemas']['AnalyticAccountItemIn'], params?: operations['accounting_create_analytic_account']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
38
|
+
getAnalyticAccounts(params?: GetAnalyticAccountsParams, options?: RawDataOption): RequestData<components['schemas']['AnalyticAccountItemOut'][]>;
|
|
39
|
+
createAnalyticAccountWithMultiplePlans(analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemIn'], params?: operations['accounting_create_analytic_account_multi_plans']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
40
|
+
getAnalyticAccount(analytic_account_id: string, params?: operations['accounting_get_analytic_account']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
41
|
+
updateAnalyticAccount(analytic_account_id: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate'], params?: operations['accounting_update_analytic_account']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['AnalyticAccountItemOut']>;
|
|
42
|
+
getAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, params?: operations['accounting_get_analytic_account_multi_plans']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
43
43
|
updateAnalyticAccountWithMultiplePlans(analytic_account_id: string, analytic_plan: string, analyticAccount: components['schemas']['AnalyticAccountItemUpdate'], params?: operations['accounting_update_analytic_account_multi_plans']['parameters']['query']): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans']>;
|
|
44
|
-
getAnalyticAccountsWithMultiplePlans(params?: GetAnalyticAccountsWithMultiplePlansParams): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans'][]>;
|
|
45
|
-
getJournalEntries(params: GetJournalEntriesParams): RequestData<components['schemas']['JournalEntryMonoAnalyticPlan'][]>;
|
|
46
|
-
getJournalEntriesWithMultiplePlans(params: GetJournalEntriesWithMultiplePlansParams): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan'][]>;
|
|
47
|
-
getPaymentsByInvoiceId(invoice_id: string, params?: operations['accounting_get_payments_by_invoice']['parameters']['query']): RequestData<components['schemas']['Payment'][]>;
|
|
48
|
-
getJournals(params?: GetJournalsParams): RequestData<components['schemas']['Journal'][]>;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
getAnalyticAccountsWithMultiplePlans(params?: GetAnalyticAccountsWithMultiplePlansParams, options?: RawDataOption): RequestData<components['schemas']['AnalyticAccountItemOutMultiAnalyticPlans'][]>;
|
|
45
|
+
getJournalEntries(params: GetJournalEntriesParams, options?: RawDataOption): RequestData<components['schemas']['JournalEntryMonoAnalyticPlan'][]>;
|
|
46
|
+
getJournalEntriesWithMultiplePlans(params: GetJournalEntriesWithMultiplePlansParams, options?: RawDataOption): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan'][]>;
|
|
47
|
+
getPaymentsByInvoiceId(invoice_id: string, params?: operations['accounting_get_payments_by_invoice']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['Payment'][]>;
|
|
48
|
+
getJournals(params?: GetJournalsParams, options?: RawDataOption): RequestData<components['schemas']['Journal'][]>;
|
|
49
|
+
createJournal(journal: components['schemas']['JournalIn'], params?: operations['accounting_create_journal']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['Journal']>;
|
|
50
|
+
getVatCodes(params?: GetVatCodesParams, options?: RawDataOption): RequestData<components['schemas']['AccountingVatCode'][]>;
|
|
51
|
+
getMiscOperations(params?: GetMiscOperationsParams, options?: RawDataOption): RequestData<components['schemas']['MiscellaneousOperationOut'][]>;
|
|
52
|
+
createMiscOperation(operation: components['schemas']['MiscellaneousOperationIn'], params?: operations['accounting_create_miscellaneous_operation']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
53
|
+
getMiscOperation(operation_id: string, params?: operations['accounting_get_miscellaneous_operation']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['MiscellaneousOperationOut']>;
|
|
54
|
+
attachPDF(invoice_id: string, attachment: components['schemas']['AttachmentItem'], params?: operations['accounting_add_attachment']['parameters']['query']): RequestData<operations['accounting_add_attachment']['responses'][204]>;
|
|
55
|
+
getAttachments(params: GetAttachmentsParams, options?: RawDataOption): RequestData<components['schemas']['AttachmentItem'][]>;
|
|
56
|
+
getChartOfAccounts(params?: GetChartOfAccountsParams, options?: RawDataOption): RequestData<components['schemas']['AccountItem'][]>;
|
|
56
57
|
getBalanceOfAccounts(filter: components['schemas']['AccountBalanceFilter'], params?: GetBalanceOfAccountsParams): RequestData<components['schemas']['AccountBalance'][]>;
|
|
57
|
-
getEmployees(params?: GetEmployeesParams): RequestData<components['schemas']['EmployeeItem'][]>;
|
|
58
|
-
getOutstandings(params: GetOutstandingsParams): RequestData<components['schemas']['OutstandingItem'][]>;
|
|
58
|
+
getEmployees(params?: GetEmployeesParams, options?: RawDataOption): RequestData<components['schemas']['EmployeeItem'][]>;
|
|
59
|
+
getOutstandings(params: GetOutstandingsParams, options?: RawDataOption): RequestData<components['schemas']['OutstandingItem'][]>;
|
|
59
60
|
/**
|
|
60
61
|
* @deprecated replaced by createFinancialEntry
|
|
61
62
|
*/
|
|
62
|
-
createFinancialEntryOld(financial_entry: components['schemas']['FinancialEntryItemInOld'], params?: operations['accounting_create_financial_entry']['parameters']['query']): RequestData<components['schemas']['FinancialEntryItemOutOld']>;
|
|
63
|
-
createFinancialEntry(financial_entry: components['schemas']['FinancialEntryItemIn'], params?: operations['accounting_create_financial_entries']['parameters']['query']): RequestData<components['schemas']['FinancialEntryItemOut']
|
|
64
|
-
createJournalEntryOld(journal_entry: components['schemas']['JournalEntryIn']): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
65
|
-
createJournalEntry(journal_entry: components['schemas']['GenericJournalEntry'], params?: operations['accounting_create_generic_journal_entry']['parameters']['query']): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
63
|
+
createFinancialEntryOld(financial_entry: components['schemas']['FinancialEntryItemInOld'], params?: operations['accounting_create_financial_entry']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['FinancialEntryItemOutOld']>;
|
|
64
|
+
createFinancialEntry(financial_entry: components['schemas']['FinancialEntryItemIn'], params?: operations['accounting_create_financial_entries']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['FinancialEntryItemOut']>;
|
|
65
|
+
createJournalEntryOld(journal_entry: components['schemas']['JournalEntryIn'], options?: ClientRequestOption): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
66
|
+
createJournalEntry(journal_entry: components['schemas']['GenericJournalEntry'], params?: operations['accounting_create_generic_journal_entry']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
66
67
|
matchEntries(body: components['schemas']['MatchingIn'], params?: operations['accounting_match_entries']['parameters']['query']): RequestData<components['schemas']['MatchingOut']>;
|
|
67
68
|
matchEntriesMultiple(body: components['schemas']['MultipleMatchingIn'], params?: operations['accounting_match_entries_multiple']['parameters']['query']): RequestData<components['schemas']['MultipleMatchingOut'][]>;
|
|
68
|
-
getFolders(): RequestData<components['schemas']['FolderItem'][]>;
|
|
69
|
-
getBookyears(params?: GetBookyearsParams): RequestData<components['schemas']['BookYear'][]>;
|
|
69
|
+
getFolders(options?: RawDataOption): RequestData<components['schemas']['FolderItem'][]>;
|
|
70
|
+
getBookyears(params?: GetBookyearsParams, options?: RawDataOption): RequestData<components['schemas']['BookYear'][]>;
|
|
71
|
+
createLedgerAccount(account: components['schemas']['LedgerAccountItemIn'], params?: operations['accounting_create_ledger_account']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['AccountItem']>;
|
|
72
|
+
createBankAccount(bankAccount: components['schemas']['BankAccountItemIn'], params?: operations['accounting_create_bank_account']['parameters']['query'], options?: ClientRequestOption): RequestData<components['schemas']['BankAccountItemOut']>;
|
|
73
|
+
getJournalEntry(journalEntryId: string, params?: operations['accounting_get_journal_entry']['parameters']['query'], options?: RawDataOption): RequestData<components['schemas']['JournalEntryMultiAnalyticPlan']>;
|
|
70
74
|
};
|
|
71
75
|
export { accountingFactory };
|
|
@@ -2,160 +2,181 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.accountingFactory = void 0;
|
|
4
4
|
const accountingFactory = {
|
|
5
|
-
getAnalyticPlans(params) {
|
|
5
|
+
getAnalyticPlans(params, options) {
|
|
6
6
|
return {
|
|
7
7
|
params,
|
|
8
8
|
method: 'get',
|
|
9
9
|
url: '/consumers/{consumer_id}/accounting/analytic-plans',
|
|
10
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
10
11
|
};
|
|
11
12
|
},
|
|
12
|
-
getClients(params) {
|
|
13
|
+
getClients(params, options) {
|
|
13
14
|
return {
|
|
14
15
|
params,
|
|
15
16
|
method: 'get',
|
|
16
17
|
url: '/consumers/{consumer_id}/accounting/clients',
|
|
18
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
17
19
|
};
|
|
18
20
|
},
|
|
19
|
-
createClient(client, params) {
|
|
21
|
+
createClient(client, params, options) {
|
|
20
22
|
return {
|
|
21
23
|
params,
|
|
22
24
|
method: 'post',
|
|
23
25
|
url: '/consumers/{consumer_id}/accounting/clients',
|
|
24
26
|
body: client,
|
|
27
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
25
28
|
};
|
|
26
29
|
},
|
|
27
|
-
getClient(clientId, params) {
|
|
30
|
+
getClient(clientId, params, options) {
|
|
28
31
|
return {
|
|
29
32
|
params,
|
|
30
33
|
method: 'get',
|
|
31
34
|
url: `/consumers/{consumer_id}/accounting/clients/${clientId}`,
|
|
35
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
32
36
|
};
|
|
33
37
|
},
|
|
34
|
-
updateClient(clientId, client, params) {
|
|
38
|
+
updateClient(clientId, client, params, options) {
|
|
35
39
|
return {
|
|
36
40
|
params,
|
|
37
41
|
method: 'patch',
|
|
38
42
|
url: `/consumers/{consumer_id}/accounting/clients/${clientId}`,
|
|
39
43
|
body: client,
|
|
44
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
40
45
|
};
|
|
41
46
|
},
|
|
42
|
-
getSuppliers(params) {
|
|
47
|
+
getSuppliers(params, options) {
|
|
43
48
|
return {
|
|
44
49
|
params,
|
|
45
50
|
method: 'get',
|
|
46
51
|
url: '/consumers/{consumer_id}/accounting/suppliers',
|
|
52
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
47
53
|
};
|
|
48
54
|
},
|
|
49
|
-
createSupplier(supplier, params) {
|
|
55
|
+
createSupplier(supplier, params, options) {
|
|
50
56
|
return {
|
|
51
57
|
params,
|
|
52
58
|
method: 'post',
|
|
53
59
|
url: '/consumers/{consumer_id}/accounting/suppliers',
|
|
54
60
|
body: supplier,
|
|
61
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
55
62
|
};
|
|
56
63
|
},
|
|
57
|
-
getSupplier(supplierId, params) {
|
|
64
|
+
getSupplier(supplierId, params, options) {
|
|
58
65
|
return {
|
|
59
66
|
params,
|
|
60
67
|
method: 'get',
|
|
61
68
|
url: `/consumers/{consumer_id}/accounting/suppliers/${supplierId}`,
|
|
69
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
62
70
|
};
|
|
63
71
|
},
|
|
64
|
-
updateSupplier(supplierId, supplier, params) {
|
|
72
|
+
updateSupplier(supplierId, supplier, params, options) {
|
|
65
73
|
return {
|
|
66
74
|
params,
|
|
67
75
|
method: 'patch',
|
|
68
76
|
url: `/consumers/{consumer_id}/accounting/suppliers/${supplierId}`,
|
|
69
77
|
body: supplier,
|
|
78
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
70
79
|
};
|
|
71
80
|
},
|
|
72
|
-
createInvoice(invoice, params) {
|
|
81
|
+
createInvoice(invoice, params, options) {
|
|
73
82
|
return {
|
|
74
83
|
params,
|
|
75
84
|
method: 'post',
|
|
76
85
|
url: '/consumers/{consumer_id}/accounting/invoices',
|
|
77
86
|
body: invoice,
|
|
87
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
78
88
|
};
|
|
79
89
|
},
|
|
80
|
-
createInvoiceWithMultiplePlans(invoice, params) {
|
|
90
|
+
createInvoiceWithMultiplePlans(invoice, params, options) {
|
|
81
91
|
return {
|
|
82
92
|
params,
|
|
83
93
|
method: 'post',
|
|
84
94
|
url: '/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans',
|
|
85
95
|
body: invoice,
|
|
96
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
86
97
|
};
|
|
87
98
|
},
|
|
88
|
-
getInvoicesByType(invoice_type, params) {
|
|
99
|
+
getInvoicesByType(invoice_type, params, options) {
|
|
89
100
|
return {
|
|
90
101
|
params,
|
|
91
102
|
method: 'get',
|
|
92
103
|
url: `/consumers/{consumer_id}/accounting/invoices/type/${invoice_type}`,
|
|
104
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
93
105
|
};
|
|
94
106
|
},
|
|
95
|
-
getInvoice(invoiceId, params) {
|
|
107
|
+
getInvoice(invoiceId, params, options) {
|
|
96
108
|
return {
|
|
97
109
|
params,
|
|
98
110
|
method: 'get',
|
|
99
111
|
url: `/consumers/{consumer_id}/accounting/invoices/${invoiceId}`,
|
|
112
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
100
113
|
};
|
|
101
114
|
},
|
|
102
|
-
getInvoiceWithMultiplePlans(invoiceId, params) {
|
|
115
|
+
getInvoiceWithMultiplePlans(invoiceId, params, options) {
|
|
103
116
|
return {
|
|
104
117
|
params,
|
|
105
118
|
method: 'get',
|
|
106
119
|
url: `/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans/${invoiceId}`,
|
|
120
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
107
121
|
};
|
|
108
122
|
},
|
|
109
|
-
getInvoicesByTypeWithMultiplePlans(invoice_type, params) {
|
|
123
|
+
getInvoicesByTypeWithMultiplePlans(invoice_type, params, options) {
|
|
110
124
|
return {
|
|
111
125
|
params,
|
|
112
126
|
method: 'get',
|
|
113
127
|
url: `/consumers/{consumer_id}/accounting/invoices/multi-analytic-plans/type/${invoice_type}`,
|
|
128
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
114
129
|
};
|
|
115
130
|
},
|
|
116
|
-
createAnalyticAccount(analyticAccount, params) {
|
|
131
|
+
createAnalyticAccount(analyticAccount, params, options) {
|
|
117
132
|
return {
|
|
118
133
|
params,
|
|
119
134
|
method: 'post',
|
|
120
135
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts',
|
|
121
136
|
body: analyticAccount,
|
|
137
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
122
138
|
};
|
|
123
139
|
},
|
|
124
|
-
getAnalyticAccounts(params) {
|
|
140
|
+
getAnalyticAccounts(params, options) {
|
|
125
141
|
return {
|
|
126
142
|
params,
|
|
127
143
|
method: 'get',
|
|
128
144
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts',
|
|
145
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
129
146
|
};
|
|
130
147
|
},
|
|
131
|
-
createAnalyticAccountWithMultiplePlans(analytic_plan, analyticAccount, params) {
|
|
148
|
+
createAnalyticAccountWithMultiplePlans(analytic_plan, analyticAccount, params, options) {
|
|
132
149
|
return {
|
|
133
150
|
params,
|
|
134
151
|
method: 'post',
|
|
135
152
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans/${analytic_plan}`,
|
|
136
153
|
body: analyticAccount,
|
|
154
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
137
155
|
};
|
|
138
156
|
},
|
|
139
|
-
getAnalyticAccount(analytic_account_id, params) {
|
|
157
|
+
getAnalyticAccount(analytic_account_id, params, options) {
|
|
140
158
|
return {
|
|
141
159
|
params,
|
|
142
160
|
method: 'get',
|
|
143
161
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}`,
|
|
162
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
144
163
|
};
|
|
145
164
|
},
|
|
146
|
-
updateAnalyticAccount(analytic_account_id, analyticAccount, params) {
|
|
165
|
+
updateAnalyticAccount(analytic_account_id, analyticAccount, params, options) {
|
|
147
166
|
return {
|
|
148
167
|
params,
|
|
149
168
|
method: 'patch',
|
|
150
169
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}`,
|
|
151
170
|
body: analyticAccount,
|
|
171
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
152
172
|
};
|
|
153
173
|
},
|
|
154
|
-
getAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, params) {
|
|
174
|
+
getAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, params, options) {
|
|
155
175
|
return {
|
|
156
176
|
params,
|
|
157
177
|
method: 'get',
|
|
158
178
|
url: `/consumers/{consumer_id}/accounting/analytic-accounts/${analytic_account_id}/multi-analytic-plans/${analytic_plan}`,
|
|
179
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
159
180
|
};
|
|
160
181
|
},
|
|
161
182
|
updateAnalyticAccountWithMultiplePlans(analytic_account_id, analytic_plan, analyticAccount, params) {
|
|
@@ -166,68 +187,86 @@ const accountingFactory = {
|
|
|
166
187
|
body: analyticAccount,
|
|
167
188
|
};
|
|
168
189
|
},
|
|
169
|
-
getAnalyticAccountsWithMultiplePlans(params) {
|
|
190
|
+
getAnalyticAccountsWithMultiplePlans(params, options) {
|
|
170
191
|
return {
|
|
171
192
|
params,
|
|
172
193
|
method: 'get',
|
|
173
194
|
url: '/consumers/{consumer_id}/accounting/analytic-accounts/multi-analytic-plans',
|
|
195
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
174
196
|
};
|
|
175
197
|
},
|
|
176
|
-
getJournalEntries(params) {
|
|
198
|
+
getJournalEntries(params, options) {
|
|
177
199
|
return {
|
|
178
200
|
params,
|
|
179
201
|
method: 'get',
|
|
180
202
|
url: `/consumers/{consumer_id}/accounting/journal/entries`,
|
|
203
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
181
204
|
};
|
|
182
205
|
},
|
|
183
|
-
getJournalEntriesWithMultiplePlans(params) {
|
|
206
|
+
getJournalEntriesWithMultiplePlans(params, options) {
|
|
184
207
|
return {
|
|
185
208
|
params,
|
|
186
209
|
method: 'get',
|
|
187
210
|
url: `/consumers/{consumer_id}/accounting/journal/entries/multi-analytic-plans`,
|
|
211
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
188
212
|
};
|
|
189
213
|
},
|
|
190
|
-
getPaymentsByInvoiceId(invoice_id, params) {
|
|
214
|
+
getPaymentsByInvoiceId(invoice_id, params, options) {
|
|
191
215
|
return {
|
|
192
216
|
params,
|
|
193
217
|
method: 'get',
|
|
194
218
|
url: `/consumers/{consumer_id}/accounting/invoices/id/${invoice_id}/payments`,
|
|
219
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
195
220
|
};
|
|
196
221
|
},
|
|
197
|
-
getJournals(params) {
|
|
222
|
+
getJournals(params, options) {
|
|
198
223
|
return {
|
|
199
224
|
params,
|
|
200
225
|
method: 'get',
|
|
201
226
|
url: `/consumers/{consumer_id}/accounting/journals`,
|
|
227
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
202
228
|
};
|
|
203
229
|
},
|
|
204
|
-
|
|
230
|
+
createJournal(journal, params, options) {
|
|
231
|
+
return {
|
|
232
|
+
params,
|
|
233
|
+
method: 'post',
|
|
234
|
+
url: '/consumers/{consumer_id}/accounting/journals',
|
|
235
|
+
body: journal,
|
|
236
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
getVatCodes(params, options) {
|
|
205
240
|
return {
|
|
206
241
|
params,
|
|
207
242
|
method: 'get',
|
|
208
243
|
url: `/consumers/{consumer_id}/accounting/vat-codes`,
|
|
244
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
209
245
|
};
|
|
210
246
|
},
|
|
211
|
-
getMiscOperations(params) {
|
|
247
|
+
getMiscOperations(params, options) {
|
|
212
248
|
return {
|
|
213
249
|
params,
|
|
214
250
|
method: 'get',
|
|
215
251
|
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
252
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
216
253
|
};
|
|
217
254
|
},
|
|
218
|
-
createMiscOperation(operation, params) {
|
|
255
|
+
createMiscOperation(operation, params, options) {
|
|
219
256
|
return {
|
|
220
257
|
params,
|
|
221
258
|
method: 'post',
|
|
222
259
|
url: '/consumers/{consumer_id}/accounting/miscellaneous-operation',
|
|
223
260
|
body: operation,
|
|
261
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
224
262
|
};
|
|
225
263
|
},
|
|
226
|
-
getMiscOperation(operation_id, params) {
|
|
264
|
+
getMiscOperation(operation_id, params, options) {
|
|
227
265
|
return {
|
|
228
266
|
params,
|
|
229
267
|
method: 'get',
|
|
230
268
|
url: `/consumers/{consumer_id}/accounting/miscellaneous-operation/${operation_id}`,
|
|
269
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
231
270
|
};
|
|
232
271
|
},
|
|
233
272
|
attachPDF(invoice_id, attachment, params) {
|
|
@@ -238,18 +277,20 @@ const accountingFactory = {
|
|
|
238
277
|
body: attachment,
|
|
239
278
|
};
|
|
240
279
|
},
|
|
241
|
-
getAttachments(params) {
|
|
280
|
+
getAttachments(params, options) {
|
|
242
281
|
return {
|
|
243
282
|
params,
|
|
244
283
|
method: 'get',
|
|
245
284
|
url: `/consumers/{consumer_id}/accounting/attachments`,
|
|
285
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
246
286
|
};
|
|
247
287
|
},
|
|
248
|
-
getChartOfAccounts(params) {
|
|
288
|
+
getChartOfAccounts(params, options) {
|
|
249
289
|
return {
|
|
250
290
|
params,
|
|
251
291
|
method: 'get',
|
|
252
292
|
url: '/consumers/{consumer_id}/accounting/chart-of-accounts',
|
|
293
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
253
294
|
};
|
|
254
295
|
},
|
|
255
296
|
getBalanceOfAccounts(filter, params) {
|
|
@@ -260,81 +301,115 @@ const accountingFactory = {
|
|
|
260
301
|
body: filter,
|
|
261
302
|
};
|
|
262
303
|
},
|
|
263
|
-
getEmployees(params) {
|
|
304
|
+
getEmployees(params, options) {
|
|
264
305
|
return {
|
|
265
306
|
params,
|
|
266
307
|
method: 'get',
|
|
267
308
|
url: '/consumers/{consumer_id}/accounting/employees',
|
|
309
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
268
310
|
};
|
|
269
311
|
},
|
|
270
|
-
getOutstandings(params) {
|
|
312
|
+
getOutstandings(params, options) {
|
|
271
313
|
return {
|
|
272
314
|
params,
|
|
273
315
|
method: 'get',
|
|
274
316
|
url: '/consumers/{consumer_id}/accounting/outstandings',
|
|
317
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
275
318
|
};
|
|
276
319
|
},
|
|
277
320
|
/**
|
|
278
321
|
* @deprecated replaced by createFinancialEntry
|
|
279
322
|
*/
|
|
280
|
-
createFinancialEntryOld(financial_entry, params) {
|
|
323
|
+
createFinancialEntryOld(financial_entry, params, options) {
|
|
281
324
|
return {
|
|
282
325
|
params,
|
|
283
326
|
method: 'post',
|
|
284
327
|
url: '/consumers/{consumer_id}/accounting/financial-entry',
|
|
285
328
|
body: financial_entry,
|
|
329
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
286
330
|
};
|
|
287
331
|
},
|
|
288
|
-
createFinancialEntry(financial_entry, params) {
|
|
332
|
+
createFinancialEntry(financial_entry, params, options) {
|
|
289
333
|
return {
|
|
290
334
|
params,
|
|
291
335
|
method: 'post',
|
|
292
336
|
url: '/consumers/{consumer_id}/accounting/financial-entries',
|
|
293
337
|
body: financial_entry,
|
|
338
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
294
339
|
};
|
|
295
340
|
},
|
|
296
|
-
createJournalEntryOld(journal_entry) {
|
|
341
|
+
createJournalEntryOld(journal_entry, options) {
|
|
297
342
|
return {
|
|
298
343
|
method: 'post',
|
|
299
344
|
url: '/consumers/{consumer_id}/accounting/journal/entries',
|
|
300
345
|
body: journal_entry,
|
|
346
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
301
347
|
};
|
|
302
348
|
},
|
|
303
|
-
createJournalEntry(journal_entry, params) {
|
|
349
|
+
createJournalEntry(journal_entry, params, options) {
|
|
304
350
|
return {
|
|
305
351
|
params,
|
|
306
352
|
method: 'post',
|
|
307
353
|
url: '/consumers/{consumer_id}/accounting/journal-entries',
|
|
308
354
|
body: journal_entry,
|
|
355
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
309
356
|
};
|
|
310
357
|
},
|
|
311
358
|
matchEntries(body, params) {
|
|
312
359
|
return {
|
|
313
360
|
params,
|
|
314
|
-
body,
|
|
315
361
|
method: 'post',
|
|
316
362
|
url: '/consumers/{consumer_id}/accounting/matching',
|
|
363
|
+
body,
|
|
317
364
|
};
|
|
318
365
|
},
|
|
319
366
|
matchEntriesMultiple(body, params) {
|
|
320
367
|
return {
|
|
321
368
|
params,
|
|
322
|
-
body,
|
|
323
369
|
method: 'post',
|
|
324
370
|
url: '/consumers/{consumer_id}/accounting/matching-multiple',
|
|
371
|
+
body,
|
|
325
372
|
};
|
|
326
373
|
},
|
|
327
|
-
getFolders() {
|
|
374
|
+
getFolders(options) {
|
|
328
375
|
return {
|
|
329
376
|
method: 'get',
|
|
330
377
|
url: '/consumers/{consumer_id}/accounting/folders',
|
|
378
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
331
379
|
};
|
|
332
380
|
},
|
|
333
|
-
getBookyears(params) {
|
|
381
|
+
getBookyears(params, options) {
|
|
334
382
|
return {
|
|
335
383
|
params,
|
|
336
384
|
method: 'get',
|
|
337
385
|
url: '/consumers/{consumer_id}/accounting/bookyears',
|
|
386
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
387
|
+
};
|
|
388
|
+
},
|
|
389
|
+
createLedgerAccount(account, params, options) {
|
|
390
|
+
return {
|
|
391
|
+
params,
|
|
392
|
+
method: 'post',
|
|
393
|
+
url: '/consumers/{consumer_id}/accounting/accounts',
|
|
394
|
+
body: account,
|
|
395
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
396
|
+
};
|
|
397
|
+
},
|
|
398
|
+
createBankAccount(bankAccount, params, options) {
|
|
399
|
+
return {
|
|
400
|
+
params,
|
|
401
|
+
method: 'post',
|
|
402
|
+
url: '/consumers/{consumer_id}/accounting/bank-accounts',
|
|
403
|
+
body: bankAccount,
|
|
404
|
+
clientRequestId: options === null || options === void 0 ? void 0 : options.clientRequestId,
|
|
405
|
+
};
|
|
406
|
+
},
|
|
407
|
+
getJournalEntry(journalEntryId, params, options) {
|
|
408
|
+
return {
|
|
409
|
+
params,
|
|
410
|
+
method: 'get',
|
|
411
|
+
url: `/consumers/{consumer_id}/accounting/journal/entries/${journalEntryId}`,
|
|
412
|
+
rawData: options === null || options === void 0 ? void 0 : options.rawData,
|
|
338
413
|
};
|
|
339
414
|
},
|
|
340
415
|
};
|