@codat/lending 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +36 -0
  2. package/dist/sdk/companies.js +2 -2
  3. package/dist/sdk/connections.js +2 -2
  4. package/dist/sdk/fileupload.js +1 -1
  5. package/dist/sdk/loanwriteback.d.ts +19 -0
  6. package/dist/sdk/loanwriteback.js +27 -0
  7. package/dist/sdk/loanwritebackaccounts.d.ts +40 -0
  8. package/dist/sdk/loanwritebackaccounts.js +294 -0
  9. package/dist/sdk/loanwritebackbankaccounts.d.ts +39 -0
  10. package/dist/sdk/loanwritebackbankaccounts.js +293 -0
  11. package/dist/sdk/loanwritebackbanktransactions.d.ts +40 -0
  12. package/dist/sdk/loanwritebackbanktransactions.js +294 -0
  13. package/dist/sdk/loanwritebackcreateoperations.d.ts +22 -0
  14. package/dist/sdk/loanwritebackcreateoperations.js +250 -0
  15. package/dist/sdk/loanwritebackdirectcosts.d.ts +40 -0
  16. package/dist/sdk/loanwritebackdirectcosts.js +294 -0
  17. package/dist/sdk/loanwritebacksuppliers.d.ts +40 -0
  18. package/dist/sdk/loanwritebacksuppliers.js +294 -0
  19. package/dist/sdk/loanwritebacktransfers.d.ts +40 -0
  20. package/dist/sdk/loanwritebacktransfers.js +294 -0
  21. package/dist/sdk/models/operations/createaccount.d.ts +27 -0
  22. package/dist/sdk/models/operations/createaccount.js +115 -0
  23. package/dist/sdk/models/operations/createbankaccount.d.ts +27 -0
  24. package/dist/sdk/models/operations/createbankaccount.js +115 -0
  25. package/dist/sdk/models/operations/createbanktransactions.d.ts +31 -0
  26. package/dist/sdk/models/operations/createbanktransactions.js +119 -0
  27. package/dist/sdk/models/operations/createdirectcost.d.ts +27 -0
  28. package/dist/sdk/models/operations/createdirectcost.js +115 -0
  29. package/dist/sdk/models/operations/createsupplier.d.ts +27 -0
  30. package/dist/sdk/models/operations/createsupplier.js +115 -0
  31. package/dist/sdk/models/operations/createtransfer.d.ts +27 -0
  32. package/dist/sdk/models/operations/createtransfer.js +115 -0
  33. package/dist/sdk/models/operations/getcreatebanktransactionsmodel.d.ts +24 -0
  34. package/dist/sdk/models/operations/getcreatebanktransactionsmodel.js +103 -0
  35. package/dist/sdk/models/operations/getcreatechartofaccountsmodel.d.ts +20 -0
  36. package/dist/sdk/models/operations/getcreatechartofaccountsmodel.js +99 -0
  37. package/dist/sdk/models/operations/getcreatedirectcostsmodel.d.ts +20 -0
  38. package/dist/sdk/models/operations/getcreatedirectcostsmodel.js +99 -0
  39. package/dist/sdk/models/operations/getcreateoperation.d.ts +23 -0
  40. package/dist/sdk/models/operations/getcreateoperation.js +99 -0
  41. package/dist/sdk/models/operations/getcreatetransfersmodel.d.ts +20 -0
  42. package/dist/sdk/models/operations/getcreatetransfersmodel.js +99 -0
  43. package/dist/sdk/models/operations/getcreateupdatebankaccountsmodel.d.ts +20 -0
  44. package/dist/sdk/models/operations/getcreateupdatebankaccountsmodel.js +99 -0
  45. package/dist/sdk/models/operations/getcreateupdatesuppliersmodel.d.ts +20 -0
  46. package/dist/sdk/models/operations/getcreateupdatesuppliersmodel.js +99 -0
  47. package/dist/sdk/models/operations/index.d.ts +14 -0
  48. package/dist/sdk/models/operations/index.js +14 -0
  49. package/dist/sdk/models/operations/listcreateoperations.d.ts +35 -0
  50. package/dist/sdk/models/operations/listcreateoperations.js +111 -0
  51. package/dist/sdk/models/shared/accountingcreateaccountresponse.d.ts +124 -0
  52. package/dist/sdk/models/shared/accountingcreateaccountresponse.js +118 -0
  53. package/dist/sdk/models/shared/accountingcreatebankaccountresponse.d.ts +112 -0
  54. package/dist/sdk/models/shared/accountingcreatebankaccountresponse.js +118 -0
  55. package/dist/sdk/models/shared/accountingcreatebanktransactions.d.ts +6 -0
  56. package/dist/sdk/models/shared/accountingcreatebanktransactions.js +52 -0
  57. package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.d.ts +92 -0
  58. package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.js +118 -0
  59. package/dist/sdk/models/shared/accountingcreatedirectcostresponse.d.ts +111 -0
  60. package/dist/sdk/models/shared/accountingcreatedirectcostresponse.js +118 -0
  61. package/dist/sdk/models/shared/accountingcreatesupplierresponse.d.ts +101 -0
  62. package/dist/sdk/models/shared/accountingcreatesupplierresponse.js +118 -0
  63. package/dist/sdk/models/shared/accountingcreatetransferresponse.d.ts +99 -0
  64. package/dist/sdk/models/shared/accountingcreatetransferresponse.js +118 -0
  65. package/dist/sdk/models/shared/createbankaccounttransaction.d.ts +31 -0
  66. package/dist/sdk/models/shared/createbankaccounttransaction.js +65 -0
  67. package/dist/sdk/models/shared/index.d.ts +22 -0
  68. package/dist/sdk/models/shared/index.js +22 -0
  69. package/dist/sdk/models/shared/pushchangetype.d.ts +7 -0
  70. package/dist/sdk/models/shared/pushchangetype.js +14 -0
  71. package/dist/sdk/models/shared/pushfieldvalidation.d.ts +6 -0
  72. package/dist/sdk/models/shared/pushfieldvalidation.js +55 -0
  73. package/dist/sdk/models/shared/pushoperation.d.ts +90 -0
  74. package/dist/sdk/models/shared/pushoperation.js +111 -0
  75. package/dist/sdk/models/shared/pushoperationchange.d.ts +8 -0
  76. package/dist/sdk/models/shared/pushoperationchange.js +58 -0
  77. package/dist/sdk/models/shared/pushoperationref.d.ts +9 -0
  78. package/dist/sdk/models/shared/pushoperationref.js +51 -0
  79. package/dist/sdk/models/shared/pushoperations.d.ts +10 -0
  80. package/dist/sdk/models/shared/pushoperations.js +69 -0
  81. package/dist/sdk/models/shared/pushoperationstatus.d.ts +9 -0
  82. package/dist/sdk/models/shared/pushoperationstatus.js +16 -0
  83. package/dist/sdk/models/shared/pushoption.d.ts +14 -0
  84. package/dist/sdk/models/shared/pushoption.js +89 -0
  85. package/dist/sdk/models/shared/pushoptionchoice.d.ts +12 -0
  86. package/dist/sdk/models/shared/pushoptionchoice.js +66 -0
  87. package/dist/sdk/models/shared/pushoptionproperty.d.ts +13 -0
  88. package/dist/sdk/models/shared/pushoptionproperty.js +88 -0
  89. package/dist/sdk/models/shared/pushoptiontype.d.ts +10 -0
  90. package/dist/sdk/models/shared/pushoptiontype.js +17 -0
  91. package/dist/sdk/models/shared/pushvalidationinfo.d.ts +6 -0
  92. package/dist/sdk/models/shared/pushvalidationinfo.js +53 -0
  93. package/dist/sdk/models/shared/validation.d.ts +9 -0
  94. package/dist/sdk/models/shared/validation.js +56 -0
  95. package/dist/sdk/models/shared/validationitem.d.ts +6 -0
  96. package/dist/sdk/models/shared/validationitem.js +55 -0
  97. package/dist/sdk/sdk.d.ts +2 -0
  98. package/dist/sdk/sdk.js +4 -2
  99. package/docs/models/operations/createaccountrequest.md +13 -0
  100. package/docs/models/operations/createaccountresponse.md +12 -0
  101. package/docs/models/operations/createbankaccountrequest.md +13 -0
  102. package/docs/models/operations/createbankaccountresponse.md +12 -0
  103. package/docs/models/operations/createbanktransactionsrequest.md +14 -0
  104. package/docs/models/operations/createbanktransactionsresponse.md +12 -0
  105. package/docs/models/operations/createdirectcostrequest.md +13 -0
  106. package/docs/models/operations/createdirectcostresponse.md +12 -0
  107. package/docs/models/operations/createsupplierrequest.md +13 -0
  108. package/docs/models/operations/createsupplierresponse.md +12 -0
  109. package/docs/models/operations/createtransferrequest.md +13 -0
  110. package/docs/models/operations/createtransferresponse.md +12 -0
  111. package/docs/models/operations/getcreatebanktransactionsmodelrequest.md +10 -0
  112. package/docs/models/operations/getcreatebanktransactionsmodelresponse.md +12 -0
  113. package/docs/models/operations/getcreatechartofaccountsmodelrequest.md +9 -0
  114. package/docs/models/operations/getcreatechartofaccountsmodelresponse.md +12 -0
  115. package/docs/models/operations/getcreatedirectcostsmodelrequest.md +9 -0
  116. package/docs/models/operations/getcreatedirectcostsmodelresponse.md +12 -0
  117. package/docs/models/operations/getcreateoperationrequest.md +9 -0
  118. package/docs/models/operations/getcreateoperationresponse.md +12 -0
  119. package/docs/models/operations/getcreatetransfersmodelrequest.md +9 -0
  120. package/docs/models/operations/getcreatetransfersmodelresponse.md +12 -0
  121. package/docs/models/operations/getcreateupdatebankaccountsmodelrequest.md +9 -0
  122. package/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md +12 -0
  123. package/docs/models/operations/getcreateupdatesuppliersmodelrequest.md +9 -0
  124. package/docs/models/operations/getcreateupdatesuppliersmodelresponse.md +12 -0
  125. package/docs/models/operations/listcreateoperationsrequest.md +12 -0
  126. package/docs/models/operations/listcreateoperationsresponse.md +12 -0
  127. package/docs/models/shared/accountingcreateaccountresponse.md +21 -0
  128. package/docs/models/shared/accountingcreatebankaccountresponse.md +21 -0
  129. package/docs/models/shared/accountingcreatebanktransactions.md +9 -0
  130. package/docs/models/shared/accountingcreatebanktransactionsresponse.md +21 -0
  131. package/docs/models/shared/accountingcreatedirectcostresponse.md +21 -0
  132. package/docs/models/shared/accountingcreatesupplierresponse.md +21 -0
  133. package/docs/models/shared/accountingcreatetransferresponse.md +21 -0
  134. package/docs/models/shared/createbankaccounttransaction.md +12 -0
  135. package/docs/models/shared/pushchangetype.md +12 -0
  136. package/docs/models/shared/pushfieldvalidation.md +10 -0
  137. package/docs/models/shared/pushoperation.md +20 -0
  138. package/docs/models/shared/pushoperationchange.md +10 -0
  139. package/docs/models/shared/pushoperationref.md +9 -0
  140. package/docs/models/shared/pushoperations.md +12 -0
  141. package/docs/models/shared/pushoperationstatus.md +13 -0
  142. package/docs/models/shared/pushoption.md +14 -0
  143. package/docs/models/shared/pushoptionchoice.md +12 -0
  144. package/docs/models/shared/pushoptionproperty.md +14 -0
  145. package/docs/models/shared/pushoptiontype.md +15 -0
  146. package/docs/models/shared/pushvalidationinfo.md +9 -0
  147. package/docs/models/shared/validation.md +11 -0
  148. package/docs/models/shared/validationitem.md +10 -0
  149. package/docs/sdks/loanwriteback/README.md +4 -0
  150. package/docs/sdks/loanwritebackaccounts/README.md +134 -0
  151. package/docs/sdks/loanwritebackbankaccounts/README.md +126 -0
  152. package/docs/sdks/loanwritebackbanktransactions/README.md +121 -0
  153. package/docs/sdks/loanwritebackcreateoperations/README.md +89 -0
  154. package/docs/sdks/loanwritebackdirectcosts/README.md +200 -0
  155. package/docs/sdks/loanwritebacksuppliers/README.md +142 -0
  156. package/docs/sdks/loanwritebacktransfers/README.md +156 -0
  157. package/docs/sdks/managedatapulloperations/README.md +1 -1
  158. package/docs/sdks/managedatarefresh/README.md +1 -1
  159. package/docs/sdks/salescustomers/README.md +2 -2
  160. package/docs/sdks/salesdisputes/README.md +2 -2
  161. package/docs/sdks/saleslocations/README.md +1 -1
  162. package/docs/sdks/salesmetrics/README.md +9 -9
  163. package/docs/sdks/salesorders/README.md +2 -2
  164. package/docs/sdks/salespaymentmethods/README.md +2 -2
  165. package/docs/sdks/salespayments/README.md +2 -2
  166. package/docs/sdks/salesproductcategories/README.md +2 -2
  167. package/docs/sdks/salesproducts/README.md +2 -2
  168. package/docs/sdks/salesreports/README.md +5 -5
  169. package/docs/sdks/salestransactions/README.md +2 -2
  170. package/docs/sdks/transactionsaccounttransactions/README.md +2 -2
  171. package/docs/sdks/transactionsdirectcosts/README.md +5 -5
  172. package/docs/sdks/transactionsjournalentries/README.md +2 -2
  173. package/docs/sdks/transactionsjournals/README.md +2 -2
  174. package/docs/sdks/transactionstransfers/README.md +2 -2
  175. package/package.json +1 -1
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ var desc = Object.getOwnPropertyDescriptor(m, k);
19
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
+ desc = { enumerable: true, get: function() { return m[k]; } };
21
+ }
22
+ Object.defineProperty(o, k2, desc);
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
40
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
+ return new (P || (P = Promise))(function (resolve, reject) {
42
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
43
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
46
+ });
47
+ };
48
+ var __generator = (this && this.__generator) || function (thisArg, body) {
49
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
50
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
51
+ function verb(n) { return function (v) { return step([n, v]); }; }
52
+ function step(op) {
53
+ if (f) throw new TypeError("Generator is already executing.");
54
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
55
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
56
+ if (y = 0, t) op = [op[0] & 2, t.value];
57
+ switch (op[0]) {
58
+ case 0: case 1: t = op; break;
59
+ case 4: _.label++; return { value: op[1], done: false };
60
+ case 5: _.label++; y = op[1]; op = [0]; continue;
61
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
62
+ default:
63
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
64
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
65
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
66
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67
+ if (t[2]) _.ops.pop();
68
+ _.trys.pop(); continue;
69
+ }
70
+ op = body.call(thisArg, _);
71
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
72
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
73
+ }
74
+ };
75
+ Object.defineProperty(exports, "__esModule", { value: true });
76
+ exports.LoanWritebackCreateOperations = void 0;
77
+ var utils = __importStar(require("../internal/utils"));
78
+ var errors = __importStar(require("./models/errors"));
79
+ var operations = __importStar(require("./models/operations"));
80
+ var shared = __importStar(require("./models/shared"));
81
+ var LoanWritebackCreateOperations = /** @class */ (function () {
82
+ function LoanWritebackCreateOperations(sdkConfig) {
83
+ this.sdkConfiguration = sdkConfig;
84
+ }
85
+ /**
86
+ * Get create operation
87
+ *
88
+ * @remarks
89
+ * Retrieve create operation.
90
+ */
91
+ LoanWritebackCreateOperations.prototype.get = function (req, retries, config) {
92
+ var _a, _b;
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
95
+ return __generator(this, function (_c) {
96
+ switch (_c.label) {
97
+ case 0:
98
+ if (!(req instanceof utils.SpeakeasyBase)) {
99
+ req = new operations.GetCreateOperationRequest(req);
100
+ }
101
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
102
+ url = utils.generateURL(baseURL, "/companies/{companyId}/push/{pushOperationKey}", req);
103
+ client = this.sdkConfiguration.defaultClient;
104
+ globalSecurity = this.sdkConfiguration.security;
105
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
106
+ return [4 /*yield*/, globalSecurity()];
107
+ case 1:
108
+ globalSecurity = _c.sent();
109
+ _c.label = 2;
110
+ case 2:
111
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
112
+ globalSecurity = new shared.Security(globalSecurity);
113
+ }
114
+ properties = utils.parseSecurityProperties(globalSecurity);
115
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
116
+ headers["Accept"] = "application/json";
117
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
118
+ globalRetryConfig = this.sdkConfiguration.retryConfig;
119
+ retryConfig = retries;
120
+ if (!retryConfig) {
121
+ if (globalRetryConfig) {
122
+ retryConfig = globalRetryConfig;
123
+ }
124
+ else {
125
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
126
+ }
127
+ }
128
+ return [4 /*yield*/, utils.Retry(function () {
129
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
130
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
131
+ case 3:
132
+ httpRes = _c.sent();
133
+ 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 : "";
134
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
135
+ throw new Error("status code not found in response: ".concat(httpRes));
136
+ }
137
+ res = new operations.GetCreateOperationResponse({
138
+ statusCode: httpRes.status,
139
+ contentType: contentType,
140
+ rawResponse: httpRes,
141
+ });
142
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
143
+ switch (true) {
144
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
145
+ if (utils.matchContentType(contentType, "application/json")) {
146
+ res.pushOperation = utils.objectToClass(JSON.parse(decodedRes), shared.PushOperation);
147
+ }
148
+ else {
149
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
150
+ }
151
+ break;
152
+ case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
153
+ if (utils.matchContentType(contentType, "application/json")) {
154
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
155
+ }
156
+ else {
157
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
158
+ }
159
+ break;
160
+ }
161
+ return [2 /*return*/, res];
162
+ }
163
+ });
164
+ });
165
+ };
166
+ /**
167
+ * List create operations
168
+ *
169
+ * @remarks
170
+ * List create operations.
171
+ */
172
+ LoanWritebackCreateOperations.prototype.list = function (req, retries, config) {
173
+ var _a, _b;
174
+ return __awaiter(this, void 0, void 0, function () {
175
+ var baseURL, url, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
176
+ return __generator(this, function (_c) {
177
+ switch (_c.label) {
178
+ case 0:
179
+ if (!(req instanceof utils.SpeakeasyBase)) {
180
+ req = new operations.ListCreateOperationsRequest(req);
181
+ }
182
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
183
+ url = utils.generateURL(baseURL, "/companies/{companyId}/push", req);
184
+ client = this.sdkConfiguration.defaultClient;
185
+ globalSecurity = this.sdkConfiguration.security;
186
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
187
+ return [4 /*yield*/, globalSecurity()];
188
+ case 1:
189
+ globalSecurity = _c.sent();
190
+ _c.label = 2;
191
+ case 2:
192
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
193
+ globalSecurity = new shared.Security(globalSecurity);
194
+ }
195
+ properties = utils.parseSecurityProperties(globalSecurity);
196
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
197
+ queryParams = utils.serializeQueryParams(req);
198
+ headers["Accept"] = "application/json";
199
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
200
+ globalRetryConfig = this.sdkConfiguration.retryConfig;
201
+ retryConfig = retries;
202
+ if (!retryConfig) {
203
+ if (globalRetryConfig) {
204
+ retryConfig = globalRetryConfig;
205
+ }
206
+ else {
207
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
208
+ }
209
+ }
210
+ return [4 /*yield*/, utils.Retry(function () {
211
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config));
212
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
213
+ case 3:
214
+ httpRes = _c.sent();
215
+ 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 : "";
216
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
217
+ throw new Error("status code not found in response: ".concat(httpRes));
218
+ }
219
+ res = new operations.ListCreateOperationsResponse({
220
+ statusCode: httpRes.status,
221
+ contentType: contentType,
222
+ rawResponse: httpRes,
223
+ });
224
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
225
+ switch (true) {
226
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
227
+ if (utils.matchContentType(contentType, "application/json")) {
228
+ res.pushOperations = utils.objectToClass(JSON.parse(decodedRes), shared.PushOperations);
229
+ }
230
+ else {
231
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
232
+ }
233
+ break;
234
+ case [400, 401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
235
+ if (utils.matchContentType(contentType, "application/json")) {
236
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
237
+ }
238
+ else {
239
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
240
+ }
241
+ break;
242
+ }
243
+ return [2 /*return*/, res];
244
+ }
245
+ });
246
+ });
247
+ };
248
+ return LoanWritebackCreateOperations;
249
+ }());
250
+ exports.LoanWritebackCreateOperations = LoanWritebackCreateOperations;
@@ -0,0 +1,40 @@
1
+ import * as utils from "../internal/utils";
2
+ import * as operations from "./models/operations";
3
+ import { SDKConfiguration } from "./sdk";
4
+ import { AxiosRequestConfig } from "axios";
5
+ export declare class LoanWritebackDirectCosts {
6
+ private sdkConfiguration;
7
+ constructor(sdkConfig: SDKConfiguration);
8
+ /**
9
+ * Create direct cost
10
+ *
11
+ * @remarks
12
+ * The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company's connection.
13
+ *
14
+ * [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are the expenses associated with a business' operations. For example, purchases of raw materials that are paid off at the point of the purchase and service fees are considered direct costs.
15
+ *
16
+ * **Integration-specific behaviour**
17
+ *
18
+ * Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/accounting-api#/operations/get-create-directCosts-model).
19
+ *
20
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating an account.
21
+ *
22
+ */
23
+ create(req: operations.CreateDirectCostRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.CreateDirectCostResponse>;
24
+ /**
25
+ * Get create direct cost model
26
+ *
27
+ * @remarks
28
+ * The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company and integration.
29
+ *
30
+ * [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase.
31
+ *
32
+ * **Integration-specific behaviour**
33
+ *
34
+ * See the *response examples* for integration-specific indicative models.
35
+ *
36
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating a direct cost.
37
+ *
38
+ */
39
+ getCreateModel(req: operations.GetCreateDirectCostsModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCreateDirectCostsModelResponse>;
40
+ }
@@ -0,0 +1,294 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ var desc = Object.getOwnPropertyDescriptor(m, k);
19
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
+ desc = { enumerable: true, get: function() { return m[k]; } };
21
+ }
22
+ Object.defineProperty(o, k2, desc);
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
40
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
+ return new (P || (P = Promise))(function (resolve, reject) {
42
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
43
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
46
+ });
47
+ };
48
+ var __generator = (this && this.__generator) || function (thisArg, body) {
49
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
50
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
51
+ function verb(n) { return function (v) { return step([n, v]); }; }
52
+ function step(op) {
53
+ if (f) throw new TypeError("Generator is already executing.");
54
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
55
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
56
+ if (y = 0, t) op = [op[0] & 2, t.value];
57
+ switch (op[0]) {
58
+ case 0: case 1: t = op; break;
59
+ case 4: _.label++; return { value: op[1], done: false };
60
+ case 5: _.label++; y = op[1]; op = [0]; continue;
61
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
62
+ default:
63
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
64
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
65
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
66
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
67
+ if (t[2]) _.ops.pop();
68
+ _.trys.pop(); continue;
69
+ }
70
+ op = body.call(thisArg, _);
71
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
72
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
73
+ }
74
+ };
75
+ var __read = (this && this.__read) || function (o, n) {
76
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
77
+ if (!m) return o;
78
+ var i = m.call(o), r, ar = [], e;
79
+ try {
80
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
81
+ }
82
+ catch (error) { e = { error: error }; }
83
+ finally {
84
+ try {
85
+ if (r && !r.done && (m = i["return"])) m.call(i);
86
+ }
87
+ finally { if (e) throw e.error; }
88
+ }
89
+ return ar;
90
+ };
91
+ Object.defineProperty(exports, "__esModule", { value: true });
92
+ exports.LoanWritebackDirectCosts = void 0;
93
+ var utils = __importStar(require("../internal/utils"));
94
+ var errors = __importStar(require("./models/errors"));
95
+ var operations = __importStar(require("./models/operations"));
96
+ var shared = __importStar(require("./models/shared"));
97
+ var LoanWritebackDirectCosts = /** @class */ (function () {
98
+ function LoanWritebackDirectCosts(sdkConfig) {
99
+ this.sdkConfiguration = sdkConfig;
100
+ }
101
+ /**
102
+ * Create direct cost
103
+ *
104
+ * @remarks
105
+ * The *Create direct cost* endpoint creates a new [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company's connection.
106
+ *
107
+ * [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are the expenses associated with a business' operations. For example, purchases of raw materials that are paid off at the point of the purchase and service fees are considered direct costs.
108
+ *
109
+ * **Integration-specific behaviour**
110
+ *
111
+ * Required data may vary by integration. To see what data to post, first call [Get create direct cost model](https://docs.codat.io/accounting-api#/operations/get-create-directCosts-model).
112
+ *
113
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating an account.
114
+ *
115
+ */
116
+ LoanWritebackDirectCosts.prototype.create = function (req, retries, config) {
117
+ var _a, _b;
118
+ return __awaiter(this, void 0, void 0, function () {
119
+ var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
120
+ var _d;
121
+ return __generator(this, function (_e) {
122
+ switch (_e.label) {
123
+ case 0:
124
+ if (!(req instanceof utils.SpeakeasyBase)) {
125
+ req = new operations.CreateDirectCostRequest(req);
126
+ }
127
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
128
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/push/directCosts", req);
129
+ _c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
130
+ try {
131
+ _d = __read(utils.serializeRequestBody(req, "accountingDirectCost", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
132
+ }
133
+ catch (e) {
134
+ if (e instanceof Error) {
135
+ throw new Error("Error serializing request body, cause: ".concat(e.message));
136
+ }
137
+ }
138
+ client = this.sdkConfiguration.defaultClient;
139
+ globalSecurity = this.sdkConfiguration.security;
140
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
141
+ return [4 /*yield*/, globalSecurity()];
142
+ case 1:
143
+ globalSecurity = _e.sent();
144
+ _e.label = 2;
145
+ case 2:
146
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
147
+ globalSecurity = new shared.Security(globalSecurity);
148
+ }
149
+ properties = utils.parseSecurityProperties(globalSecurity);
150
+ headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
151
+ queryParams = utils.serializeQueryParams(req);
152
+ headers["Accept"] = "application/json";
153
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
154
+ globalRetryConfig = this.sdkConfiguration.retryConfig;
155
+ retryConfig = retries;
156
+ if (!retryConfig) {
157
+ if (globalRetryConfig) {
158
+ retryConfig = globalRetryConfig;
159
+ }
160
+ else {
161
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
162
+ }
163
+ }
164
+ return [4 /*yield*/, utils.Retry(function () {
165
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config));
166
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
167
+ case 3:
168
+ httpRes = _e.sent();
169
+ 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 : "";
170
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
171
+ throw new Error("status code not found in response: ".concat(httpRes));
172
+ }
173
+ res = new operations.CreateDirectCostResponse({
174
+ statusCode: httpRes.status,
175
+ contentType: contentType,
176
+ rawResponse: httpRes,
177
+ });
178
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
179
+ switch (true) {
180
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
181
+ if (utils.matchContentType(contentType, "application/json")) {
182
+ res.accountingCreateDirectCostResponse = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingCreateDirectCostResponse);
183
+ }
184
+ else {
185
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
186
+ }
187
+ break;
188
+ case [400, 401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
189
+ if (utils.matchContentType(contentType, "application/json")) {
190
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
191
+ }
192
+ else {
193
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
194
+ }
195
+ break;
196
+ }
197
+ return [2 /*return*/, res];
198
+ }
199
+ });
200
+ });
201
+ };
202
+ /**
203
+ * Get create direct cost model
204
+ *
205
+ * @remarks
206
+ * The *Get create direct cost model* endpoint returns the expected data for the request payload when creating a [direct cost](https://docs.codat.io/accounting-api#/schemas/DirectCost) for a given company and integration.
207
+ *
208
+ * [Direct costs](https://docs.codat.io/accounting-api#/schemas/DirectCost) are purchases of items that are paid off at the point of the purchase.
209
+ *
210
+ * **Integration-specific behaviour**
211
+ *
212
+ * See the *response examples* for integration-specific indicative models.
213
+ *
214
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directCosts) for integrations that support creating a direct cost.
215
+ *
216
+ */
217
+ LoanWritebackDirectCosts.prototype.getCreateModel = function (req, retries, config) {
218
+ var _a, _b;
219
+ return __awaiter(this, void 0, void 0, function () {
220
+ var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
221
+ return __generator(this, function (_c) {
222
+ switch (_c.label) {
223
+ case 0:
224
+ if (!(req instanceof utils.SpeakeasyBase)) {
225
+ req = new operations.GetCreateDirectCostsModelRequest(req);
226
+ }
227
+ baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
228
+ url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/options/directCosts", req);
229
+ client = this.sdkConfiguration.defaultClient;
230
+ globalSecurity = this.sdkConfiguration.security;
231
+ if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
232
+ return [4 /*yield*/, globalSecurity()];
233
+ case 1:
234
+ globalSecurity = _c.sent();
235
+ _c.label = 2;
236
+ case 2:
237
+ if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
238
+ globalSecurity = new shared.Security(globalSecurity);
239
+ }
240
+ properties = utils.parseSecurityProperties(globalSecurity);
241
+ headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
242
+ headers["Accept"] = "application/json";
243
+ headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
244
+ globalRetryConfig = this.sdkConfiguration.retryConfig;
245
+ retryConfig = retries;
246
+ if (!retryConfig) {
247
+ if (globalRetryConfig) {
248
+ retryConfig = globalRetryConfig;
249
+ }
250
+ else {
251
+ retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
252
+ }
253
+ }
254
+ return [4 /*yield*/, utils.Retry(function () {
255
+ return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
256
+ }, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
257
+ case 3:
258
+ httpRes = _c.sent();
259
+ 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 : "";
260
+ if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
261
+ throw new Error("status code not found in response: ".concat(httpRes));
262
+ }
263
+ res = new operations.GetCreateDirectCostsModelResponse({
264
+ statusCode: httpRes.status,
265
+ contentType: contentType,
266
+ rawResponse: httpRes,
267
+ });
268
+ decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
269
+ switch (true) {
270
+ case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
271
+ if (utils.matchContentType(contentType, "application/json")) {
272
+ res.pushOption = utils.objectToClass(JSON.parse(decodedRes), shared.PushOption);
273
+ }
274
+ else {
275
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
276
+ }
277
+ break;
278
+ case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
279
+ if (utils.matchContentType(contentType, "application/json")) {
280
+ res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
281
+ }
282
+ else {
283
+ throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
284
+ }
285
+ break;
286
+ }
287
+ return [2 /*return*/, res];
288
+ }
289
+ });
290
+ });
291
+ };
292
+ return LoanWritebackDirectCosts;
293
+ }());
294
+ exports.LoanWritebackDirectCosts = LoanWritebackDirectCosts;
@@ -0,0 +1,40 @@
1
+ import * as utils from "../internal/utils";
2
+ import * as operations from "./models/operations";
3
+ import { SDKConfiguration } from "./sdk";
4
+ import { AxiosRequestConfig } from "axios";
5
+ export declare class LoanWritebackSuppliers {
6
+ private sdkConfiguration;
7
+ constructor(sdkConfig: SDKConfiguration);
8
+ /**
9
+ * Create supplier
10
+ *
11
+ * @remarks
12
+ * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company's connection.
13
+ *
14
+ * [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
15
+ *
16
+ * **Integration-specific behaviour**
17
+ *
18
+ * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/accounting-api#/operations/get-create-update-suppliers-model).
19
+ *
20
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating an account.
21
+ *
22
+ */
23
+ create(req: operations.CreateSupplierRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.CreateSupplierResponse>;
24
+ /**
25
+ * Get create/update supplier model
26
+ *
27
+ * @remarks
28
+ * The *Get create/update supplier model* endpoint returns the expected data for the request payload when creating and updating a [supplier](https://docs.codat.io/accounting-api#/schemas/Supplier) for a given company and integration.
29
+ *
30
+ * [Suppliers](https://docs.codat.io/accounting-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.
31
+ *
32
+ * **Integration-specific behaviour**
33
+ *
34
+ * See the *response examples* for integration-specific indicative models.
35
+ *
36
+ * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating and updating a supplier.
37
+ *
38
+ */
39
+ getCreateUpdateModel(req: operations.GetCreateUpdateSuppliersModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCreateUpdateSuppliersModelResponse>;
40
+ }