Socket
Socket
Sign inDemoInstall

@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.35.0 to 0.36.0

2

dist/internal/utils/requestbody.js

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

}
formData.append("file", Buffer.from(content), fileName);
formData.append(mpFormDecoratorName, Buffer.from(content), fileName);
return formData;

@@ -274,0 +274,0 @@ }

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

var value = payload[prop.key];
if (isSpeakeasyBase(prop.type)) {
if (isSpeakeasyBase(prop.type) && value != null) {
this[prop.key] = new prop.type(value);

@@ -110,0 +110,0 @@ }

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

}
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
headers["user-agent"] = this.sdkConfiguration.userAgent;
globalRetryConfig = this.sdkConfiguration.retryConfig;

@@ -237,3 +237,3 @@ retryConfig = retries;

headers["Accept"] = "application/json";
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
headers["user-agent"] = this.sdkConfiguration.userAgent;
globalRetryConfig = this.sdkConfiguration.retryConfig;

@@ -322,3 +322,3 @@ retryConfig = retries;

url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/files", req);
_c = __read([{}, {}], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
try {

@@ -346,3 +346,3 @@ _d = __read(utils.serializeRequestBody(req, "requestBody", "multipart"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];

headers["Accept"] = "application/json";
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
headers["user-agent"] = this.sdkConfiguration.userAgent;
globalRetryConfig = this.sdkConfiguration.retryConfig;

@@ -349,0 +349,0 @@ retryConfig = retries;

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

export declare class DownloadFilesRequest extends SpeakeasyBase {
/**
* Unique identifier for a company.
*/
companyId: string;

@@ -19,10 +22,31 @@ /**

export declare class DownloadFilesErrorMessage extends SpeakeasyBase {
/**
* `True` if the error occurred transiently and can be retried.
*/
canBeRetried?: string;
/**
* Unique identifier used to propagate to all downstream services and determine the source of the error.
*/
correlationId?: string;
/**
* Machine readable error code used to automate processes based on the code returned.
*/
detailedErrorCode?: number;
/**
* A brief description of the error.
*/
error?: string;
/**
* Codat's service the returned the error.
*/
service?: string;
/**
* The HTTP status code returned by the error.
*/
statusCode?: number;
}
export declare class DownloadFilesResponse extends SpeakeasyBase {
/**
* HTTP response content type for this operation
*/
contentType: string;

@@ -40,3 +64,9 @@ /**

errorMessage?: DownloadFilesErrorMessage;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: AxiosResponse;

@@ -43,0 +73,0 @@ /**

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

export declare class ListFilesRequest extends SpeakeasyBase {
/**
* Unique identifier for a company.
*/
companyId: string;

@@ -15,10 +18,31 @@ }

export declare class ListFilesErrorMessage extends SpeakeasyBase {
/**
* `True` if the error occurred transiently and can be retried.
*/
canBeRetried?: string;
/**
* Unique identifier used to propagate to all downstream services and determine the source of the error.
*/
correlationId?: string;
/**
* Machine readable error code used to automate processes based on the code returned.
*/
detailedErrorCode?: number;
/**
* A brief description of the error.
*/
error?: string;
/**
* Codat's service the returned the error.
*/
service?: string;
/**
* The HTTP status code returned by the error.
*/
statusCode?: number;
}
export declare class ListFilesResponse extends SpeakeasyBase {
/**
* HTTP response content type for this operation
*/
contentType: string;

@@ -36,3 +60,9 @@ /**

files?: shared.File[];
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: AxiosResponse;

@@ -39,0 +69,0 @@ /**

@@ -10,3 +10,9 @@ import { SpeakeasyBase } from "../../../internal/utils";

requestBody?: UploadFilesRequestBody;
/**
* Unique identifier for a company.
*/
companyId: string;
/**
* Unique identifier for a connection.
*/
connectionId: string;

@@ -21,10 +27,31 @@ }

export declare class UploadFilesErrorMessage extends SpeakeasyBase {
/**
* `True` if the error occurred transiently and can be retried.
*/
canBeRetried?: string;
/**
* Unique identifier used to propagate to all downstream services and determine the source of the error.
*/
correlationId?: string;
/**
* Machine readable error code used to automate processes based on the code returned.
*/
detailedErrorCode?: number;
/**
* A brief description of the error.
*/
error?: string;
/**
* Codat's service the returned the error.
*/
service?: string;
/**
* The HTTP status code returned by the error.
*/
statusCode?: number;
}
export declare class UploadFilesResponse extends SpeakeasyBase {
/**
* HTTP response content type for this operation
*/
contentType: string;

@@ -38,3 +65,9 @@ /**

errorMessage?: UploadFilesErrorMessage;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse?: AxiosResponse;

@@ -41,0 +74,0 @@ /**

import { SpeakeasyBase } from "../../../internal/utils";
export declare class File extends SpeakeasyBase {
/**
* An optional display name for the file.
*/
displayName?: string;
/**
* The file's name.
*/
fileName?: string;
/**
* The source of the file uploaded.
*/
sourceType?: string;

@@ -6,0 +15,0 @@ /**

import { SpeakeasyBase } from "../../../internal/utils";
export declare class Schema extends SpeakeasyBase {
/**
* `True` if the error occurred transiently and can be retried.
*/
canBeRetried?: string;
/**
* Unique identifier used to propagate to all downstream services and determine the source of the error.
*/
correlationId?: string;
/**
* Machine readable error code used to automate processes based on the code returned.
*/
detailedErrorCode?: number;
/**
* A brief description of the error.
*/
error?: string;
/**
* Codat's service the returned the error.
*/
service?: string;
/**
* The HTTP status code returned by the error.
*/
statusCode?: number;
}

@@ -43,2 +43,3 @@ import * as utils from "../internal/utils";

genVersion: string;
userAgent: string;
retryConfig?: utils.RetryConfig;

@@ -45,0 +46,0 @@ constructor(init?: Partial<SDKConfiguration>);

@@ -25,4 +25,5 @@ "use strict";

this.openapiDocVersion = "3.0.0";
this.sdkVersion = "0.35.0";
this.genVersion = "2.109.3";
this.sdkVersion = "0.36.0";
this.genVersion = "2.159.2";
this.userAgent = "speakeasy-sdk/typescript 0.36.0 2.159.2 3.0.0 @codat/files";
Object.assign(this, init);

@@ -29,0 +30,0 @@ }

@@ -9,9 +9,9 @@ # DownloadFilesErrorMessage

| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | N/A |
| `correlationId` | *string* | :heavy_minus_sign: | N/A |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | N/A |
| `error` | *string* | :heavy_minus_sign: | N/A |
| `service` | *string* | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. |
| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. |
| `error` | *string* | :heavy_minus_sign: | A brief description of the error. |
| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. |
| `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. |

@@ -8,3 +8,3 @@ # DownloadFilesRequest

| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
| `date` | *string* | :heavy_minus_sign: | Only download files uploaded on this date. | 2022-10-23T00:00:00.000Z |

@@ -8,7 +8,7 @@ # DownloadFilesResponse

| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | N/A |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `data` | *Uint8Array* | :heavy_minus_sign: | Success |
| `errorMessage` | [DownloadFilesErrorMessage](../../models/operations/downloadfileserrormessage.md) | :heavy_minus_sign: | One or more of the resources you referenced could not be found.<br/>This might be because your company or data connection id is wrong, or was already deleted. |
| `statusCode` | *number* | :heavy_check_mark: | N/A |
| `rawResponse` | [AxiosResponse>](https://axios-http.com/docs/res_schema) | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
| `schema` | [shared.Schema](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. |

@@ -9,9 +9,9 @@ # ListFilesErrorMessage

| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | N/A |
| `correlationId` | *string* | :heavy_minus_sign: | N/A |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | N/A |
| `error` | *string* | :heavy_minus_sign: | N/A |
| `service` | *string* | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. |
| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. |
| `error` | *string* | :heavy_minus_sign: | A brief description of the error. |
| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. |
| `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. |

@@ -8,2 +8,2 @@ # ListFilesRequest

| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |

@@ -8,7 +8,7 @@ # ListFilesResponse

| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | N/A |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `errorMessage` | [ListFilesErrorMessage](../../models/operations/listfileserrormessage.md) | :heavy_minus_sign: | One or more of the resources you referenced could not be found.<br/>This might be because your company or data connection id is wrong, or was already deleted. |
| `files` | [shared.File](../../models/shared/file.md)[] | :heavy_minus_sign: | Success |
| `statusCode` | *number* | :heavy_check_mark: | N/A |
| `rawResponse` | [AxiosResponse>](https://axios-http.com/docs/res_schema) | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
| `schema` | [shared.Schema](../../models/shared/schema.md) | :heavy_minus_sign: | Your API request was not properly authorized. |

@@ -9,9 +9,9 @@ # UploadFilesErrorMessage

| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | N/A |
| `correlationId` | *string* | :heavy_minus_sign: | N/A |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | N/A |
| `error` | *string* | :heavy_minus_sign: | N/A |
| `service` | *string* | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. |
| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. |
| `error` | *string* | :heavy_minus_sign: | A brief description of the error. |
| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. |
| `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. |

@@ -9,3 +9,3 @@ # UploadFilesRequest

| `requestBody` | [UploadFilesRequestBody](../../models/operations/uploadfilesrequestbody.md) | :heavy_minus_sign: | N/A | |
| `companyId` | *string* | :heavy_check_mark: | N/A | 8a210b68-6988-11ed-a1eb-0242ac120002 |
| `connectionId` | *string* | :heavy_check_mark: | N/A | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |

@@ -8,6 +8,6 @@ # UploadFilesResponse

| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | N/A |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `errorMessage` | [UploadFilesErrorMessage](../../models/operations/uploadfileserrormessage.md) | :heavy_minus_sign: | One or more of the resources you referenced could not be found.<br/>This might be because your company or data connection id is wrong, or was already deleted. |
| `statusCode` | *number* | :heavy_check_mark: | N/A |
| `rawResponse` | [AxiosResponse>](https://axios-http.com/docs/res_schema) | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
| `schema` | [shared.Schema](../../models/shared/schema.md) | :heavy_minus_sign: | The request made is not valid. |

@@ -8,5 +8,5 @@ # File

| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `displayName` | *string* | :heavy_minus_sign: | N/A | |
| `fileName` | *string* | :heavy_minus_sign: | N/A | |
| `sourceType` | *string* | :heavy_minus_sign: | N/A | |
| `displayName` | *string* | :heavy_minus_sign: | An optional display name for the file. | |
| `fileName` | *string* | :heavy_minus_sign: | The file's name. | |
| `sourceType` | *string* | :heavy_minus_sign: | The source of the file uploaded. | |
| `uploaded` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |

@@ -6,9 +6,9 @@ # Schema

| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | N/A |
| `correlationId` | *string* | :heavy_minus_sign: | N/A |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | N/A |
| `error` | *string* | :heavy_minus_sign: | N/A |
| `service` | *string* | :heavy_minus_sign: | N/A |
| `statusCode` | *number* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. |
| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. |
| `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. |
| `error` | *string* | :heavy_minus_sign: | A brief description of the error. |
| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. |
| `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. |
# CodatFiles SDK
## Overview

@@ -4,0 +5,0 @@

@@ -1,2 +0,3 @@

# files
# Files
(*files*)

@@ -21,18 +22,19 @@ ## Overview

import { CodatFiles } from "@codat/files";
import { DownloadFilesResponse } from "@codat/files/dist/sdk/models/operations";
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
(async() => {
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
sdk.files.downloadFiles({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
date: "2022-10-23T00:00:00.000Z",
}).then((res: DownloadFilesResponse) => {
const res = await sdk.files.downloadFiles({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
date: "2022-10-23T00:00:00.000Z",
});
if (res.statusCode == 200) {
// handle response
}
});
})();
```

@@ -62,17 +64,18 @@

import { CodatFiles } from "@codat/files";
import { ListFilesResponse } from "@codat/files/dist/sdk/models/operations";
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
(async() => {
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
sdk.files.listFiles({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
}).then((res: ListFilesResponse) => {
const res = await sdk.files.listFiles({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
});
if (res.statusCode == 200) {
// handle response
}
});
})();
```

@@ -108,22 +111,23 @@

import { CodatFiles } from "@codat/files";
import { UploadFilesResponse } from "@codat/files/dist/sdk/models/operations";
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
(async() => {
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
sdk.files.uploadFiles({
requestBody: {
content: "distinctio".encode(),
requestBody: "quibusdam",
},
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
}).then((res: UploadFilesResponse) => {
const res = await sdk.files.uploadFiles({
requestBody: {
content: ";*>'Oq[l/G" as bytes <<<>>>,
requestBody: "syndicate Central defect",
},
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
});
if (res.statusCode == 200) {
// handle response
}
});
})();
```

@@ -130,0 +134,0 @@

{
"name": "@codat/files",
"version": "0.35.0",
"version": "0.36.0",
"author": "Codat",
"scripts": {
"prepare": "tsc --build"
"prepare": "tsc --build",
"check:tsc": "tsc --noEmit --skipLibCheck",
"check:eslint": "eslint --max-warnings=0 src",
"check": "npm run check:tsc && npm run check:eslint"
},

@@ -8,0 +11,0 @@ "dependencies": {

# Files
<!-- Start Codat Library Description -->
Use Codat's Files API to upload your SMB customers' files.
<!-- End Codat Library Description -->

@@ -23,22 +25,22 @@ <!-- Start SDK Installation -->

<!-- Start SDK Example Usage -->
```typescript
import { CodatFiles } from "@codat/files";
import { DownloadFilesResponse } from "@codat/files/dist/sdk/models/operations";
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
(async () => {
const sdk = new CodatFiles({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
sdk.files.downloadFiles({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
date: "2022-10-23T00:00:00.000Z",
}).then((res: DownloadFilesResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
const res = await sdk.files.downloadFiles({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
date: "2022-10-23T00:00:00.000Z",
});
if (res.statusCode == 200) {
// handle response
}
})();
```

@@ -57,2 +59,14 @@ <!-- End SDK Example Usage -->

<!-- End SDK Available Operations -->
### Library generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
<!-- Start Dev Containers -->
<!-- End Dev Containers -->
<!-- Placeholder for Future Speakeasy SDK Sections -->
### Library generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
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