@codat/lending 1.1.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -48
- package/dist/sdk/accountingbankdata.d.ts +1 -1
- package/dist/sdk/accountingbankdata.js +1 -1
- package/dist/sdk/accountspayable.d.ts +4 -38
- package/dist/sdk/accountspayable.js +5 -264
- package/dist/sdk/accountspayablebills.d.ts +28 -0
- package/dist/sdk/accountspayablebills.js +183 -1
- package/dist/sdk/accountsreceivable.d.ts +6 -6
- package/dist/sdk/accountsreceivable.js +6 -6
- package/dist/sdk/banking.d.ts +5 -5
- package/dist/sdk/banking.js +5 -5
- package/dist/sdk/financialstatements.d.ts +4 -4
- package/dist/sdk/financialstatements.js +4 -4
- package/dist/sdk/managedata.d.ts +2 -2
- package/dist/sdk/managedata.js +2 -2
- package/dist/sdk/sales.d.ts +11 -11
- package/dist/sdk/sales.js +11 -11
- package/dist/sdk/sdk.d.ts +1 -4
- package/dist/sdk/sdk.js +3 -3
- package/dist/sdk/transactions.d.ts +5 -5
- package/dist/sdk/transactions.js +5 -5
- package/docs/sdks/accountspayable/README.md +0 -100
- package/docs/sdks/accountspayablebillcreditnotes/README.md +2 -2
- package/docs/sdks/accountspayablebillpayments/README.md +2 -2
- package/docs/sdks/accountspayablebills/README.md +99 -3
- package/docs/sdks/accountspayablesuppliers/README.md +5 -5
- package/docs/sdks/bankingaccounts/README.md +3 -3
- package/docs/sdks/bankingtransactions/README.md +3 -3
- package/docs/sdks/companies/README.md +1 -1
- package/docs/sdks/connections/README.md +3 -3
- package/docs/sdks/dataintegrity/README.md +2 -2
- package/docs/sdks/excelreports/README.md +3 -3
- package/docs/sdks/fileupload/README.md +2 -2
- package/docs/sdks/liabilities/README.md +1 -1
- package/docs/sdks/salescustomers/README.md +3 -3
- package/docs/sdks/salesdisputes/README.md +3 -3
- package/docs/sdks/saleslocations/README.md +3 -3
- package/docs/sdks/salesmetrics/README.md +4 -4
- package/docs/sdks/salesorders/README.md +3 -3
- package/docs/sdks/salespayments/README.md +3 -3
- package/docs/sdks/salesproducts/README.md +3 -3
- package/docs/sdks/salesreports/README.md +3 -3
- package/docs/sdks/salestransactions/README.md +3 -3
- package/docs/sdks/transactionsjournals/README.md +3 -3
- package/docs/sdks/transactionstransfers/README.md +3 -3
- package/package.json +1 -1
|
@@ -73,15 +73,111 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
-
exports.AccountsPayableBills = void 0;
|
|
76
|
+
exports.AccountsPayableBills = exports.DownloadAttachmentAcceptEnum = void 0;
|
|
77
77
|
var utils = __importStar(require("../internal/utils"));
|
|
78
78
|
var errors = __importStar(require("./models/errors"));
|
|
79
79
|
var operations = __importStar(require("./models/operations"));
|
|
80
80
|
var shared = __importStar(require("./models/shared"));
|
|
81
|
+
var DownloadAttachmentAcceptEnum;
|
|
82
|
+
(function (DownloadAttachmentAcceptEnum) {
|
|
83
|
+
DownloadAttachmentAcceptEnum["applicationJson"] = "application/json";
|
|
84
|
+
DownloadAttachmentAcceptEnum["applicationOctetStream"] = "application/octet-stream";
|
|
85
|
+
})(DownloadAttachmentAcceptEnum = exports.DownloadAttachmentAcceptEnum || (exports.DownloadAttachmentAcceptEnum = {}));
|
|
81
86
|
var AccountsPayableBills = /** @class */ (function () {
|
|
82
87
|
function AccountsPayableBills(sdkConfig) {
|
|
83
88
|
this.sdkConfiguration = sdkConfig;
|
|
84
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Download bill attachment
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`.
|
|
95
|
+
*
|
|
96
|
+
* [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
97
|
+
*
|
|
98
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment.
|
|
99
|
+
*
|
|
100
|
+
*/
|
|
101
|
+
AccountsPayableBills.prototype.downloadAttachment = function (req, retries, config, acceptHeaderOverride) {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
105
|
+
return __generator(this, function (_c) {
|
|
106
|
+
switch (_c.label) {
|
|
107
|
+
case 0:
|
|
108
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
109
|
+
req = new operations.DownloadAccountingBillAttachmentRequest(req);
|
|
110
|
+
}
|
|
111
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
112
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download", req);
|
|
113
|
+
client = this.sdkConfiguration.defaultClient;
|
|
114
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
115
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
116
|
+
return [4 /*yield*/, globalSecurity()];
|
|
117
|
+
case 1:
|
|
118
|
+
globalSecurity = _c.sent();
|
|
119
|
+
_c.label = 2;
|
|
120
|
+
case 2:
|
|
121
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
122
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
123
|
+
}
|
|
124
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
125
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
126
|
+
if (acceptHeaderOverride !== undefined) {
|
|
127
|
+
headers["Accept"] = acceptHeaderOverride.toString();
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
headers["Accept"] = "application/json;q=1, application/octet-stream;q=0";
|
|
131
|
+
}
|
|
132
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
133
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
134
|
+
retryConfig = retries;
|
|
135
|
+
if (!retryConfig) {
|
|
136
|
+
if (globalRetryConfig) {
|
|
137
|
+
retryConfig = globalRetryConfig;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
144
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
145
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
146
|
+
case 3:
|
|
147
|
+
httpRes = _c.sent();
|
|
148
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
149
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
150
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
151
|
+
}
|
|
152
|
+
res = new operations.DownloadAccountingBillAttachmentResponse({
|
|
153
|
+
statusCode: httpRes.status,
|
|
154
|
+
contentType: contentType,
|
|
155
|
+
rawResponse: httpRes,
|
|
156
|
+
});
|
|
157
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
158
|
+
switch (true) {
|
|
159
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
160
|
+
if (utils.matchContentType(contentType, "application/octet-stream")) {
|
|
161
|
+
res.data = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
165
|
+
}
|
|
166
|
+
break;
|
|
167
|
+
case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
168
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
169
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
173
|
+
}
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
return [2 /*return*/, res];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
85
181
|
/**
|
|
86
182
|
* Get bill
|
|
87
183
|
*
|
|
@@ -170,6 +266,92 @@ var AccountsPayableBills = /** @class */ (function () {
|
|
|
170
266
|
});
|
|
171
267
|
});
|
|
172
268
|
};
|
|
269
|
+
/**
|
|
270
|
+
* Get bill attachment
|
|
271
|
+
*
|
|
272
|
+
* @remarks
|
|
273
|
+
* The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`.
|
|
274
|
+
*
|
|
275
|
+
* [Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
276
|
+
*
|
|
277
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment.
|
|
278
|
+
*
|
|
279
|
+
*/
|
|
280
|
+
AccountsPayableBills.prototype.getAttachment = function (req, retries, config) {
|
|
281
|
+
var _a, _b;
|
|
282
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
283
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
284
|
+
return __generator(this, function (_c) {
|
|
285
|
+
switch (_c.label) {
|
|
286
|
+
case 0:
|
|
287
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
288
|
+
req = new operations.GetAccountingBillAttachmentRequest(req);
|
|
289
|
+
}
|
|
290
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
291
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}", req);
|
|
292
|
+
client = this.sdkConfiguration.defaultClient;
|
|
293
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
294
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
295
|
+
return [4 /*yield*/, globalSecurity()];
|
|
296
|
+
case 1:
|
|
297
|
+
globalSecurity = _c.sent();
|
|
298
|
+
_c.label = 2;
|
|
299
|
+
case 2:
|
|
300
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
301
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
302
|
+
}
|
|
303
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
304
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
305
|
+
headers["Accept"] = "application/json";
|
|
306
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
307
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
308
|
+
retryConfig = retries;
|
|
309
|
+
if (!retryConfig) {
|
|
310
|
+
if (globalRetryConfig) {
|
|
311
|
+
retryConfig = globalRetryConfig;
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
318
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
319
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
320
|
+
case 3:
|
|
321
|
+
httpRes = _c.sent();
|
|
322
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
323
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
324
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
325
|
+
}
|
|
326
|
+
res = new operations.GetAccountingBillAttachmentResponse({
|
|
327
|
+
statusCode: httpRes.status,
|
|
328
|
+
contentType: contentType,
|
|
329
|
+
rawResponse: httpRes,
|
|
330
|
+
});
|
|
331
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
332
|
+
switch (true) {
|
|
333
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
334
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
335
|
+
res.accountingAttachment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAttachment);
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
339
|
+
}
|
|
340
|
+
break;
|
|
341
|
+
case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
342
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
343
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
347
|
+
}
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
return [2 /*return*/, res];
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
});
|
|
354
|
+
};
|
|
173
355
|
/**
|
|
174
356
|
* List bills
|
|
175
357
|
*
|
|
@@ -6,12 +6,12 @@ import { AccountsReceivablePayments } from "./accountsreceivablepayments";
|
|
|
6
6
|
import { AccountsReceivableReports } from "./accountsreceivablereports";
|
|
7
7
|
import { SDKConfiguration } from "./sdk";
|
|
8
8
|
export declare class AccountsReceivable {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
creditNotes: AccountsReceivableCreditNotes;
|
|
10
|
+
customers: AccountsReceivableCustomers;
|
|
11
|
+
directIncomes: AccountsReceivableDirectIncomes;
|
|
12
|
+
invoices: AccountsReceivableInvoices;
|
|
13
|
+
payments: AccountsReceivablePayments;
|
|
14
|
+
reports: AccountsReceivableReports;
|
|
15
15
|
private sdkConfiguration;
|
|
16
16
|
constructor(sdkConfig: SDKConfiguration);
|
|
17
17
|
}
|
|
@@ -13,12 +13,12 @@ var accountsreceivablereports_1 = require("./accountsreceivablereports");
|
|
|
13
13
|
var AccountsReceivable = /** @class */ (function () {
|
|
14
14
|
function AccountsReceivable(sdkConfig) {
|
|
15
15
|
this.sdkConfiguration = sdkConfig;
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
16
|
+
this.creditNotes = new accountsreceivablecreditnotes_1.AccountsReceivableCreditNotes(this.sdkConfiguration);
|
|
17
|
+
this.customers = new accountsreceivablecustomers_1.AccountsReceivableCustomers(this.sdkConfiguration);
|
|
18
|
+
this.directIncomes = new accountsreceivabledirectincomes_1.AccountsReceivableDirectIncomes(this.sdkConfiguration);
|
|
19
|
+
this.invoices = new accountsreceivableinvoices_1.AccountsReceivableInvoices(this.sdkConfiguration);
|
|
20
|
+
this.payments = new accountsreceivablepayments_1.AccountsReceivablePayments(this.sdkConfiguration);
|
|
21
|
+
this.reports = new accountsreceivablereports_1.AccountsReceivableReports(this.sdkConfiguration);
|
|
22
22
|
}
|
|
23
23
|
return AccountsReceivable;
|
|
24
24
|
}());
|
package/dist/sdk/banking.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import { BankingTransactionCategories } from "./bankingtransactioncategories";
|
|
|
5
5
|
import { BankingTransactions } from "./bankingtransactions";
|
|
6
6
|
import { SDKConfiguration } from "./sdk";
|
|
7
7
|
export declare class Banking {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
accountBalances: BankingAccountBalances;
|
|
9
|
+
accounts: BankingAccounts;
|
|
10
|
+
categorizedStatement: BankingCategorizedStatement;
|
|
11
|
+
transactionCategories: BankingTransactionCategories;
|
|
12
|
+
transactions: BankingTransactions;
|
|
13
13
|
private sdkConfiguration;
|
|
14
14
|
constructor(sdkConfig: SDKConfiguration);
|
|
15
15
|
}
|
package/dist/sdk/banking.js
CHANGED
|
@@ -12,11 +12,11 @@ var bankingtransactions_1 = require("./bankingtransactions");
|
|
|
12
12
|
var Banking = /** @class */ (function () {
|
|
13
13
|
function Banking(sdkConfig) {
|
|
14
14
|
this.sdkConfiguration = sdkConfig;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
15
|
+
this.accountBalances = new bankingaccountbalances_1.BankingAccountBalances(this.sdkConfiguration);
|
|
16
|
+
this.accounts = new bankingaccounts_1.BankingAccounts(this.sdkConfiguration);
|
|
17
|
+
this.categorizedStatement = new bankingcategorizedstatement_1.BankingCategorizedStatement(this.sdkConfiguration);
|
|
18
|
+
this.transactionCategories = new bankingtransactioncategories_1.BankingTransactionCategories(this.sdkConfiguration);
|
|
19
|
+
this.transactions = new bankingtransactions_1.BankingTransactions(this.sdkConfiguration);
|
|
20
20
|
}
|
|
21
21
|
return Banking;
|
|
22
22
|
}());
|
|
@@ -4,10 +4,10 @@ import { FinancialStatementsCashFlow } from "./financialstatementscashflow";
|
|
|
4
4
|
import { FinancialStatementsProfitAndLoss } from "./financialstatementsprofitandloss";
|
|
5
5
|
import { SDKConfiguration } from "./sdk";
|
|
6
6
|
export declare class FinancialStatements {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
accounts: FinancialStatementsAccounts;
|
|
8
|
+
balanceSheet: FinancialStatementsBalanceSheet;
|
|
9
|
+
cashFlow: FinancialStatementsCashFlow;
|
|
10
|
+
profitAndLoss: FinancialStatementsProfitAndLoss;
|
|
11
11
|
private sdkConfiguration;
|
|
12
12
|
constructor(sdkConfig: SDKConfiguration);
|
|
13
13
|
}
|
|
@@ -11,10 +11,10 @@ var financialstatementsprofitandloss_1 = require("./financialstatementsprofitand
|
|
|
11
11
|
var FinancialStatements = /** @class */ (function () {
|
|
12
12
|
function FinancialStatements(sdkConfig) {
|
|
13
13
|
this.sdkConfiguration = sdkConfig;
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
14
|
+
this.accounts = new financialstatementsaccounts_1.FinancialStatementsAccounts(this.sdkConfiguration);
|
|
15
|
+
this.balanceSheet = new financialstatementsbalancesheet_1.FinancialStatementsBalanceSheet(this.sdkConfiguration);
|
|
16
|
+
this.cashFlow = new financialstatementscashflow_1.FinancialStatementsCashFlow(this.sdkConfiguration);
|
|
17
|
+
this.profitAndLoss = new financialstatementsprofitandloss_1.FinancialStatementsProfitAndLoss(this.sdkConfiguration);
|
|
18
18
|
}
|
|
19
19
|
return FinancialStatements;
|
|
20
20
|
}());
|
package/dist/sdk/managedata.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import * as operations from "./models/operations";
|
|
|
5
5
|
import { SDKConfiguration } from "./sdk";
|
|
6
6
|
import { AxiosRequestConfig } from "axios";
|
|
7
7
|
export declare class ManageData {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
pullOperations: ManageDataPullOperations;
|
|
9
|
+
refresh: ManageDataRefresh;
|
|
10
10
|
private sdkConfiguration;
|
|
11
11
|
constructor(sdkConfig: SDKConfiguration);
|
|
12
12
|
/**
|
package/dist/sdk/managedata.js
CHANGED
|
@@ -83,8 +83,8 @@ var shared = __importStar(require("./models/shared"));
|
|
|
83
83
|
var ManageData = /** @class */ (function () {
|
|
84
84
|
function ManageData(sdkConfig) {
|
|
85
85
|
this.sdkConfiguration = sdkConfig;
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
86
|
+
this.pullOperations = new managedatapulloperations_1.ManageDataPullOperations(this.sdkConfiguration);
|
|
87
|
+
this.refresh = new managedatarefresh_1.ManageDataRefresh(this.sdkConfiguration);
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Get data status
|
package/dist/sdk/sales.d.ts
CHANGED
|
@@ -11,17 +11,17 @@ import { SalesReports } from "./salesreports";
|
|
|
11
11
|
import { SalesTransactions } from "./salestransactions";
|
|
12
12
|
import { SDKConfiguration } from "./sdk";
|
|
13
13
|
export declare class Sales {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
customers: SalesCustomers;
|
|
15
|
+
disputes: SalesDisputes;
|
|
16
|
+
locations: SalesLocations;
|
|
17
|
+
metrics: SalesMetrics;
|
|
18
|
+
orders: SalesOrders;
|
|
19
|
+
paymentMethods: SalesPaymentMethods;
|
|
20
|
+
payments: SalesPayments;
|
|
21
|
+
productCategories: SalesProductCategories;
|
|
22
|
+
products: SalesProducts;
|
|
23
|
+
reports: SalesReports;
|
|
24
|
+
transactions: SalesTransactions;
|
|
25
25
|
private sdkConfiguration;
|
|
26
26
|
constructor(sdkConfig: SDKConfiguration);
|
|
27
27
|
}
|
package/dist/sdk/sales.js
CHANGED
|
@@ -18,17 +18,17 @@ var salestransactions_1 = require("./salestransactions");
|
|
|
18
18
|
var Sales = /** @class */ (function () {
|
|
19
19
|
function Sales(sdkConfig) {
|
|
20
20
|
this.sdkConfiguration = sdkConfig;
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
21
|
+
this.customers = new salescustomers_1.SalesCustomers(this.sdkConfiguration);
|
|
22
|
+
this.disputes = new salesdisputes_1.SalesDisputes(this.sdkConfiguration);
|
|
23
|
+
this.locations = new saleslocations_1.SalesLocations(this.sdkConfiguration);
|
|
24
|
+
this.metrics = new salesmetrics_1.SalesMetrics(this.sdkConfiguration);
|
|
25
|
+
this.orders = new salesorders_1.SalesOrders(this.sdkConfiguration);
|
|
26
|
+
this.paymentMethods = new salespaymentmethods_1.SalesPaymentMethods(this.sdkConfiguration);
|
|
27
|
+
this.payments = new salespayments_1.SalesPayments(this.sdkConfiguration);
|
|
28
|
+
this.productCategories = new salesproductcategories_1.SalesProductCategories(this.sdkConfiguration);
|
|
29
|
+
this.products = new salesproducts_1.SalesProducts(this.sdkConfiguration);
|
|
30
|
+
this.reports = new salesreports_1.SalesReports(this.sdkConfiguration);
|
|
31
|
+
this.transactions = new salestransactions_1.SalesTransactions(this.sdkConfiguration);
|
|
32
32
|
}
|
|
33
33
|
return Sales;
|
|
34
34
|
}());
|
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -93,10 +93,6 @@ export declare class CodatLending {
|
|
|
93
93
|
* Access bank transactions from an accounting platform.
|
|
94
94
|
*/
|
|
95
95
|
accountingBankData: AccountingBankData;
|
|
96
|
-
/**
|
|
97
|
-
* Data from a linked accounting platform representing money the business owes money to its suppliers.
|
|
98
|
-
*/
|
|
99
|
-
accountsPayable: AccountsPayable;
|
|
100
96
|
/**
|
|
101
97
|
* Create and manage your Codat companies.
|
|
102
98
|
*/
|
|
@@ -125,6 +121,7 @@ export declare class CodatLending {
|
|
|
125
121
|
* Debt and other liabilities.
|
|
126
122
|
*/
|
|
127
123
|
liabilities: Liabilities;
|
|
124
|
+
accountsPayable: AccountsPayable;
|
|
128
125
|
accountsReceivable: AccountsReceivable;
|
|
129
126
|
banking: Banking;
|
|
130
127
|
financialStatements: FinancialStatements;
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -36,8 +36,8 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
36
36
|
function SDKConfiguration(init) {
|
|
37
37
|
this.language = "typescript";
|
|
38
38
|
this.openapiDocVersion = "3.0.0";
|
|
39
|
-
this.sdkVersion = "
|
|
40
|
-
this.genVersion = "2.109.
|
|
39
|
+
this.sdkVersion = "2.1.0";
|
|
40
|
+
this.genVersion = "2.109.3";
|
|
41
41
|
Object.assign(this, init);
|
|
42
42
|
}
|
|
43
43
|
return SDKConfiguration;
|
|
@@ -90,7 +90,6 @@ var CodatLending = /** @class */ (function () {
|
|
|
90
90
|
retryConfig: props === null || props === void 0 ? void 0 : props.retryConfig,
|
|
91
91
|
});
|
|
92
92
|
this.accountingBankData = new accountingbankdata_1.AccountingBankData(this.sdkConfiguration);
|
|
93
|
-
this.accountsPayable = new accountspayable_1.AccountsPayable(this.sdkConfiguration);
|
|
94
93
|
this.companies = new companies_1.Companies(this.sdkConfiguration);
|
|
95
94
|
this.companyInfo = new companyinfo_1.CompanyInfo(this.sdkConfiguration);
|
|
96
95
|
this.connections = new connections_1.Connections(this.sdkConfiguration);
|
|
@@ -98,6 +97,7 @@ var CodatLending = /** @class */ (function () {
|
|
|
98
97
|
this.excelReports = new excelreports_1.ExcelReports(this.sdkConfiguration);
|
|
99
98
|
this.fileUpload = new fileupload_1.FileUpload(this.sdkConfiguration);
|
|
100
99
|
this.liabilities = new liabilities_1.Liabilities(this.sdkConfiguration);
|
|
100
|
+
this.accountsPayable = new accountspayable_1.AccountsPayable(this.sdkConfiguration);
|
|
101
101
|
this.accountsReceivable = new accountsreceivable_1.AccountsReceivable(this.sdkConfiguration);
|
|
102
102
|
this.banking = new banking_1.Banking(this.sdkConfiguration);
|
|
103
103
|
this.financialStatements = new financialstatements_1.FinancialStatements(this.sdkConfiguration);
|
|
@@ -5,11 +5,11 @@ import { TransactionsJournalEntries } from "./transactionsjournalentries";
|
|
|
5
5
|
import { TransactionsJournals } from "./transactionsjournals";
|
|
6
6
|
import { TransactionsTransfers } from "./transactionstransfers";
|
|
7
7
|
export declare class Transactions {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
accountTransactions: TransactionsAccountTransactions;
|
|
9
|
+
directCosts: TransactionsDirectCosts;
|
|
10
|
+
journalEntries: TransactionsJournalEntries;
|
|
11
|
+
journals: TransactionsJournals;
|
|
12
|
+
transfers: TransactionsTransfers;
|
|
13
13
|
private sdkConfiguration;
|
|
14
14
|
constructor(sdkConfig: SDKConfiguration);
|
|
15
15
|
}
|
package/dist/sdk/transactions.js
CHANGED
|
@@ -12,11 +12,11 @@ var transactionstransfers_1 = require("./transactionstransfers");
|
|
|
12
12
|
var Transactions = /** @class */ (function () {
|
|
13
13
|
function Transactions(sdkConfig) {
|
|
14
14
|
this.sdkConfiguration = sdkConfig;
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
15
|
+
this.accountTransactions = new transactionsaccounttransactions_1.TransactionsAccountTransactions(this.sdkConfiguration);
|
|
16
|
+
this.directCosts = new transactionsdirectcosts_1.TransactionsDirectCosts(this.sdkConfiguration);
|
|
17
|
+
this.journalEntries = new transactionsjournalentries_1.TransactionsJournalEntries(this.sdkConfiguration);
|
|
18
|
+
this.journals = new transactionsjournals_1.TransactionsJournals(this.sdkConfiguration);
|
|
19
|
+
this.transfers = new transactionstransfers_1.TransactionsTransfers(this.sdkConfiguration);
|
|
20
20
|
}
|
|
21
21
|
return Transactions;
|
|
22
22
|
}());
|
|
@@ -1,104 +1,4 @@
|
|
|
1
1
|
# accountsPayable
|
|
2
2
|
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Data from a linked accounting platform representing money the business owes money to its suppliers.
|
|
6
|
-
|
|
7
3
|
### Available Operations
|
|
8
4
|
|
|
9
|
-
* [downloadBillAttachment](#downloadbillattachment) - Download bill attachment
|
|
10
|
-
* [getBillAttachment](#getbillattachment) - Get bill attachment
|
|
11
|
-
|
|
12
|
-
## downloadBillAttachment
|
|
13
|
-
|
|
14
|
-
The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`.
|
|
15
|
-
|
|
16
|
-
[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
17
|
-
|
|
18
|
-
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Example Usage
|
|
22
|
-
|
|
23
|
-
```typescript
|
|
24
|
-
import { CodatLending } from "@codat/lending";
|
|
25
|
-
import { DownloadAccountingBillAttachmentResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
26
|
-
|
|
27
|
-
const sdk = new CodatLending({
|
|
28
|
-
security: {
|
|
29
|
-
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
sdk.accountsPayable.downloadBillAttachment({
|
|
34
|
-
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
35
|
-
billId: "corrupti",
|
|
36
|
-
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
37
|
-
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
38
|
-
}).then((res: DownloadAccountingBillAttachmentResponse) => {
|
|
39
|
-
if (res.statusCode == 200) {
|
|
40
|
-
// handle response
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Parameters
|
|
46
|
-
|
|
47
|
-
| Parameter | Type | Required | Description |
|
|
48
|
-
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
49
|
-
| `request` | [operations.DownloadAccountingBillAttachmentRequest](../../models/operations/downloadaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
50
|
-
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
51
|
-
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Response
|
|
55
|
-
|
|
56
|
-
**Promise<[operations.DownloadAccountingBillAttachmentResponse](../../models/operations/downloadaccountingbillattachmentresponse.md)>**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## getBillAttachment
|
|
60
|
-
|
|
61
|
-
The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`.
|
|
62
|
-
|
|
63
|
-
[Bills](https://docs.codat.io/accounting-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.
|
|
64
|
-
|
|
65
|
-
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### Example Usage
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
import { CodatLending } from "@codat/lending";
|
|
72
|
-
import { GetAccountingBillAttachmentResponse } from "@codat/lending/dist/sdk/models/operations";
|
|
73
|
-
|
|
74
|
-
const sdk = new CodatLending({
|
|
75
|
-
security: {
|
|
76
|
-
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
sdk.accountsPayable.getBillAttachment({
|
|
81
|
-
attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
82
|
-
billId: "illum",
|
|
83
|
-
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
84
|
-
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|
|
85
|
-
}).then((res: GetAccountingBillAttachmentResponse) => {
|
|
86
|
-
if (res.statusCode == 200) {
|
|
87
|
-
// handle response
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Parameters
|
|
93
|
-
|
|
94
|
-
| Parameter | Type | Required | Description |
|
|
95
|
-
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
96
|
-
| `request` | [operations.GetAccountingBillAttachmentRequest](../../models/operations/getaccountingbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
97
|
-
| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
|
|
98
|
-
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Response
|
|
102
|
-
|
|
103
|
-
**Promise<[operations.GetAccountingBillAttachmentResponse](../../models/operations/getaccountingbillattachmentresponse.md)>**
|
|
104
|
-
|
|
@@ -29,7 +29,7 @@ const sdk = new CodatLending({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
sdk.accountsPayableBillCreditNotes.get({
|
|
32
|
-
billCreditNoteId: "
|
|
32
|
+
billCreditNoteId: "molestiae",
|
|
33
33
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
}).then((res: GetAccountingBillCreditNoteResponse) => {
|
|
35
35
|
if (res.statusCode == 200) {
|
|
@@ -78,7 +78,7 @@ sdk.accountsPayableBillCreditNotes.list({
|
|
|
78
78
|
orderBy: "-modifiedDate",
|
|
79
79
|
page: 1,
|
|
80
80
|
pageSize: 100,
|
|
81
|
-
query: "
|
|
81
|
+
query: "minus",
|
|
82
82
|
}).then((res: ListAccountingBillCreditNotesResponse) => {
|
|
83
83
|
if (res.statusCode == 200) {
|
|
84
84
|
// handle response
|
|
@@ -29,7 +29,7 @@ const sdk = new CodatLending({
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
sdk.accountsPayableBillPayments.get({
|
|
32
|
-
billPaymentId: "
|
|
32
|
+
billPaymentId: "placeat",
|
|
33
33
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
34
34
|
}).then((res: GetAccountingBillPaymentResponse) => {
|
|
35
35
|
if (res.statusCode == 200) {
|
|
@@ -78,7 +78,7 @@ sdk.accountsPayableBillPayments.list({
|
|
|
78
78
|
orderBy: "-modifiedDate",
|
|
79
79
|
page: 1,
|
|
80
80
|
pageSize: 100,
|
|
81
|
-
query: "
|
|
81
|
+
query: "voluptatum",
|
|
82
82
|
}).then((res: ListAccountingBillPaymentsResponse) => {
|
|
83
83
|
if (res.statusCode == 200) {
|
|
84
84
|
// handle response
|