@codat/lending 4.1.0 → 4.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.
- package/dist/sdk/fileupload.js +1 -1
- package/dist/sdk/models/operations/uploadfiles.d.ts +1 -5
- package/dist/sdk/models/operations/uploadfiles.js +4 -22
- package/dist/sdk/models/shared/codatfile.d.ts +5 -0
- package/dist/sdk/models/shared/codatfile.js +47 -0
- package/dist/sdk/models/shared/fileupload.d.ts +8 -0
- package/dist/sdk/models/shared/fileupload.js +44 -0
- package/dist/sdk/models/shared/index.d.ts +2 -0
- package/dist/sdk/models/shared/index.js +2 -0
- package/dist/sdk/sdk.js +2 -2
- package/docs/sdk/models/operations/uploadfilesrequest.md +5 -5
- package/docs/sdk/models/{operations/uploadfilesrequestbody.md → shared/codatfile.md} +1 -1
- package/docs/sdk/models/shared/fileupload.md +8 -0
- package/docs/sdks/fileupload/README.md +5 -3
- package/package.json +1 -1
package/dist/sdk/fileupload.js
CHANGED
|
@@ -303,7 +303,7 @@ var FileUpload = /** @class */ (function () {
|
|
|
303
303
|
operationUrl = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/files", req);
|
|
304
304
|
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
305
305
|
try {
|
|
306
|
-
_d = __read(utils.serializeRequestBody(req, "
|
|
306
|
+
_d = __read(utils.serializeRequestBody(req, "fileUpload", "multipart"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
307
307
|
}
|
|
308
308
|
catch (e) {
|
|
309
309
|
if (e instanceof Error) {
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
2
|
import * as shared from "../../../sdk/models/shared";
|
|
3
3
|
import { AxiosResponse } from "axios";
|
|
4
|
-
export declare class UploadFilesRequestBody extends SpeakeasyBase {
|
|
5
|
-
content: Uint8Array;
|
|
6
|
-
fileName: string;
|
|
7
|
-
}
|
|
8
4
|
export declare class UploadFilesRequest extends SpeakeasyBase {
|
|
9
|
-
|
|
5
|
+
fileUpload?: shared.FileUpload;
|
|
10
6
|
/**
|
|
11
7
|
* Unique identifier for a company.
|
|
12
8
|
*/
|
|
@@ -50,36 +50,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
50
50
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
51
51
|
};
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.UploadFilesResponse = exports.UploadFilesRequest =
|
|
53
|
+
exports.UploadFilesResponse = exports.UploadFilesRequest = void 0;
|
|
54
54
|
var utils_1 = require("../../../internal/utils");
|
|
55
55
|
var shared = __importStar(require("../../../sdk/models/shared"));
|
|
56
|
-
var UploadFilesRequestBody = /** @class */ (function (_super) {
|
|
57
|
-
__extends(UploadFilesRequestBody, _super);
|
|
58
|
-
function UploadFilesRequestBody() {
|
|
59
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
-
}
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, utils_1.SpeakeasyMetadata)({ data: "multipart_form, content=true" }),
|
|
63
|
-
__metadata("design:type", Uint8Array)
|
|
64
|
-
], UploadFilesRequestBody.prototype, "content", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, utils_1.SpeakeasyMetadata)({ data: "multipart_form, name=fileName" }),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], UploadFilesRequestBody.prototype, "fileName", void 0);
|
|
69
|
-
return UploadFilesRequestBody;
|
|
70
|
-
}(utils_1.SpeakeasyBase));
|
|
71
|
-
exports.UploadFilesRequestBody = UploadFilesRequestBody;
|
|
72
56
|
var UploadFilesRequest = /** @class */ (function (_super) {
|
|
73
57
|
__extends(UploadFilesRequest, _super);
|
|
74
58
|
function UploadFilesRequest() {
|
|
75
59
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
60
|
}
|
|
77
61
|
__decorate([
|
|
78
|
-
(0, utils_1.SpeakeasyMetadata)({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
__metadata("design:type", UploadFilesRequestBody)
|
|
82
|
-
], UploadFilesRequest.prototype, "requestBody", void 0);
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "request, media_type=multipart/form-data" }),
|
|
63
|
+
__metadata("design:type", shared.FileUpload)
|
|
64
|
+
], UploadFilesRequest.prototype, "fileUpload", void 0);
|
|
83
65
|
__decorate([
|
|
84
66
|
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=companyId" }),
|
|
85
67
|
__metadata("design:type", String)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
26
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
27
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.CodatFile = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var CodatFile = /** @class */ (function (_super) {
|
|
33
|
+
__extends(CodatFile, _super);
|
|
34
|
+
function CodatFile() {
|
|
35
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
}
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "multipart_form, content=true" }),
|
|
39
|
+
__metadata("design:type", Uint8Array)
|
|
40
|
+
], CodatFile.prototype, "content", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "multipart_form, name=fileName" }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CodatFile.prototype, "fileName", void 0);
|
|
45
|
+
return CodatFile;
|
|
46
|
+
}(utils_1.SpeakeasyBase));
|
|
47
|
+
exports.CodatFile = CodatFile;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
26
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
27
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.FileUpload = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var codatfile_1 = require("./codatfile");
|
|
33
|
+
var FileUpload = /** @class */ (function (_super) {
|
|
34
|
+
__extends(FileUpload, _super);
|
|
35
|
+
function FileUpload() {
|
|
36
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "multipart_form, file=true" }),
|
|
40
|
+
__metadata("design:type", codatfile_1.CodatFile)
|
|
41
|
+
], FileUpload.prototype, "file", void 0);
|
|
42
|
+
return FileUpload;
|
|
43
|
+
}(utils_1.SpeakeasyBase));
|
|
44
|
+
exports.FileUpload = FileUpload;
|
|
@@ -100,6 +100,7 @@ export * from "./clientratelimitreachedwebhook";
|
|
|
100
100
|
export * from "./clientratelimitreachedwebhookdata";
|
|
101
101
|
export * from "./clientratelimitresetwebhook";
|
|
102
102
|
export * from "./clientratelimitresetwebhookdata";
|
|
103
|
+
export * from "./codatfile";
|
|
103
104
|
export * from "./commerceaddress";
|
|
104
105
|
export * from "./commerceaddresstype";
|
|
105
106
|
export * from "./commercecompanyinfo";
|
|
@@ -174,6 +175,7 @@ export * from "./errormessage";
|
|
|
174
175
|
export * from "./excelreporttypes";
|
|
175
176
|
export * from "./excelstatus";
|
|
176
177
|
export * from "./file";
|
|
178
|
+
export * from "./fileupload";
|
|
177
179
|
export * from "./halref";
|
|
178
180
|
export * from "./integritystatus";
|
|
179
181
|
export * from "./invoicelineitem";
|
|
@@ -119,6 +119,7 @@ __exportStar(require("./clientratelimitreachedwebhook"), exports);
|
|
|
119
119
|
__exportStar(require("./clientratelimitreachedwebhookdata"), exports);
|
|
120
120
|
__exportStar(require("./clientratelimitresetwebhook"), exports);
|
|
121
121
|
__exportStar(require("./clientratelimitresetwebhookdata"), exports);
|
|
122
|
+
__exportStar(require("./codatfile"), exports);
|
|
122
123
|
__exportStar(require("./commerceaddress"), exports);
|
|
123
124
|
__exportStar(require("./commerceaddresstype"), exports);
|
|
124
125
|
__exportStar(require("./commercecompanyinfo"), exports);
|
|
@@ -193,6 +194,7 @@ __exportStar(require("./errormessage"), exports);
|
|
|
193
194
|
__exportStar(require("./excelreporttypes"), exports);
|
|
194
195
|
__exportStar(require("./excelstatus"), exports);
|
|
195
196
|
__exportStar(require("./file"), exports);
|
|
197
|
+
__exportStar(require("./fileupload"), exports);
|
|
196
198
|
__exportStar(require("./halref"), exports);
|
|
197
199
|
__exportStar(require("./integritystatus"), exports);
|
|
198
200
|
__exportStar(require("./invoicelineitem"), exports);
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -37,9 +37,9 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
37
37
|
function SDKConfiguration(init) {
|
|
38
38
|
this.language = "typescript";
|
|
39
39
|
this.openapiDocVersion = "3.0.0";
|
|
40
|
-
this.sdkVersion = "4.
|
|
40
|
+
this.sdkVersion = "4.2.0";
|
|
41
41
|
this.genVersion = "2.214.3";
|
|
42
|
-
this.userAgent = "speakeasy-sdk/typescript 4.
|
|
42
|
+
this.userAgent = "speakeasy-sdk/typescript 4.2.0 2.214.3 3.0.0 @codat/lending";
|
|
43
43
|
Object.assign(this, init);
|
|
44
44
|
}
|
|
45
45
|
return SDKConfiguration;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
## Fields
|
|
5
5
|
|
|
6
|
-
| Field
|
|
7
|
-
|
|
|
8
|
-
| `
|
|
9
|
-
| `companyId`
|
|
10
|
-
| `connectionId`
|
|
6
|
+
| Field | Type | Required | Description | Example |
|
|
7
|
+
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
8
|
+
| `fileUpload` | [shared.FileUpload](../../../sdk/models/shared/fileupload.md) | :heavy_minus_sign: | N/A | |
|
|
9
|
+
| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
|
|
10
|
+
| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# FileUpload
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Fields
|
|
5
|
+
|
|
6
|
+
| Field | Type | Required | Description |
|
|
7
|
+
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
|
8
|
+
| `file` | [shared.CodatFile](../../../sdk/models/shared/codatfile.md) | :heavy_check_mark: | The file to be uploaded as an attachment. |
|
|
@@ -127,9 +127,11 @@ async function run() {
|
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
const res = await sdk.fileUpload.upload({
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
fileUpload: {
|
|
131
|
+
file: {
|
|
132
|
+
content: new TextEncoder().encode("0x87cbca97eC"),
|
|
133
|
+
fileName: "ullam.wav",
|
|
134
|
+
},
|
|
133
135
|
},
|
|
134
136
|
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
|
|
135
137
|
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
|