Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codat/files

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codat/files - npm Package Compare versions

Comparing version 0.20.0 to 0.23.1

dist/sdk/models/shared/schema.d.ts

12

dist/sdk/files.d.ts
import * as utils from "../internal/utils";
import * as operations from "./models/operations";
import { AxiosInstance, AxiosRequestConfig } from "axios";
import { SDKConfiguration } from "./sdk";
import { AxiosRequestConfig } from "axios";
/**

@@ -8,9 +9,4 @@ * Endpoints to manage uploaded files.

export declare class Files {
_defaultClient: AxiosInstance;
_securityClient: AxiosInstance;
_serverURL: string;
_language: string;
_sdkVersion: string;
_genVersion: string;
constructor(defaultClient: AxiosInstance, securityClient: AxiosInstance, serverURL: string, language: string, sdkVersion: string, genVersion: string);
private sdkConfiguration;
constructor(sdkConfig: SDKConfiguration);
/**

@@ -17,0 +13,0 @@ * Download all files for a company

@@ -84,9 +84,4 @@ "use strict";

var Files = /** @class */ (function () {
function Files(defaultClient, securityClient, serverURL, language, sdkVersion, genVersion) {
this._defaultClient = defaultClient;
this._securityClient = securityClient;
this._serverURL = serverURL;
this._language = language;
this._sdkVersion = sdkVersion;
this._genVersion = genVersion;
function Files(sdkConfig) {
this.sdkConfiguration = sdkConfig;
}

@@ -109,9 +104,10 @@ /**

}
baseURL = this._serverURL;
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
url = utils.generateURL(baseURL, "/companies/{companyId}/files/download", req);
client = this._securityClient || this._defaultClient;
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
queryParams = utils.serializeQueryParams(req);
headers["Accept"] = "application/octet-stream";
headers["user-agent"] = "speakeasy-sdk/".concat(this._language, " ").concat(this._sdkVersion, " ").concat(this._genVersion);
headers["Accept"] =
"application/json;q=1, application/json;q=0.7, application/octet-stream;q=0";
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion);
retryConfig = retries;

@@ -146,2 +142,12 @@ if (!retryConfig) {

break;
case [400, 401, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
if (utils.matchContentType(contentType, "application/json")) {
res.schema = utils.objectToClass(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, shared.Schema);
}
break;
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
if (utils.matchContentType(contentType, "application/json")) {
res.downloadFiles404ApplicationJSONObject = utils.objectToClass(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, operations.DownloadFiles404ApplicationJSON);
}
break;
}

@@ -169,8 +175,8 @@ return [2 /*return*/, res];

}
baseURL = this._serverURL;
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
url = utils.generateURL(baseURL, "/companies/{companyId}/files", req);
client = this._securityClient || this._defaultClient;
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
headers["Accept"] = "application/json";
headers["user-agent"] = "speakeasy-sdk/".concat(this._language, " ").concat(this._sdkVersion, " ").concat(this._genVersion);
headers["Accept"] = "application/json;q=1, application/json;q=0.7, application/json;q=0";
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion);
retryConfig = retries;

@@ -203,2 +209,12 @@ if (!retryConfig) {

break;
case [401, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
if (utils.matchContentType(contentType, "application/json")) {
res.schema = utils.objectToClass(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, shared.Schema);
}
break;
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
if (utils.matchContentType(contentType, "application/json")) {
res.listFiles404ApplicationJSONObject = utils.objectToClass(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, operations.ListFiles404ApplicationJSON);
}
break;
}

@@ -227,3 +243,3 @@ return [2 /*return*/, res];

}
baseURL = this._serverURL;
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/files", req);

@@ -239,6 +255,6 @@ _c = [{}, {}], reqBodyHeaders = _c[0], reqBody = _c[1];

}
client = this._securityClient || this._defaultClient;
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
headers["Accept"] = "*/*";
headers["user-agent"] = "speakeasy-sdk/".concat(this._language, " ").concat(this._sdkVersion, " ").concat(this._genVersion);
headers["Accept"] = "application/json;q=1, application/json;q=0";
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion);
retryConfig = retries;

@@ -266,2 +282,12 @@ if (!retryConfig) {

break;
case [400, 401, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
if (utils.matchContentType(contentType, "application/json")) {
res.schema = utils.objectToClass(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, shared.Schema);
}
break;
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 404:
if (utils.matchContentType(contentType, "application/json")) {
res.uploadFiles404ApplicationJSONObject = utils.objectToClass(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data, operations.UploadFiles404ApplicationJSON);
}
break;
}

@@ -268,0 +294,0 @@ return [2 /*return*/, res];

import { SpeakeasyBase } from "../../../internal/utils";
import * as shared from "../shared";
import { AxiosResponse } from "axios";

@@ -10,2 +11,16 @@ export declare class DownloadFilesRequest extends SpeakeasyBase {

}
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
export declare class DownloadFiles404ApplicationJSON extends SpeakeasyBase {
canBeRetried?: string;
correlationId?: string;
detailedErrorCode?: number;
error?: string;
service?: string;
statusCode?: number;
}
export declare class DownloadFilesResponse extends SpeakeasyBase {

@@ -19,2 +34,13 @@ contentType: string;

rawResponse?: AxiosResponse;
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
downloadFiles404ApplicationJSONObject?: DownloadFiles404ApplicationJSON;
/**
* The request made is not valid.
*/
schema?: shared.Schema;
}

@@ -20,2 +20,18 @@ "use strict";

})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,2 +43,9 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __metadata = (this && this.__metadata) || function (k, v) {

@@ -32,4 +55,6 @@ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);

Object.defineProperty(exports, "__esModule", { value: true });
exports.DownloadFilesResponse = exports.DownloadFilesRequest = void 0;
exports.DownloadFilesResponse = exports.DownloadFiles404ApplicationJSON = exports.DownloadFilesRequest = void 0;
var utils_1 = require("../../../internal/utils");
var shared = __importStar(require("../shared"));
var class_transformer_1 = require("class-transformer");
var DownloadFilesRequest = /** @class */ (function (_super) {

@@ -41,5 +66,3 @@ __extends(DownloadFilesRequest, _super);

__decorate([
(0, utils_1.SpeakeasyMetadata)({
data: "pathParam, style=simple;explode=false;name=companyId",
}),
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=companyId" }),
__metadata("design:type", String)

@@ -54,2 +77,46 @@ ], DownloadFilesRequest.prototype, "companyId", void 0);

exports.DownloadFilesRequest = DownloadFilesRequest;
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
var DownloadFiles404ApplicationJSON = /** @class */ (function (_super) {
__extends(DownloadFiles404ApplicationJSON, _super);
function DownloadFiles404ApplicationJSON() {
return _super !== null && _super.apply(this, arguments) || this;
}
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "canBeRetried" }),
__metadata("design:type", String)
], DownloadFiles404ApplicationJSON.prototype, "canBeRetried", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "correlationId" }),
__metadata("design:type", String)
], DownloadFiles404ApplicationJSON.prototype, "correlationId", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "detailedErrorCode" }),
__metadata("design:type", Number)
], DownloadFiles404ApplicationJSON.prototype, "detailedErrorCode", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "error" }),
__metadata("design:type", String)
], DownloadFiles404ApplicationJSON.prototype, "error", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "service" }),
__metadata("design:type", String)
], DownloadFiles404ApplicationJSON.prototype, "service", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "statusCode" }),
__metadata("design:type", Number)
], DownloadFiles404ApplicationJSON.prototype, "statusCode", void 0);
return DownloadFiles404ApplicationJSON;
}(utils_1.SpeakeasyBase));
exports.DownloadFiles404ApplicationJSON = DownloadFiles404ApplicationJSON;
var DownloadFilesResponse = /** @class */ (function (_super) {

@@ -76,4 +143,12 @@ __extends(DownloadFilesResponse, _super);

], DownloadFilesResponse.prototype, "rawResponse", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
__metadata("design:type", DownloadFiles404ApplicationJSON)
], DownloadFilesResponse.prototype, "downloadFiles404ApplicationJSONObject", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
__metadata("design:type", shared.Schema)
], DownloadFilesResponse.prototype, "schema", void 0);
return DownloadFilesResponse;
}(utils_1.SpeakeasyBase));
exports.DownloadFilesResponse = DownloadFilesResponse;

@@ -7,2 +7,16 @@ import { SpeakeasyBase } from "../../../internal/utils";

}
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
export declare class ListFiles404ApplicationJSON extends SpeakeasyBase {
canBeRetried?: string;
correlationId?: string;
detailedErrorCode?: number;
error?: string;
service?: string;
statusCode?: number;
}
export declare class ListFilesResponse extends SpeakeasyBase {

@@ -16,2 +30,13 @@ contentType: string;

rawResponse?: AxiosResponse;
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
listFiles404ApplicationJSONObject?: ListFiles404ApplicationJSON;
/**
* Your API request was not properly authorized.
*/
schema?: shared.Schema;
}

@@ -53,5 +53,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ListFilesResponse = exports.ListFilesRequest = void 0;
exports.ListFilesResponse = exports.ListFiles404ApplicationJSON = exports.ListFilesRequest = void 0;
var utils_1 = require("../../../internal/utils");
var shared = __importStar(require("../shared"));
var class_transformer_1 = require("class-transformer");
var ListFilesRequest = /** @class */ (function (_super) {

@@ -63,5 +64,3 @@ __extends(ListFilesRequest, _super);

__decorate([
(0, utils_1.SpeakeasyMetadata)({
data: "pathParam, style=simple;explode=false;name=companyId",
}),
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=companyId" }),
__metadata("design:type", String)

@@ -72,2 +71,46 @@ ], ListFilesRequest.prototype, "companyId", void 0);

exports.ListFilesRequest = ListFilesRequest;
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
var ListFiles404ApplicationJSON = /** @class */ (function (_super) {
__extends(ListFiles404ApplicationJSON, _super);
function ListFiles404ApplicationJSON() {
return _super !== null && _super.apply(this, arguments) || this;
}
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "canBeRetried" }),
__metadata("design:type", String)
], ListFiles404ApplicationJSON.prototype, "canBeRetried", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "correlationId" }),
__metadata("design:type", String)
], ListFiles404ApplicationJSON.prototype, "correlationId", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "detailedErrorCode" }),
__metadata("design:type", Number)
], ListFiles404ApplicationJSON.prototype, "detailedErrorCode", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "error" }),
__metadata("design:type", String)
], ListFiles404ApplicationJSON.prototype, "error", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "service" }),
__metadata("design:type", String)
], ListFiles404ApplicationJSON.prototype, "service", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "statusCode" }),
__metadata("design:type", Number)
], ListFiles404ApplicationJSON.prototype, "statusCode", void 0);
return ListFiles404ApplicationJSON;
}(utils_1.SpeakeasyBase));
exports.ListFiles404ApplicationJSON = ListFiles404ApplicationJSON;
var ListFilesResponse = /** @class */ (function (_super) {

@@ -94,4 +137,12 @@ __extends(ListFilesResponse, _super);

], ListFilesResponse.prototype, "rawResponse", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
__metadata("design:type", ListFiles404ApplicationJSON)
], ListFilesResponse.prototype, "listFiles404ApplicationJSONObject", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
__metadata("design:type", shared.Schema)
], ListFilesResponse.prototype, "schema", void 0);
return ListFilesResponse;
}(utils_1.SpeakeasyBase));
exports.ListFilesResponse = ListFilesResponse;
import { SpeakeasyBase } from "../../../internal/utils";
import * as shared from "../shared";
import { AxiosResponse } from "axios";

@@ -12,2 +13,16 @@ export declare class UploadFilesRequestBody extends SpeakeasyBase {

}
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
export declare class UploadFiles404ApplicationJSON extends SpeakeasyBase {
canBeRetried?: string;
correlationId?: string;
detailedErrorCode?: number;
error?: string;
service?: string;
statusCode?: number;
}
export declare class UploadFilesResponse extends SpeakeasyBase {

@@ -17,2 +32,13 @@ contentType: string;

rawResponse?: AxiosResponse;
/**
* The request made is not valid.
*/
schema?: shared.Schema;
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
uploadFiles404ApplicationJSONObject?: UploadFiles404ApplicationJSON;
}

@@ -20,2 +20,18 @@ "use strict";

})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -27,2 +43,9 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __metadata = (this && this.__metadata) || function (k, v) {

@@ -32,4 +55,6 @@ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);

Object.defineProperty(exports, "__esModule", { value: true });
exports.UploadFilesResponse = exports.UploadFilesRequest = exports.UploadFilesRequestBody = void 0;
exports.UploadFilesResponse = exports.UploadFiles404ApplicationJSON = exports.UploadFilesRequest = exports.UploadFilesRequestBody = void 0;
var utils_1 = require("../../../internal/utils");
var shared = __importStar(require("../shared"));
var class_transformer_1 = require("class-transformer");
var UploadFilesRequestBody = /** @class */ (function (_super) {

@@ -63,11 +88,7 @@ __extends(UploadFilesRequestBody, _super);

__decorate([
(0, utils_1.SpeakeasyMetadata)({
data: "pathParam, style=simple;explode=false;name=companyId",
}),
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=companyId" }),
__metadata("design:type", String)
], UploadFilesRequest.prototype, "companyId", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)({
data: "pathParam, style=simple;explode=false;name=connectionId",
}),
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=connectionId" }),
__metadata("design:type", String)

@@ -78,2 +99,46 @@ ], UploadFilesRequest.prototype, "connectionId", void 0);

exports.UploadFilesRequest = UploadFilesRequest;
/**
* One or more of the resources you referenced could not be found.
*
* @remarks
* This might be because your company or data connection id is wrong, or was already deleted.
*/
var UploadFiles404ApplicationJSON = /** @class */ (function (_super) {
__extends(UploadFiles404ApplicationJSON, _super);
function UploadFiles404ApplicationJSON() {
return _super !== null && _super.apply(this, arguments) || this;
}
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "canBeRetried" }),
__metadata("design:type", String)
], UploadFiles404ApplicationJSON.prototype, "canBeRetried", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "correlationId" }),
__metadata("design:type", String)
], UploadFiles404ApplicationJSON.prototype, "correlationId", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "detailedErrorCode" }),
__metadata("design:type", Number)
], UploadFiles404ApplicationJSON.prototype, "detailedErrorCode", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "error" }),
__metadata("design:type", String)
], UploadFiles404ApplicationJSON.prototype, "error", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "service" }),
__metadata("design:type", String)
], UploadFiles404ApplicationJSON.prototype, "service", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "statusCode" }),
__metadata("design:type", Number)
], UploadFiles404ApplicationJSON.prototype, "statusCode", void 0);
return UploadFiles404ApplicationJSON;
}(utils_1.SpeakeasyBase));
exports.UploadFiles404ApplicationJSON = UploadFiles404ApplicationJSON;
var UploadFilesResponse = /** @class */ (function (_super) {

@@ -96,4 +161,12 @@ __extends(UploadFilesResponse, _super);

], UploadFilesResponse.prototype, "rawResponse", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
__metadata("design:type", shared.Schema)
], UploadFilesResponse.prototype, "schema", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
__metadata("design:type", UploadFiles404ApplicationJSON)
], UploadFilesResponse.prototype, "uploadFiles404ApplicationJSONObject", void 0);
return UploadFilesResponse;
}(utils_1.SpeakeasyBase));
exports.UploadFilesResponse = UploadFilesResponse;
export * from "./file";
export * from "./schema";
export * from "./security";

@@ -21,2 +21,3 @@ "use strict";

__exportStar(require("./file"), exports);
__exportStar(require("./schema"), exports);
__exportStar(require("./security"), exports);

@@ -21,2 +21,6 @@ import { Files } from "./files";

/**
* Allows overriding the default server used by the SDK
*/
serverIdx?: number;
/**
* Allows overriding the default server URL used by the SDK

@@ -26,4 +30,14 @@ */

};
export declare class SDKConfiguration {
defaultClient: AxiosInstance;
securityClient: AxiosInstance;
serverURL: string;
serverDefaults: any;
language: string;
sdkVersion: string;
genVersion: string;
constructor(init?: Partial<SDKConfiguration>);
}
/**
* An API for uploading and downloading files from 'File Upload' Integrations.
* Files API: An API for uploading and downloading files from 'File Upload' Integrations.
*

@@ -43,10 +57,4 @@ * @remarks

files: Files;
_defaultClient: AxiosInstance;
_securityClient: AxiosInstance;
_serverURL: string;
private _language;
private _sdkVersion;
private _genVersion;
private _globals;
private sdkConfiguration;
constructor(props?: SDKProps);
}

@@ -32,3 +32,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CodatFiles = exports.ServerList = void 0;
exports.CodatFiles = exports.SDKConfiguration = exports.ServerList = void 0;
var utils = __importStar(require("../internal/utils"));

@@ -47,4 +47,14 @@ var files_1 = require("./files");

];
var SDKConfiguration = /** @class */ (function () {
function SDKConfiguration(init) {
this.language = "typescript";
this.sdkVersion = "0.23.1";
this.genVersion = "2.35.9";
Object.assign(this, init);
}
return SDKConfiguration;
}());
exports.SDKConfiguration = SDKConfiguration;
/**
* An API for uploading and downloading files from 'File Upload' Integrations.
* Files API: An API for uploading and downloading files from 'File Upload' Integrations.
*

@@ -62,18 +72,22 @@ * @remarks

var _a, _b;
this._language = "typescript";
this._sdkVersion = "0.20.0";
this._genVersion = "2.31.0";
this._serverURL = (_a = props === null || props === void 0 ? void 0 : props.serverURL) !== null && _a !== void 0 ? _a : exports.ServerList[0];
this._defaultClient =
(_b = props === null || props === void 0 ? void 0 : props.defaultClient) !== null && _b !== void 0 ? _b : axios_1.default.create({ baseURL: this._serverURL });
var serverURL = props === null || props === void 0 ? void 0 : props.serverURL;
var serverIdx = (_a = props === null || props === void 0 ? void 0 : props.serverIdx) !== null && _a !== void 0 ? _a : 0;
if (!serverURL) {
serverURL = exports.ServerList[serverIdx];
}
var defaultClient = (_b = props === null || props === void 0 ? void 0 : props.defaultClient) !== null && _b !== void 0 ? _b : axios_1.default.create({ baseURL: serverURL });
var securityClient = defaultClient;
if (props === null || props === void 0 ? void 0 : props.security) {
var security = props.security;
if (!(props.security instanceof utils.SpeakeasyBase))
if (!(props.security instanceof utils.SpeakeasyBase)) {
security = new shared.Security(props.security);
this._securityClient = utils.createSecurityClient(this._defaultClient, security);
}
securityClient = utils.createSecurityClient(defaultClient, security);
}
else {
this._securityClient = this._defaultClient;
}
this.files = new files_1.Files(this._defaultClient, this._securityClient, this._serverURL, this._language, this._sdkVersion, this._genVersion);
this.sdkConfiguration = new SDKConfiguration({
defaultClient: defaultClient,
securityClient: securityClient,
serverURL: serverURL,
});
this.files = new files_1.Files(this.sdkConfiguration);
}

@@ -80,0 +94,0 @@ return CodatFiles;

{
"name": "@codat/files",
"version": "0.20.0",
"version": "0.23.1",
"author": "Speakeasy",

@@ -10,2 +10,3 @@ "scripts": {

"axios": "^1.1.3",
"jsonpath": "^1.1.1",
"class-transformer": "^0.5.1",

@@ -16,2 +17,3 @@ "form-data": "^4.0.0",

"devDependencies": {
"@types/jsonpath": "^0.2.0",
"@types/node": "^18.11.5",

@@ -18,0 +20,0 @@ "typescript": "^4.8.4",

@@ -27,3 +27,3 @@ # @codat/files

security: {
authHeader: "YOUR_API_KEY_HERE",
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},

@@ -30,0 +30,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc