diff --git a/bank-feeds/.eslintrc.yml b/bank-feeds/.eslintrc.yml old mode 100755 new mode 100644 diff --git a/bank-feeds/.gitattributes b/bank-feeds/.gitattributes old mode 100755 new mode 100644 diff --git a/bank-feeds/README.md b/bank-feeds/README.md index 862bb1e77..6b5335f32 100755 --- a/bank-feeds/README.md +++ b/bank-feeds/README.md @@ -22,6 +22,8 @@ yarn add @codat/bank-feeds ## Example Usage +### Example + ```typescript import { CodatBankFeeds } from "@codat/bank-feeds"; @@ -32,12 +34,9 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; }, }); - const res = await sdk.accountMapping.create({ - requestBody: { - feedStartDate: "2022-10-23T00:00:00.000Z", - }, - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + const res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", }); if (res.statusCode == 200) { @@ -52,11 +51,6 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ## Available Resources and Operations -### [accountMapping](docs/sdks/accountmapping/README.md) - -* [create](docs/sdks/accountmapping/README.md#create) - Create bank feed account mapping -* [get](docs/sdks/accountmapping/README.md#get) - List bank feed account mappings - ### [companies](docs/sdks/companies/README.md) * [create](docs/sdks/companies/README.md#create) - Create company @@ -73,6 +67,11 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; * [list](docs/sdks/connections/README.md#list) - List connections * [unlink](docs/sdks/connections/README.md#unlink) - Unlink connection +### [accountMapping](docs/sdks/accountmapping/README.md) + +* [create](docs/sdks/accountmapping/README.md#create) - Create bank feed account mapping +* [get](docs/sdks/accountmapping/README.md#get) - List bank feed account mappings + ### [sourceAccounts](docs/sdks/sourceaccounts/README.md) * [create](docs/sdks/sourceaccounts/README.md#create) - Create source account @@ -97,6 +96,246 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: +```typescript +import { CodatBankFeeds } from "@codat/bank-feeds"; + +(async () => { + const sdk = new CodatBankFeeds({ + security: { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", + }, + }); + + const res = await sdk.companies.create( + { + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", + }, + { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + } + ); + + if (res.statusCode == 200) { + // handle response + } +})(); + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: +```typescript +import { CodatBankFeeds } from "@codat/bank-feeds"; + +(async () => { + const sdk = new CodatBankFeeds({ + retry_config: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + security: { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", + }, + }); + + const res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", + }); + + if (res.statusCode == 200) { + // handle response + } +})(); + +``` + + + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. + +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | + +Example + +```typescript +import { CodatBankFeeds } from "@codat/bank-feeds"; + +(async () => { + const sdk = new CodatBankFeeds({ + security: { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", + }, + }); + + let res; + try { + res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", + }); + } catch (e) {} + + if (res.statusCode == 200) { + // handle response + } +})(); + +``` + + + + + +## Server Selection + +### Select Server by Index + +You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: + +| # | Server | Variables | +| - | ------ | --------- | +| 0 | `https://api.codat.io` | None | + +#### Example + +```typescript +import { CodatBankFeeds } from "@codat/bank-feeds"; + +(async () => { + const sdk = new CodatBankFeeds({ + serverIdx: 0, + security: { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", + }, + }); + + const res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", + }); + + if (res.statusCode == 200) { + // handle response + } +})(); + +``` + + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example: +```typescript +import { CodatBankFeeds } from "@codat/bank-feeds"; + +(async () => { + const sdk = new CodatBankFeeds({ + serverURL: "https://api.codat.io", + security: { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", + }, + }); + + const res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", + }); + + if (res.statusCode == 200) { + // handle response + } +})(); + +``` + + + + + +## Custom HTTP Client + +The Typescript SDK makes API calls using the (axios)[https://axios-http.com/docs/intro] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object. + +For example, you could specify a header for every request that your sdk makes as follows: + +```typescript +from @codat/bank-feeds import CodatBankFeeds; +import axios; + +const httpClient = axios.create({ + headers: {'x-custom-header': 'someValue'} +}) + +const sdk = new CodatBankFeeds({defaultClient: httpClient}); +``` + + + + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| ------------ | ------------ | ------------ | +| `authHeader` | apiKey | API key | + +You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example: +```typescript +import { CodatBankFeeds } from "@codat/bank-feeds"; + +(async () => { + const sdk = new CodatBankFeeds({ + security: { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", + }, + }); + + const res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", + }); + + if (res.statusCode == 200) { + // handle response + } +})(); + +``` + + diff --git a/bank-feeds/RELEASES.md b/bank-feeds/RELEASES.md index 2939e7a39..ce6339479 100644 --- a/bank-feeds/RELEASES.md +++ b/bank-feeds/RELEASES.md @@ -666,4 +666,14 @@ Based on: ### Generated - [typescript v2.2.0] bank-feeds ### Releases -- [NPM v2.2.0] https://www.npmjs.com/package/@codat/bank-feeds/v/2.2.0 - bank-feeds \ No newline at end of file +- [NPM v2.2.0] https://www.npmjs.com/package/@codat/bank-feeds/v/2.2.0 - bank-feeds + +## 2023-11-21 11:18:45 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml +- Speakeasy CLI 1.121.3 (2.195.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v3.0.0] bank-feeds +### Releases +- [NPM v3.0.0] https://www.npmjs.com/package/@codat/bank-feeds/v/3.0.0 - bank-feeds \ No newline at end of file diff --git a/bank-feeds/USAGE.md b/bank-feeds/USAGE.md old mode 100755 new mode 100644 index 6e0bfe505..6e0838f74 --- a/bank-feeds/USAGE.md +++ b/bank-feeds/USAGE.md @@ -1,6 +1,4 @@ - - ```typescript import { CodatBankFeeds } from "@codat/bank-feeds"; @@ -11,12 +9,9 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; }, }); - const res = await sdk.accountMapping.create({ - requestBody: { - feedStartDate: "2022-10-23T00:00:00.000Z", - }, - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + const res = await sdk.companies.create({ + description: "Requested early access to the new financing scheme.", + name: "Bank of Dave", }); if (res.statusCode == 200) { diff --git a/bank-feeds/docs/models/utils/retryconfig.md b/bank-feeds/docs/internal/utils/retryconfig.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/utils/retryconfig.md rename to bank-feeds/docs/internal/utils/retryconfig.md diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md b/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md deleted file mode 100755 index 3ce36c510..000000000 --- a/bank-feeds/docs/models/operations/createbankaccountmappingrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateBankAccountMappingRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `requestBody` | [CreateBankAccountMappingBankFeedAccountMapping](../../models/operations/createbankaccountmappingbankfeedaccountmapping.md) | :heavy_minus_sign: | N/A | | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md b/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md deleted file mode 100755 index 076c92f50..000000000 --- a/bank-feeds/docs/models/operations/createbankaccountmappingresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateBankAccountMappingResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `bankFeedAccountMappingResponse` | [shared.BankFeedAccountMappingResponse](../../models/shared/bankfeedaccountmappingresponse.md) | :heavy_minus_sign: | Success | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createbanktransactionsrequest.md b/bank-feeds/docs/models/operations/createbanktransactionsrequest.md deleted file mode 100755 index 41e6e87dc..000000000 --- a/bank-feeds/docs/models/operations/createbanktransactionsrequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateBankTransactionsRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `createBankTransactions` | [shared.CreateBankTransactions](../../models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | -| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | 13d946f0-c5d5-42bc-b092-97ece17923ab | -| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | -| `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 | -| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createbanktransactionsresponse.md b/bank-feeds/docs/models/operations/createbanktransactionsresponse.md deleted file mode 100755 index 1bd311202..000000000 --- a/bank-feeds/docs/models/operations/createbanktransactionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateBankTransactionsResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `createBankTransactionsResponse` | [shared.CreateBankTransactionsResponse](../../models/shared/createbanktransactionsresponse.md) | :heavy_minus_sign: | Success | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createcompanyresponse.md b/bank-feeds/docs/models/operations/createcompanyresponse.md deleted file mode 100755 index fbea99625..000000000 --- a/bank-feeds/docs/models/operations/createcompanyresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateCompanyResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `company` | [shared.Company](../../models/shared/company.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createconnectionrequest.md b/bank-feeds/docs/models/operations/createconnectionrequest.md deleted file mode 100755 index ff01a941a..000000000 --- a/bank-feeds/docs/models/operations/createconnectionrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateConnectionRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `requestBody` | [CreateConnectionRequestBody](../../models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createconnectionresponse.md b/bank-feeds/docs/models/operations/createconnectionresponse.md deleted file mode 100755 index f551ac120..000000000 --- a/bank-feeds/docs/models/operations/createconnectionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectionResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `connection` | [shared.Connection](../../models/shared/connection.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createsourceaccountrequest.md b/bank-feeds/docs/models/operations/createsourceaccountrequest.md deleted file mode 100755 index 9fd9d8a7b..000000000 --- a/bank-feeds/docs/models/operations/createsourceaccountrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateSourceAccountRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `sourceAccount` | [shared.SourceAccount](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createsourceaccountresponse.md b/bank-feeds/docs/models/operations/createsourceaccountresponse.md deleted file mode 100755 index c47927430..000000000 --- a/bank-feeds/docs/models/operations/createsourceaccountresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateSourceAccountResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | -| `sourceAccount` | [shared.SourceAccount](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md b/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md deleted file mode 100755 index 3a6b3da35..000000000 --- a/bank-feeds/docs/models/operations/deletebankfeedcredentialsresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteBankFeedCredentialsResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deletecompanyresponse.md b/bank-feeds/docs/models/operations/deletecompanyresponse.md deleted file mode 100755 index 522cd4021..000000000 --- a/bank-feeds/docs/models/operations/deletecompanyresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteCompanyResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deleteconnectionresponse.md b/bank-feeds/docs/models/operations/deleteconnectionresponse.md deleted file mode 100755 index d6217b284..000000000 --- a/bank-feeds/docs/models/operations/deleteconnectionresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteConnectionResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deletesourceaccountresponse.md b/bank-feeds/docs/models/operations/deletesourceaccountresponse.md deleted file mode 100755 index 85faff9a1..000000000 --- a/bank-feeds/docs/models/operations/deletesourceaccountresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteSourceAccountResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/generatecredentialsresponse.md b/bank-feeds/docs/models/operations/generatecredentialsresponse.md deleted file mode 100755 index e4c5385b1..000000000 --- a/bank-feeds/docs/models/operations/generatecredentialsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GenerateCredentialsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `bankAccountCredentials` | [shared.BankAccountCredentials](../../models/shared/bankaccountcredentials.md) | :heavy_minus_sign: | Success | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md b/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md deleted file mode 100755 index 3d70d34db..000000000 --- a/bank-feeds/docs/models/operations/getbankaccountmappingresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetBankAccountMappingResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `bankFeedMapping` | [shared.BankFeedMapping](../../models/shared/bankfeedmapping.md) | :heavy_minus_sign: | Success | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getcompanyresponse.md b/bank-feeds/docs/models/operations/getcompanyresponse.md deleted file mode 100755 index 92c110ee5..000000000 --- a/bank-feeds/docs/models/operations/getcompanyresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCompanyResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `company` | [shared.Company](../../models/shared/company.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getconnectionresponse.md b/bank-feeds/docs/models/operations/getconnectionresponse.md deleted file mode 100755 index 066e18037..000000000 --- a/bank-feeds/docs/models/operations/getconnectionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetConnectionResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `connection` | [shared.Connection](../../models/shared/connection.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getcreateoperationresponse.md b/bank-feeds/docs/models/operations/getcreateoperationresponse.md deleted file mode 100755 index d78e8a251..000000000 --- a/bank-feeds/docs/models/operations/getcreateoperationresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetCreateOperationResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `pushOperation` | [shared.PushOperation](../../models/shared/pushoperation.md) | :heavy_minus_sign: | OK | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listcompaniesresponse.md b/bank-feeds/docs/models/operations/listcompaniesresponse.md deleted file mode 100755 index b80b41458..000000000 --- a/bank-feeds/docs/models/operations/listcompaniesresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListCompaniesResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `companies` | [shared.Companies](../../models/shared/companies.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listconnectionsresponse.md b/bank-feeds/docs/models/operations/listconnectionsresponse.md deleted file mode 100755 index 27ac2ac6c..000000000 --- a/bank-feeds/docs/models/operations/listconnectionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListConnectionsResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `connections` | [shared.Connections](../../models/shared/connections.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listcreateoperationsresponse.md b/bank-feeds/docs/models/operations/listcreateoperationsresponse.md deleted file mode 100755 index 36cadbffb..000000000 --- a/bank-feeds/docs/models/operations/listcreateoperationsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListCreateOperationsResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | -| `pushOperations` | [shared.PushOperations](../../models/shared/pushoperations.md) | :heavy_minus_sign: | OK | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listsourceaccountsresponse.md b/bank-feeds/docs/models/operations/listsourceaccountsresponse.md deleted file mode 100755 index b378a5525..000000000 --- a/bank-feeds/docs/models/operations/listsourceaccountsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSourceAccountsResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `sourceAccount` | [shared.SourceAccount](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/unlinkconnectionrequest.md b/bank-feeds/docs/models/operations/unlinkconnectionrequest.md deleted file mode 100755 index dc2a275c9..000000000 --- a/bank-feeds/docs/models/operations/unlinkconnectionrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnlinkConnectionRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `requestBody` | [UnlinkConnectionUpdateConnection](../../models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/unlinkconnectionresponse.md b/bank-feeds/docs/models/operations/unlinkconnectionresponse.md deleted file mode 100755 index 1ed8096b4..000000000 --- a/bank-feeds/docs/models/operations/unlinkconnectionresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UnlinkConnectionResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `connection` | [shared.Connection](../../models/shared/connection.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/unlinkconnectionupdateconnection.md b/bank-feeds/docs/models/operations/unlinkconnectionupdateconnection.md deleted file mode 100755 index 6c5d0c911..000000000 --- a/bank-feeds/docs/models/operations/unlinkconnectionupdateconnection.md +++ /dev/null @@ -1,8 +0,0 @@ -# UnlinkConnectionUpdateConnection - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `status` | [shared.DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/updatecompanyrequest.md b/bank-feeds/docs/models/operations/updatecompanyrequest.md deleted file mode 100755 index 1d8b392f3..000000000 --- a/bank-feeds/docs/models/operations/updatecompanyrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateCompanyRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `companyRequestBody` | [shared.CompanyRequestBody](../../models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/updatecompanyresponse.md b/bank-feeds/docs/models/operations/updatecompanyresponse.md deleted file mode 100755 index 5adffab4a..000000000 --- a/bank-feeds/docs/models/operations/updatecompanyresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateCompanyResponse - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `company` | [shared.Company](../../models/shared/company.md) | :heavy_minus_sign: | OK | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/updatesourceaccountrequest.md b/bank-feeds/docs/models/operations/updatesourceaccountrequest.md deleted file mode 100755 index 4fe60909e..000000000 --- a/bank-feeds/docs/models/operations/updatesourceaccountrequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSourceAccountRequest - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `sourceAccount` | [shared.SourceAccount](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | | -| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | 13d946f0-c5d5-42bc-b092-97ece17923ab | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/updatesourceaccountresponse.md b/bank-feeds/docs/models/operations/updatesourceaccountresponse.md deleted file mode 100755 index cc770cb06..000000000 --- a/bank-feeds/docs/models/operations/updatesourceaccountresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateSourceAccountResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `sourceAccount` | [shared.SourceAccount](../../models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | -| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md b/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md deleted file mode 100755 index 0315b29f9..000000000 --- a/bank-feeds/docs/models/shared/clientratelimitreachedwebhook.md +++ /dev/null @@ -1,16 +0,0 @@ -# ClientRateLimitReachedWebhook - -Webhook request body for a client that has reached their rate limit. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `data` | [ClientRateLimitReachedWebhookData](../../models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A | -| `message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | -| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md b/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md deleted file mode 100755 index d7fef1202..000000000 --- a/bank-feeds/docs/models/shared/clientratelimitresetwebhook.md +++ /dev/null @@ -1,16 +0,0 @@ -# ClientRateLimitResetWebhook - -Webhook request body for a client that has had their rate limit reset. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `data` | [ClientRateLimitResetWebhookData](../../models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A | -| `message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | -| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/companies.md b/bank-feeds/docs/models/shared/companies.md deleted file mode 100755 index e70fa9a1a..000000000 --- a/bank-feeds/docs/models/shared/companies.md +++ /dev/null @@ -1,12 +0,0 @@ -# Companies - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | [Company](../../models/shared/company.md)[] | :heavy_minus_sign: | N/A | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/connections.md b/bank-feeds/docs/models/shared/connections.md deleted file mode 100755 index e585aa2ac..000000000 --- a/bank-feeds/docs/models/shared/connections.md +++ /dev/null @@ -1,12 +0,0 @@ -# Connections - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | [Connection](../../models/shared/connection.md)[] | :heavy_minus_sign: | N/A | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/createbanktransactions.md b/bank-feeds/docs/models/shared/createbanktransactions.md deleted file mode 100755 index 22b52e340..000000000 --- a/bank-feeds/docs/models/shared/createbanktransactions.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateBankTransactions - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `accountId` | *string* | :heavy_minus_sign: | Unique identifier for a bank account. | 13d946f0-c5d5-42bc-b092-97ece17923ab | -| `transactions` | [BankTransactions](../../models/shared/banktransactions.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/links.md b/bank-feeds/docs/models/shared/links.md deleted file mode 100755 index 51390f46c..000000000 --- a/bank-feeds/docs/models/shared/links.md +++ /dev/null @@ -1,11 +0,0 @@ -# Links - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `current` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | -| `next` | [HalRef](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `previous` | [HalRef](../../models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `self` | [HalRef](../../models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushoperationchange.md b/bank-feeds/docs/models/shared/pushoperationchange.md deleted file mode 100755 index fcdd31d1f..000000000 --- a/bank-feeds/docs/models/shared/pushoperationchange.md +++ /dev/null @@ -1,10 +0,0 @@ -# PushOperationChange - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `attachmentId` | *string* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | -| `recordRef` | [PushOperationRef](../../models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | -| `type` | [PushChangeType](../../models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushoperationref.md b/bank-feeds/docs/models/shared/pushoperationref.md deleted file mode 100755 index e7ea8d90a..000000000 --- a/bank-feeds/docs/models/shared/pushoperationref.md +++ /dev/null @@ -1,9 +0,0 @@ -# PushOperationRef - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `dataType` | [DataType](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for a push operation. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushoperations.md b/bank-feeds/docs/models/shared/pushoperations.md deleted file mode 100755 index 33808a93c..000000000 --- a/bank-feeds/docs/models/shared/pushoperations.md +++ /dev/null @@ -1,12 +0,0 @@ -# PushOperations - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `links` | [Links](../../models/shared/links.md) | :heavy_check_mark: | N/A | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | -| `results` | [PushOperation](../../models/shared/pushoperation.md)[] | :heavy_minus_sign: | N/A | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/validation.md b/bank-feeds/docs/models/shared/validation.md deleted file mode 100755 index ac3279c7a..000000000 --- a/bank-feeds/docs/models/shared/validation.md +++ /dev/null @@ -1,11 +0,0 @@ -# Validation - -A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `errors` | [ValidationItem](../../models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | -| `warnings` | [ValidationItem](../../models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createbankaccountmappingrequest.md b/bank-feeds/docs/sdk/models/operations/createbankaccountmappingrequest.md new file mode 100644 index 000000000..bb1323ca7 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createbankaccountmappingrequest.md @@ -0,0 +1,10 @@ +# CreateBankAccountMappingRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `zero` | [shared.Zero](../../../sdk/models/shared/zero.md) | :heavy_minus_sign: | N/A | | +| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createbankaccountmappingresponse.md b/bank-feeds/docs/sdk/models/operations/createbankaccountmappingresponse.md new file mode 100644 index 000000000..3b647f3d4 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createbankaccountmappingresponse.md @@ -0,0 +1,12 @@ +# CreateBankAccountMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `bankFeedAccountMappingResponse` | [shared.BankFeedAccountMappingResponse](../../../sdk/models/shared/bankfeedaccountmappingresponse.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createbanktransactionsrequest.md b/bank-feeds/docs/sdk/models/operations/createbanktransactionsrequest.md new file mode 100644 index 000000000..5d548da5f --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createbanktransactionsrequest.md @@ -0,0 +1,13 @@ +# CreateBankTransactionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `createBankTransactions` | [shared.CreateBankTransactions](../../../sdk/models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createbanktransactionsresponse.md b/bank-feeds/docs/sdk/models/operations/createbanktransactionsresponse.md new file mode 100644 index 000000000..453c121fc --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createbanktransactionsresponse.md @@ -0,0 +1,12 @@ +# CreateBankTransactionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `createBankTransactionsResponse` | [shared.CreateBankTransactionsResponse](../../../sdk/models/shared/createbanktransactionsresponse.md) | :heavy_minus_sign: | Success | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createcompanyresponse.md b/bank-feeds/docs/sdk/models/operations/createcompanyresponse.md new file mode 100644 index 000000000..ab239ccfd --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createcompanyresponse.md @@ -0,0 +1,12 @@ +# CreateCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `company` | [shared.Company](../../../sdk/models/shared/company.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createconnectionrequest.md b/bank-feeds/docs/sdk/models/operations/createconnectionrequest.md new file mode 100644 index 000000000..646c487b2 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createconnectionrequest.md @@ -0,0 +1,9 @@ +# CreateConnectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `requestBody` | [operations.CreateConnectionRequestBody](../../../sdk/models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/createconnectionrequestbody.md b/bank-feeds/docs/sdk/models/operations/createconnectionrequestbody.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/createconnectionrequestbody.md rename to bank-feeds/docs/sdk/models/operations/createconnectionrequestbody.md diff --git a/bank-feeds/docs/sdk/models/operations/createconnectionresponse.md b/bank-feeds/docs/sdk/models/operations/createconnectionresponse.md new file mode 100644 index 000000000..d65713bd4 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createconnectionresponse.md @@ -0,0 +1,12 @@ +# CreateConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `connection` | [shared.Connection](../../../sdk/models/shared/connection.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createsourceaccountrequest.md b/bank-feeds/docs/sdk/models/operations/createsourceaccountrequest.md new file mode 100644 index 000000000..0ee9ca67a --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createsourceaccountrequest.md @@ -0,0 +1,10 @@ +# CreateSourceAccountRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `sourceAccount` | [shared.SourceAccount](../../../sdk/models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | | +| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/createsourceaccountresponse.md b/bank-feeds/docs/sdk/models/operations/createsourceaccountresponse.md new file mode 100644 index 000000000..56c7244fa --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/createsourceaccountresponse.md @@ -0,0 +1,12 @@ +# CreateSourceAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `sourceAccount` | [shared.SourceAccount](../../../sdk/models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deletebankfeedcredentialsrequest.md b/bank-feeds/docs/sdk/models/operations/deletebankfeedcredentialsrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/deletebankfeedcredentialsrequest.md rename to bank-feeds/docs/sdk/models/operations/deletebankfeedcredentialsrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/deletebankfeedcredentialsresponse.md b/bank-feeds/docs/sdk/models/operations/deletebankfeedcredentialsresponse.md new file mode 100644 index 000000000..5d147b685 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/deletebankfeedcredentialsresponse.md @@ -0,0 +1,11 @@ +# DeleteBankFeedCredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deletecompanyrequest.md b/bank-feeds/docs/sdk/models/operations/deletecompanyrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/deletecompanyrequest.md rename to bank-feeds/docs/sdk/models/operations/deletecompanyrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/deletecompanyresponse.md b/bank-feeds/docs/sdk/models/operations/deletecompanyresponse.md new file mode 100644 index 000000000..25b7d383b --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/deletecompanyresponse.md @@ -0,0 +1,11 @@ +# DeleteCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deleteconnectionrequest.md b/bank-feeds/docs/sdk/models/operations/deleteconnectionrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/deleteconnectionrequest.md rename to bank-feeds/docs/sdk/models/operations/deleteconnectionrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/deleteconnectionresponse.md b/bank-feeds/docs/sdk/models/operations/deleteconnectionresponse.md new file mode 100644 index 000000000..63d8ae3ca --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/deleteconnectionresponse.md @@ -0,0 +1,11 @@ +# DeleteConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/deletesourceaccountrequest.md b/bank-feeds/docs/sdk/models/operations/deletesourceaccountrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/deletesourceaccountrequest.md rename to bank-feeds/docs/sdk/models/operations/deletesourceaccountrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/deletesourceaccountresponse.md b/bank-feeds/docs/sdk/models/operations/deletesourceaccountresponse.md new file mode 100644 index 000000000..6c186946f --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/deletesourceaccountresponse.md @@ -0,0 +1,11 @@ +# DeleteSourceAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/generatecredentialsrequest.md b/bank-feeds/docs/sdk/models/operations/generatecredentialsrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/generatecredentialsrequest.md rename to bank-feeds/docs/sdk/models/operations/generatecredentialsrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/generatecredentialsresponse.md b/bank-feeds/docs/sdk/models/operations/generatecredentialsresponse.md new file mode 100644 index 000000000..d549b8370 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/generatecredentialsresponse.md @@ -0,0 +1,12 @@ +# GenerateCredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `bankAccountCredentials` | [shared.BankAccountCredentials](../../../sdk/models/shared/bankaccountcredentials.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getbankaccountmappingrequest.md b/bank-feeds/docs/sdk/models/operations/getbankaccountmappingrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/getbankaccountmappingrequest.md rename to bank-feeds/docs/sdk/models/operations/getbankaccountmappingrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/getbankaccountmappingresponse.md b/bank-feeds/docs/sdk/models/operations/getbankaccountmappingresponse.md new file mode 100644 index 000000000..8d3de69de --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/getbankaccountmappingresponse.md @@ -0,0 +1,12 @@ +# GetBankAccountMappingResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `bankFeedMapping` | [shared.BankFeedMapping](../../../sdk/models/shared/bankfeedmapping.md) | :heavy_minus_sign: | Success | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getcompanyrequest.md b/bank-feeds/docs/sdk/models/operations/getcompanyrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/getcompanyrequest.md rename to bank-feeds/docs/sdk/models/operations/getcompanyrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/getcompanyresponse.md b/bank-feeds/docs/sdk/models/operations/getcompanyresponse.md new file mode 100644 index 000000000..39a9d2a5d --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/getcompanyresponse.md @@ -0,0 +1,12 @@ +# GetCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `company` | [shared.Company](../../../sdk/models/shared/company.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getconnectionrequest.md b/bank-feeds/docs/sdk/models/operations/getconnectionrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/getconnectionrequest.md rename to bank-feeds/docs/sdk/models/operations/getconnectionrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/getconnectionresponse.md b/bank-feeds/docs/sdk/models/operations/getconnectionresponse.md new file mode 100644 index 000000000..9ba9c2623 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/getconnectionresponse.md @@ -0,0 +1,12 @@ +# GetConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `connection` | [shared.Connection](../../../sdk/models/shared/connection.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/getcreateoperationrequest.md b/bank-feeds/docs/sdk/models/operations/getcreateoperationrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/getcreateoperationrequest.md rename to bank-feeds/docs/sdk/models/operations/getcreateoperationrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/getcreateoperationresponse.md b/bank-feeds/docs/sdk/models/operations/getcreateoperationresponse.md new file mode 100644 index 000000000..f1218a81e --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/getcreateoperationresponse.md @@ -0,0 +1,12 @@ +# GetCreateOperationResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `pushOperation` | [shared.PushOperation](../../../sdk/models/shared/pushoperation.md) | :heavy_minus_sign: | OK | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listcompaniesrequest.md b/bank-feeds/docs/sdk/models/operations/listcompaniesrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/listcompaniesrequest.md rename to bank-feeds/docs/sdk/models/operations/listcompaniesrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/listcompaniesresponse.md b/bank-feeds/docs/sdk/models/operations/listcompaniesresponse.md new file mode 100644 index 000000000..4f9aa45a5 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/listcompaniesresponse.md @@ -0,0 +1,12 @@ +# ListCompaniesResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `companies` | [shared.Companies](../../../sdk/models/shared/companies.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listconnectionsrequest.md b/bank-feeds/docs/sdk/models/operations/listconnectionsrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/listconnectionsrequest.md rename to bank-feeds/docs/sdk/models/operations/listconnectionsrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/listconnectionsresponse.md b/bank-feeds/docs/sdk/models/operations/listconnectionsresponse.md new file mode 100644 index 000000000..9d3ea5f4b --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/listconnectionsresponse.md @@ -0,0 +1,12 @@ +# ListConnectionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `connections` | [shared.Connections](../../../sdk/models/shared/connections.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listcreateoperationsrequest.md b/bank-feeds/docs/sdk/models/operations/listcreateoperationsrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/listcreateoperationsrequest.md rename to bank-feeds/docs/sdk/models/operations/listcreateoperationsrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/listcreateoperationsresponse.md b/bank-feeds/docs/sdk/models/operations/listcreateoperationsresponse.md new file mode 100644 index 000000000..ee168ff42 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/listcreateoperationsresponse.md @@ -0,0 +1,12 @@ +# ListCreateOperationsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | +| `pushOperations` | [shared.PushOperations](../../../sdk/models/shared/pushoperations.md) | :heavy_minus_sign: | OK | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/operations/listsourceaccountsrequest.md b/bank-feeds/docs/sdk/models/operations/listsourceaccountsrequest.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/operations/listsourceaccountsrequest.md rename to bank-feeds/docs/sdk/models/operations/listsourceaccountsrequest.md diff --git a/bank-feeds/docs/sdk/models/operations/listsourceaccountsresponse.md b/bank-feeds/docs/sdk/models/operations/listsourceaccountsresponse.md new file mode 100644 index 000000000..3533ce2ac --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/listsourceaccountsresponse.md @@ -0,0 +1,12 @@ +# ListSourceAccountsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `sourceAccount` | [shared.SourceAccount](../../../sdk/models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/unlinkconnectionrequest.md b/bank-feeds/docs/sdk/models/operations/unlinkconnectionrequest.md new file mode 100644 index 000000000..821ac0408 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/unlinkconnectionrequest.md @@ -0,0 +1,10 @@ +# UnlinkConnectionRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `requestBody` | [operations.UnlinkConnectionUpdateConnection](../../../sdk/models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | +| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/unlinkconnectionresponse.md b/bank-feeds/docs/sdk/models/operations/unlinkconnectionresponse.md new file mode 100644 index 000000000..6b369e81e --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/unlinkconnectionresponse.md @@ -0,0 +1,12 @@ +# UnlinkConnectionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `connection` | [shared.Connection](../../../sdk/models/shared/connection.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/unlinkconnectionupdateconnection.md b/bank-feeds/docs/sdk/models/operations/unlinkconnectionupdateconnection.md new file mode 100644 index 000000000..16a315e32 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/unlinkconnectionupdateconnection.md @@ -0,0 +1,8 @@ +# UnlinkConnectionUpdateConnection + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/updatecompanyrequest.md b/bank-feeds/docs/sdk/models/operations/updatecompanyrequest.md new file mode 100644 index 000000000..50f541a35 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/updatecompanyrequest.md @@ -0,0 +1,9 @@ +# UpdateCompanyRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `companyRequestBody` | [shared.CompanyRequestBody](../../../sdk/models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/updatecompanyresponse.md b/bank-feeds/docs/sdk/models/operations/updatecompanyresponse.md new file mode 100644 index 000000000..a1750c2bb --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/updatecompanyresponse.md @@ -0,0 +1,12 @@ +# UpdateCompanyResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `company` | [shared.Company](../../../sdk/models/shared/company.md) | :heavy_minus_sign: | OK | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/updatesourceaccountrequest.md b/bank-feeds/docs/sdk/models/operations/updatesourceaccountrequest.md new file mode 100644 index 000000000..cd4f849b0 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/updatesourceaccountrequest.md @@ -0,0 +1,11 @@ +# UpdateSourceAccountRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `sourceAccount` | [shared.SourceAccount](../../../sdk/models/shared/sourceaccount.md) | :heavy_minus_sign: | N/A | | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `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 | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/operations/updatesourceaccountresponse.md b/bank-feeds/docs/sdk/models/operations/updatesourceaccountresponse.md new file mode 100644 index 000000000..2cb2a3a30 --- /dev/null +++ b/bank-feeds/docs/sdk/models/operations/updatesourceaccountresponse.md @@ -0,0 +1,12 @@ +# UpdateSourceAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | +| `sourceAccount` | [shared.SourceAccount](../../../sdk/models/shared/sourceaccount.md) | :heavy_minus_sign: | Success | +| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/bankaccountcredentials.md b/bank-feeds/docs/sdk/models/shared/bankaccountcredentials.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/bankaccountcredentials.md rename to bank-feeds/docs/sdk/models/shared/bankaccountcredentials.md diff --git a/bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md b/bank-feeds/docs/sdk/models/shared/bankfeedaccountmappingresponse.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/bankfeedaccountmappingresponse.md rename to bank-feeds/docs/sdk/models/shared/bankfeedaccountmappingresponse.md diff --git a/bank-feeds/docs/models/shared/bankfeedmapping.md b/bank-feeds/docs/sdk/models/shared/bankfeedmapping.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/shared/bankfeedmapping.md rename to bank-feeds/docs/sdk/models/shared/bankfeedmapping.md index ad693b267..c71fb1ad5 --- a/bank-feeds/docs/models/shared/bankfeedmapping.md +++ b/bank-feeds/docs/sdk/models/shared/bankfeedmapping.md @@ -16,4 +16,4 @@ A bank feed connection between a source account and a target account, including | `status` | *string* | :heavy_minus_sign: | The status. | | | `targetAccountId` | *string* | :heavy_minus_sign: | Unique ID for the target account in the accounting platform. | | | `targetAccountName` | *string* | :heavy_minus_sign: | Name for the target account in the accounting platform. | | -| `targetAccountOptions` | [TargetAccountOption](../../models/shared/targetaccountoption.md)[] | :heavy_minus_sign: | An array of potential target accounts. | | \ No newline at end of file +| `targetAccountOptions` | [shared.TargetAccountOption](../../../sdk/models/shared/targetaccountoption.md)[] | :heavy_minus_sign: | An array of potential target accounts. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/banktransactions.md b/bank-feeds/docs/sdk/models/shared/banktransactions.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/shared/banktransactions.md rename to bank-feeds/docs/sdk/models/shared/banktransactions.md index 27f0287f1..a6a8e541d --- a/bank-feeds/docs/models/shared/banktransactions.md +++ b/bank-feeds/docs/sdk/models/shared/banktransactions.md @@ -13,4 +13,4 @@ | `id` | *string* | :heavy_minus_sign: | Identifier for the bank account transaction, unique for the company in the accounting platform. | 716422529 | | `reconciled` | *boolean* | :heavy_minus_sign: | `True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting platform. | false | | `reference` | *string* | :heavy_minus_sign: | An optional reference to the bank transaction. | reference for transaction | -| `transactionType` | [BankTransactionsBankTransactionType](../../models/shared/banktransactionsbanktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line. | | \ No newline at end of file +| `transactionType` | [shared.BankTransactionType](../../../sdk/models/shared/banktransactiontype.md) | :heavy_minus_sign: | Type of transaction for the bank statement line. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/banktransactionsbanktransactiontype.md b/bank-feeds/docs/sdk/models/shared/banktransactiontype.md old mode 100755 new mode 100644 similarity index 95% rename from bank-feeds/docs/models/shared/banktransactionsbanktransactiontype.md rename to bank-feeds/docs/sdk/models/shared/banktransactiontype.md index 4bc7e5234..749fe41b2 --- a/bank-feeds/docs/models/shared/banktransactionsbanktransactiontype.md +++ b/bank-feeds/docs/sdk/models/shared/banktransactiontype.md @@ -1,4 +1,4 @@ -# BankTransactionsBankTransactionType +# BankTransactionType Type of transaction for the bank statement line. diff --git a/bank-feeds/docs/sdk/models/shared/clientratelimitreachedwebhook.md b/bank-feeds/docs/sdk/models/shared/clientratelimitreachedwebhook.md new file mode 100644 index 000000000..ea7c8d1d7 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/clientratelimitreachedwebhook.md @@ -0,0 +1,16 @@ +# ClientRateLimitReachedWebhook + +Webhook request body for a client that has reached their rate limit. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `data` | [shared.ClientRateLimitReachedWebhookData](../../../sdk/models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | +| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | +| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/clientratelimitreachedwebhookdata.md b/bank-feeds/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/clientratelimitreachedwebhookdata.md rename to bank-feeds/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md diff --git a/bank-feeds/docs/sdk/models/shared/clientratelimitresetwebhook.md b/bank-feeds/docs/sdk/models/shared/clientratelimitresetwebhook.md new file mode 100644 index 000000000..fe4fd5dc6 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/clientratelimitresetwebhook.md @@ -0,0 +1,16 @@ +# ClientRateLimitResetWebhook + +Webhook request body for a client that has had their rate limit reset. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `data` | [shared.ClientRateLimitResetWebhookData](../../../sdk/models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | +| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | +| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/clientratelimitresetwebhookdata.md b/bank-feeds/docs/sdk/models/shared/clientratelimitresetwebhookdata.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/clientratelimitresetwebhookdata.md rename to bank-feeds/docs/sdk/models/shared/clientratelimitresetwebhookdata.md diff --git a/bank-feeds/docs/sdk/models/shared/companies.md b/bank-feeds/docs/sdk/models/shared/companies.md new file mode 100644 index 000000000..0db83a703 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/companies.md @@ -0,0 +1,12 @@ +# Companies + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | [shared.Company](../../../sdk/models/shared/company.md)[] | :heavy_minus_sign: | N/A | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/company.md b/bank-feeds/docs/sdk/models/shared/company.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/shared/company.md rename to bank-feeds/docs/sdk/models/shared/company.md index 0b3329733..7e9c7646c --- a/bank-feeds/docs/models/shared/company.md +++ b/bank-feeds/docs/sdk/models/shared/company.md @@ -13,7 +13,7 @@ When you create a company, you can specify a `name` and we will automatically ge | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `created` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | | `createdByUserName` | *string* | :heavy_minus_sign: | Name of user that created the company in Codat. | | -| `dataConnections` | [Connection](../../models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | +| `dataConnections` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | | `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | | `id` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `lastSync` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | diff --git a/bank-feeds/docs/models/shared/companyrequestbody.md b/bank-feeds/docs/sdk/models/shared/companyrequestbody.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/companyrequestbody.md rename to bank-feeds/docs/sdk/models/shared/companyrequestbody.md diff --git a/bank-feeds/docs/models/shared/connection.md b/bank-feeds/docs/sdk/models/shared/connection.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/shared/connection.md rename to bank-feeds/docs/sdk/models/shared/connection.md index dbd6f4420..7ef9ea1d4 --- a/bank-feeds/docs/models/shared/connection.md +++ b/bank-feeds/docs/sdk/models/shared/connection.md @@ -19,7 +19,7 @@ Before you can use a data connection to pull or push data, the company must gran | `additionalProperties` | *any* | :heavy_minus_sign: | N/A | | | `connectionInfo` | Record | :heavy_minus_sign: | N/A | | | `created` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | -| `dataConnectionErrors` | [DataConnectionError](../../models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | +| `dataConnectionErrors` | [shared.DataConnectionError](../../../sdk/models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | | `id` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `integrationId` | *string* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | | `integrationKey` | *string* | :heavy_check_mark: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | @@ -27,5 +27,5 @@ Before you can use a data connection to pull or push data, the company must gran | `linkUrl` | *string* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | | `platformName` | *string* | :heavy_check_mark: | Name of integration connected to company. | | | `sourceId` | *string* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | -| `sourceType` | [ConnectionSourceType](../../models/shared/connectionsourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | -| `status` | [DataConnectionStatus](../../models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file +| `sourceType` | [shared.SourceType](../../../sdk/models/shared/sourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | +| `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/shared/connections.md b/bank-feeds/docs/sdk/models/shared/connections.md new file mode 100644 index 000000000..2544e6d51 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/connections.md @@ -0,0 +1,12 @@ +# Connections + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/shared/createbanktransactions.md b/bank-feeds/docs/sdk/models/shared/createbanktransactions.md new file mode 100644 index 000000000..e18985e58 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/createbanktransactions.md @@ -0,0 +1,9 @@ +# CreateBankTransactions + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `accountId` | *string* | :heavy_minus_sign: | Unique identifier for a bank account. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `transactions` | [shared.BankTransactions](../../../sdk/models/shared/banktransactions.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/createbanktransactionsresponse.md b/bank-feeds/docs/sdk/models/shared/createbanktransactionsresponse.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/shared/createbanktransactionsresponse.md rename to bank-feeds/docs/sdk/models/shared/createbanktransactionsresponse.md index 416d06883..4434820d2 --- a/bank-feeds/docs/models/shared/createbanktransactionsresponse.md +++ b/bank-feeds/docs/sdk/models/shared/createbanktransactionsresponse.md @@ -5,17 +5,17 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | [PushOperationChange](../../models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | -| `data` | [CreateBankTransactions](../../models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | +| `data` | [shared.CreateBankTransactions](../../../sdk/models/shared/createbanktransactions.md) | :heavy_minus_sign: | N/A | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `dataType` | [DataType](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `dataType` | [shared.DataType](../../../sdk/models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `statusCode` | *number* | :heavy_check_mark: | Push status code. | | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Validation](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/dataconnectionerror.md b/bank-feeds/docs/sdk/models/shared/dataconnectionerror.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/dataconnectionerror.md rename to bank-feeds/docs/sdk/models/shared/dataconnectionerror.md diff --git a/bank-feeds/docs/models/shared/dataconnectionstatus.md b/bank-feeds/docs/sdk/models/shared/dataconnectionstatus.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/dataconnectionstatus.md rename to bank-feeds/docs/sdk/models/shared/dataconnectionstatus.md diff --git a/bank-feeds/docs/models/shared/datatype.md b/bank-feeds/docs/sdk/models/shared/datatype.md old mode 100755 new mode 100644 similarity index 97% rename from bank-feeds/docs/models/shared/datatype.md rename to bank-feeds/docs/sdk/models/shared/datatype.md index 80fff98f4..004778187 --- a/bank-feeds/docs/models/shared/datatype.md +++ b/bank-feeds/docs/sdk/models/shared/datatype.md @@ -22,6 +22,7 @@ Available Data types | `DirectCosts` | directCosts | | `DirectIncomes` | directIncomes | | `Invoices` | invoices | +| `ItemReceipts` | itemReceipts | | `Items` | items | | `JournalEntries` | journalEntries | | `Journals` | journals | diff --git a/bank-feeds/docs/models/shared/errormessage.md b/bank-feeds/docs/sdk/models/shared/errormessage.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/errormessage.md rename to bank-feeds/docs/sdk/models/shared/errormessage.md diff --git a/bank-feeds/docs/models/shared/halref.md b/bank-feeds/docs/sdk/models/shared/halref.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/halref.md rename to bank-feeds/docs/sdk/models/shared/halref.md diff --git a/bank-feeds/docs/sdk/models/shared/links.md b/bank-feeds/docs/sdk/models/shared/links.md new file mode 100644 index 000000000..37df2ee73 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/links.md @@ -0,0 +1,11 @@ +# Links + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `current` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | +| `next` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | +| `previous` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | +| `self` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushchangetype.md b/bank-feeds/docs/sdk/models/shared/pushchangetype.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/pushchangetype.md rename to bank-feeds/docs/sdk/models/shared/pushchangetype.md diff --git a/bank-feeds/docs/models/shared/pushoperation.md b/bank-feeds/docs/sdk/models/shared/pushoperation.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/shared/pushoperation.md rename to bank-feeds/docs/sdk/models/shared/pushoperation.md index 9ee76b020..4fd82b3c5 --- a/bank-feeds/docs/models/shared/pushoperation.md +++ b/bank-feeds/docs/sdk/models/shared/pushoperation.md @@ -5,16 +5,16 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `changes` | [PushOperationChange](../../models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `dataType` | [DataType](../../models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `dataType` | [shared.DataType](../../../sdk/models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | | `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> 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 | -| `status` | [PushOperationStatus](../../models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | +| `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | | `statusCode` | *number* | :heavy_check_mark: | Push status code. | | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | -| `validation` | [Validation](../../models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/shared/pushoperationchange.md b/bank-feeds/docs/sdk/models/shared/pushoperationchange.md new file mode 100644 index 000000000..67d462c0b --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/pushoperationchange.md @@ -0,0 +1,10 @@ +# PushOperationChange + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `attachmentId` | *string* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | +| `recordRef` | [shared.PushOperationRef](../../../sdk/models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | +| `type` | [shared.PushChangeType](../../../sdk/models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/shared/pushoperationref.md b/bank-feeds/docs/sdk/models/shared/pushoperationref.md new file mode 100644 index 000000000..b547a7905 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/pushoperationref.md @@ -0,0 +1,9 @@ +# PushOperationRef + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `dataType` | [shared.DataType](../../../sdk/models/shared/datatype.md) | :heavy_minus_sign: | Available Data types | invoices | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for a push operation. | | \ No newline at end of file diff --git a/bank-feeds/docs/sdk/models/shared/pushoperations.md b/bank-feeds/docs/sdk/models/shared/pushoperations.md new file mode 100644 index 000000000..78c3ca750 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/pushoperations.md @@ -0,0 +1,12 @@ +# PushOperations + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | +| `results` | [shared.PushOperation](../../../sdk/models/shared/pushoperation.md)[] | :heavy_minus_sign: | N/A | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/pushoperationstatus.md b/bank-feeds/docs/sdk/models/shared/pushoperationstatus.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/pushoperationstatus.md rename to bank-feeds/docs/sdk/models/shared/pushoperationstatus.md diff --git a/bank-feeds/docs/models/shared/security.md b/bank-feeds/docs/sdk/models/shared/security.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/security.md rename to bank-feeds/docs/sdk/models/shared/security.md diff --git a/bank-feeds/docs/models/shared/sourceaccount.md b/bank-feeds/docs/sdk/models/shared/sourceaccount.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/sourceaccount.md rename to bank-feeds/docs/sdk/models/shared/sourceaccount.md diff --git a/bank-feeds/docs/models/shared/connectionsourcetype.md b/bank-feeds/docs/sdk/models/shared/sourcetype.md old mode 100755 new mode 100644 similarity index 92% rename from bank-feeds/docs/models/shared/connectionsourcetype.md rename to bank-feeds/docs/sdk/models/shared/sourcetype.md index 97a69b075..f1ef993ef --- a/bank-feeds/docs/models/shared/connectionsourcetype.md +++ b/bank-feeds/docs/sdk/models/shared/sourcetype.md @@ -1,4 +1,4 @@ -# ConnectionSourceType +# SourceType The type of platform of the connection. diff --git a/bank-feeds/docs/models/shared/targetaccountoption.md b/bank-feeds/docs/sdk/models/shared/targetaccountoption.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/targetaccountoption.md rename to bank-feeds/docs/sdk/models/shared/targetaccountoption.md diff --git a/bank-feeds/docs/sdk/models/shared/validation.md b/bank-feeds/docs/sdk/models/shared/validation.md new file mode 100644 index 000000000..87b89a609 --- /dev/null +++ b/bank-feeds/docs/sdk/models/shared/validation.md @@ -0,0 +1,11 @@ +# Validation + +A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `errors` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | +| `warnings` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/bank-feeds/docs/models/shared/validationitem.md b/bank-feeds/docs/sdk/models/shared/validationitem.md old mode 100755 new mode 100644 similarity index 100% rename from bank-feeds/docs/models/shared/validationitem.md rename to bank-feeds/docs/sdk/models/shared/validationitem.md diff --git a/bank-feeds/docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md b/bank-feeds/docs/sdk/models/shared/zero.md old mode 100755 new mode 100644 similarity index 99% rename from bank-feeds/docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md rename to bank-feeds/docs/sdk/models/shared/zero.md index 1b9e9858b..dedbf2439 --- a/bank-feeds/docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md +++ b/bank-feeds/docs/sdk/models/shared/zero.md @@ -1,4 +1,4 @@ -# CreateBankAccountMappingBankFeedAccountMapping +# Zero A bank feed connection between a source account and a target account. diff --git a/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md b/bank-feeds/docs/sdk/models/webhooks/clientratelimitreachedresponse.md old mode 100755 new mode 100644 similarity index 89% rename from bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md rename to bank-feeds/docs/sdk/models/webhooks/clientratelimitreachedresponse.md index fa7554fb0..5098d8eac --- a/bank-feeds/docs/models/webhooks/clientratelimitreachedresponse.md +++ b/bank-feeds/docs/sdk/models/webhooks/clientratelimitreachedresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `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 | \ No newline at end of file +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md b/bank-feeds/docs/sdk/models/webhooks/clientratelimitresetresponse.md old mode 100755 new mode 100644 similarity index 89% rename from bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md rename to bank-feeds/docs/sdk/models/webhooks/clientratelimitresetresponse.md index 0b6f28c5f..731e95fed --- a/bank-feeds/docs/models/webhooks/clientratelimitresetresponse.md +++ b/bank-feeds/docs/sdk/models/webhooks/clientratelimitresetresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `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 | \ No newline at end of file +| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/bank-feeds/docs/sdks/accountmapping/README.md b/bank-feeds/docs/sdks/accountmapping/README.md old mode 100755 new mode 100644 index 858fb4c99..69e3f7f59 --- a/bank-feeds/docs/sdks/accountmapping/README.md +++ b/bank-feeds/docs/sdks/accountmapping/README.md @@ -33,7 +33,7 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; }); const res = await sdk.accountMapping.create({ - requestBody: { + zero: { feedStartDate: "2022-10-23T00:00:00.000Z", }, companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", @@ -48,17 +48,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `request` | [operations.CreateBankAccountMappingRequest](../../models/operations/createbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBankAccountMappingRequest](../../sdk/models/operations/createbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.CreateBankAccountMappingResponse](../../models/operations/createbankaccountmappingresponse.md)>** +**Promise<[operations.CreateBankAccountMappingResponse](../../sdk/models/operations/createbankaccountmappingresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## get @@ -93,14 +97,18 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `request` | [operations.GetBankAccountMappingRequest](../../models/operations/getbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBankAccountMappingRequest](../../sdk/models/operations/getbankaccountmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.GetBankAccountMappingResponse](../../models/operations/getbankaccountmappingresponse.md)>** +**Promise<[operations.GetBankAccountMappingResponse](../../sdk/models/operations/getbankaccountmappingresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/codatbankfeeds/README.md b/bank-feeds/docs/sdks/codatbankfeeds/README.md old mode 100755 new mode 100644 diff --git a/bank-feeds/docs/sdks/companies/README.md b/bank-feeds/docs/sdks/companies/README.md old mode 100755 new mode 100644 index 2ca8b2c9d..d5dc8f8f9 --- a/bank-feeds/docs/sdks/companies/README.md +++ b/bank-feeds/docs/sdks/companies/README.md @@ -46,17 +46,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `request` | [shared.CompanyRequestBody](../../models/shared/companyrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `request` | [shared.CompanyRequestBody](../../sdk/models/shared/companyrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.CreateCompanyResponse](../../models/operations/createcompanyresponse.md)>** +**Promise<[operations.CreateCompanyResponse](../../sdk/models/operations/createcompanyresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## delete @@ -87,17 +91,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `request` | [operations.DeleteCompanyRequest](../../models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.DeleteCompanyRequest](../../sdk/models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.DeleteCompanyResponse](../../models/operations/deletecompanyresponse.md)>** +**Promise<[operations.DeleteCompanyResponse](../../sdk/models/operations/deletecompanyresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## get @@ -127,17 +135,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `request` | [operations.GetCompanyRequest](../../models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `request` | [operations.GetCompanyRequest](../../sdk/models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.GetCompanyResponse](../../models/operations/getcompanyresponse.md)>** +**Promise<[operations.GetCompanyResponse](../../sdk/models/operations/getcompanyresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## list @@ -169,17 +181,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `request` | [operations.ListCompaniesRequest](../../models/operations/listcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.ListCompaniesRequest](../../sdk/models/operations/listcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.ListCompaniesResponse](../../models/operations/listcompaniesresponse.md)>** +**Promise<[operations.ListCompaniesResponse](../../sdk/models/operations/listcompaniesresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## update @@ -213,14 +229,18 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `request` | [operations.UpdateCompanyRequest](../../models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.UpdateCompanyRequest](../../sdk/models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.UpdateCompanyResponse](../../models/operations/updatecompanyresponse.md)>** +**Promise<[operations.UpdateCompanyResponse](../../sdk/models/operations/updatecompanyresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/connections/README.md b/bank-feeds/docs/sdks/connections/README.md old mode 100755 new mode 100644 index bf1476d7e..7613e2608 --- a/bank-feeds/docs/sdks/connections/README.md +++ b/bank-feeds/docs/sdks/connections/README.md @@ -46,17 +46,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `request` | [operations.CreateConnectionRequest](../../models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `request` | [operations.CreateConnectionRequest](../../sdk/models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.CreateConnectionResponse](../../models/operations/createconnectionresponse.md)>** +**Promise<[operations.CreateConnectionResponse](../../sdk/models/operations/createconnectionresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## delete @@ -88,17 +92,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `request` | [operations.DeleteConnectionRequest](../../models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `request` | [operations.DeleteConnectionRequest](../../sdk/models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.DeleteConnectionResponse](../../models/operations/deleteconnectionresponse.md)>** +**Promise<[operations.DeleteConnectionResponse](../../sdk/models/operations/deleteconnectionresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## get @@ -129,17 +137,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `request` | [operations.GetConnectionRequest](../../models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `request` | [operations.GetConnectionRequest](../../sdk/models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.GetConnectionResponse](../../models/operations/getconnectionresponse.md)>** +**Promise<[operations.GetConnectionResponse](../../sdk/models/operations/getconnectionresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## list @@ -172,17 +184,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [operations.ListConnectionsRequest](../../models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `request` | [operations.ListConnectionsRequest](../../sdk/models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.ListConnectionsResponse](../../models/operations/listconnectionsresponse.md)>** +**Promise<[operations.ListConnectionsResponse](../../sdk/models/operations/listconnectionsresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## unlink @@ -215,14 +231,18 @@ import { DataConnectionStatus } from "@codat/bank-feeds/dist/sdk/models/shared"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `request` | [operations.UnlinkConnectionRequest](../../models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `request` | [operations.UnlinkConnectionRequest](../../sdk/models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.UnlinkConnectionResponse](../../models/operations/unlinkconnectionresponse.md)>** +**Promise<[operations.UnlinkConnectionResponse](../../sdk/models/operations/unlinkconnectionresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/sourceaccounts/README.md b/bank-feeds/docs/sdks/sourceaccounts/README.md old mode 100755 new mode 100644 index 76d41e7b9..3efd01103 --- a/bank-feeds/docs/sdks/sourceaccounts/README.md +++ b/bank-feeds/docs/sdks/sourceaccounts/README.md @@ -69,17 +69,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `request` | [operations.CreateSourceAccountRequest](../../models/operations/createsourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request` | [operations.CreateSourceAccountRequest](../../sdk/models/operations/createsourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.CreateSourceAccountResponse](../../models/operations/createsourceaccountresponse.md)>** +**Promise<[operations.CreateSourceAccountResponse](../../sdk/models/operations/createsourceaccountresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## delete @@ -114,17 +118,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `request` | [operations.DeleteSourceAccountRequest](../../models/operations/deletesourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request` | [operations.DeleteSourceAccountRequest](../../sdk/models/operations/deletesourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.DeleteSourceAccountResponse](../../models/operations/deletesourceaccountresponse.md)>** +**Promise<[operations.DeleteSourceAccountResponse](../../sdk/models/operations/deletesourceaccountresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## deleteCredentials @@ -157,17 +165,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `request` | [operations.DeleteBankFeedCredentialsRequest](../../models/operations/deletebankfeedcredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `request` | [operations.DeleteBankFeedCredentialsRequest](../../sdk/models/operations/deletebankfeedcredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.DeleteBankFeedCredentialsResponse](../../models/operations/deletebankfeedcredentialsresponse.md)>** +**Promise<[operations.DeleteBankFeedCredentialsResponse](../../sdk/models/operations/deletebankfeedcredentialsresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## generateCredentials @@ -189,7 +201,7 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; }); const res = await sdk.sourceAccounts.generateCredentials({ - requestBody: "^upd|k\]Iy" as bytes <<<>>>, + requestBody: new TextEncoder().encode("0xeDCfFBde9E"), companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); @@ -202,17 +214,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `request` | [operations.GenerateCredentialsRequest](../../models/operations/generatecredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request` | [operations.GenerateCredentialsRequest](../../sdk/models/operations/generatecredentialsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.GenerateCredentialsResponse](../../models/operations/generatecredentialsresponse.md)>** +**Promise<[operations.GenerateCredentialsResponse](../../sdk/models/operations/generatecredentialsresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## list @@ -246,17 +262,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `request` | [operations.ListSourceAccountsRequest](../../models/operations/listsourceaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListSourceAccountsRequest](../../sdk/models/operations/listsourceaccountsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.ListSourceAccountsResponse](../../models/operations/listsourceaccountsresponse.md)>** +**Promise<[operations.ListSourceAccountsResponse](../../sdk/models/operations/listsourceaccountsresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## update @@ -295,14 +315,18 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `request` | [operations.UpdateSourceAccountRequest](../../models/operations/updatesourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `request` | [operations.UpdateSourceAccountRequest](../../sdk/models/operations/updatesourceaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.UpdateSourceAccountResponse](../../models/operations/updatesourceaccountresponse.md)>** +**Promise<[operations.UpdateSourceAccountResponse](../../sdk/models/operations/updatesourceaccountresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/docs/sdks/transactions/README.md b/bank-feeds/docs/sdks/transactions/README.md old mode 100755 new mode 100644 index 03f5ef0ff..869a09860 --- a/bank-feeds/docs/sdks/transactions/README.md +++ b/bank-feeds/docs/sdks/transactions/README.md @@ -28,7 +28,7 @@ Check out our [coverage explorer](https://knowledge.codat.io/supported-features/ ```typescript import { CodatBankFeeds } from "@codat/bank-feeds"; -import { BankTransactionsBankTransactionType } from "@codat/bank-feeds/dist/sdk/models/shared"; +import { BankTransactionType } from "@codat/bank-feeds/dist/sdk/models/shared"; (async() => { const sdk = new CodatBankFeeds({ @@ -66,17 +66,21 @@ import { BankTransactionsBankTransactionType } from "@codat/bank-feeds/dist/sdk/ ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `request` | [operations.CreateBankTransactionsRequest](../../models/operations/createbanktransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `request` | [operations.CreateBankTransactionsRequest](../../sdk/models/operations/createbanktransactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.CreateBankTransactionsResponse](../../models/operations/createbanktransactionsresponse.md)>** +**Promise<[operations.CreateBankTransactionsResponse](../../sdk/models/operations/createbanktransactionsresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## getCreateOperation @@ -107,17 +111,21 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `request` | [operations.GetCreateOperationRequest](../../models/operations/getcreateoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateOperationRequest](../../sdk/models/operations/getcreateoperationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.GetCreateOperationResponse](../../models/operations/getcreateoperationresponse.md)>** +**Promise<[operations.GetCreateOperationResponse](../../sdk/models/operations/getcreateoperationresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | ## listCreateOperations @@ -150,14 +158,18 @@ import { CodatBankFeeds } from "@codat/bank-feeds"; ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCreateOperationsRequest](../../models/operations/listcreateoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `request` | [operations.ListCreateOperationsRequest](../../sdk/models/operations/listcreateoperationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.ListCreateOperationsResponse](../../models/operations/listcreateoperationsresponse.md)>** +**Promise<[operations.ListCreateOperationsResponse](../../sdk/models/operations/listcreateoperationsresponse.md)>** +### Errors +| Error Object | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 400-600 | */* | diff --git a/bank-feeds/files.gen b/bank-feeds/files.gen index 6a6d9c723..4c13731fe 100755 --- a/bank-feeds/files.gen +++ b/bank-feeds/files.gen @@ -1,6 +1,6 @@ -src/sdk/accountmapping.ts src/sdk/companies.ts src/sdk/connections.ts +src/sdk/accountmapping.ts src/sdk/sourceaccounts.ts src/sdk/transactions.ts src/sdk/sdk.ts @@ -23,8 +23,6 @@ src/sdk/models/errors/sdkerror.ts src/sdk/types/index.ts src/sdk/types/rfcdate.ts tsconfig.json -src/sdk/models/operations/createbankaccountmapping.ts -src/sdk/models/operations/getbankaccountmapping.ts src/sdk/models/operations/createcompany.ts src/sdk/models/operations/deletecompany.ts src/sdk/models/operations/getcompany.ts @@ -35,6 +33,8 @@ src/sdk/models/operations/deleteconnection.ts src/sdk/models/operations/getconnection.ts src/sdk/models/operations/listconnections.ts src/sdk/models/operations/unlinkconnection.ts +src/sdk/models/operations/createbankaccountmapping.ts +src/sdk/models/operations/getbankaccountmapping.ts src/sdk/models/operations/createsourceaccount.ts src/sdk/models/operations/deletesourceaccount.ts src/sdk/models/operations/deletebankfeedcredentials.ts @@ -44,11 +44,8 @@ src/sdk/models/operations/updatesourceaccount.ts src/sdk/models/operations/createbanktransactions.ts src/sdk/models/operations/getcreateoperation.ts src/sdk/models/operations/listcreateoperations.ts -src/sdk/models/operations/index.ts +src/sdk/models/shared/zero.ts src/sdk/models/shared/errormessage.ts -src/sdk/models/shared/bankfeedaccountmappingresponse.ts -src/sdk/models/shared/bankfeedmapping.ts -src/sdk/models/shared/targetaccountoption.ts src/sdk/models/shared/company.ts src/sdk/models/shared/connection.ts src/sdk/models/shared/dataconnectionstatus.ts @@ -58,6 +55,9 @@ src/sdk/models/shared/companies.ts src/sdk/models/shared/links.ts src/sdk/models/shared/halref.ts src/sdk/models/shared/connections.ts +src/sdk/models/shared/bankfeedaccountmappingresponse.ts +src/sdk/models/shared/bankfeedmapping.ts +src/sdk/models/shared/targetaccountoption.ts src/sdk/models/shared/sourceaccount.ts src/sdk/models/shared/bankaccountcredentials.ts src/sdk/models/shared/createbanktransactionsresponse.ts @@ -77,97 +77,98 @@ src/sdk/models/shared/clientratelimitreachedwebhook.ts src/sdk/models/shared/clientratelimitreachedwebhookdata.ts src/sdk/models/shared/clientratelimitresetwebhook.ts src/sdk/models/shared/clientratelimitresetwebhookdata.ts -src/sdk/models/shared/index.ts src/sdk/models/webhooks/clientratelimitreached.ts src/sdk/models/webhooks/clientratelimitreset.ts -src/sdk/models/webhooks/index.ts src/sdk/models/errors/index.ts +src/sdk/models/operations/index.ts +src/sdk/models/shared/index.ts +src/sdk/models/webhooks/index.ts USAGE.md -docs/models/operations/createbankaccountmappingbankfeedaccountmapping.md -docs/models/operations/createbankaccountmappingrequest.md -docs/models/operations/createbankaccountmappingresponse.md -docs/models/operations/getbankaccountmappingrequest.md -docs/models/operations/getbankaccountmappingresponse.md -docs/models/operations/createcompanyresponse.md -docs/models/operations/deletecompanyrequest.md -docs/models/operations/deletecompanyresponse.md -docs/models/operations/getcompanyrequest.md -docs/models/operations/getcompanyresponse.md -docs/models/operations/listcompaniesrequest.md -docs/models/operations/listcompaniesresponse.md -docs/models/operations/updatecompanyrequest.md -docs/models/operations/updatecompanyresponse.md -docs/models/operations/createconnectionrequestbody.md -docs/models/operations/createconnectionrequest.md -docs/models/operations/createconnectionresponse.md -docs/models/operations/deleteconnectionrequest.md -docs/models/operations/deleteconnectionresponse.md -docs/models/operations/getconnectionrequest.md -docs/models/operations/getconnectionresponse.md -docs/models/operations/listconnectionsrequest.md -docs/models/operations/listconnectionsresponse.md -docs/models/operations/unlinkconnectionupdateconnection.md -docs/models/operations/unlinkconnectionrequest.md -docs/models/operations/unlinkconnectionresponse.md -docs/models/operations/createsourceaccountrequest.md -docs/models/operations/createsourceaccountresponse.md -docs/models/operations/deletesourceaccountrequest.md -docs/models/operations/deletesourceaccountresponse.md -docs/models/operations/deletebankfeedcredentialsrequest.md -docs/models/operations/deletebankfeedcredentialsresponse.md -docs/models/operations/generatecredentialsrequest.md -docs/models/operations/generatecredentialsresponse.md -docs/models/operations/listsourceaccountsrequest.md -docs/models/operations/listsourceaccountsresponse.md -docs/models/operations/updatesourceaccountrequest.md -docs/models/operations/updatesourceaccountresponse.md -docs/models/operations/createbanktransactionsrequest.md -docs/models/operations/createbanktransactionsresponse.md -docs/models/operations/getcreateoperationrequest.md -docs/models/operations/getcreateoperationresponse.md -docs/models/operations/listcreateoperationsrequest.md -docs/models/operations/listcreateoperationsresponse.md -docs/models/shared/errormessage.md -docs/models/shared/bankfeedaccountmappingresponse.md -docs/models/shared/bankfeedmapping.md -docs/models/shared/targetaccountoption.md -docs/models/shared/company.md -docs/models/shared/connectionsourcetype.md -docs/models/shared/connection.md -docs/models/shared/dataconnectionstatus.md -docs/models/shared/dataconnectionerror.md -docs/models/shared/companyrequestbody.md -docs/models/shared/companies.md -docs/models/shared/links.md -docs/models/shared/halref.md -docs/models/shared/connections.md -docs/models/shared/sourceaccount.md -docs/models/shared/bankaccountcredentials.md -docs/models/shared/createbanktransactionsresponse.md -docs/models/shared/validation.md -docs/models/shared/validationitem.md -docs/models/shared/pushoperationstatus.md -docs/models/shared/datatype.md -docs/models/shared/createbanktransactions.md -docs/models/shared/banktransactionsbanktransactiontype.md -docs/models/shared/banktransactions.md -docs/models/shared/pushoperationchange.md -docs/models/shared/pushchangetype.md -docs/models/shared/pushoperationref.md -docs/models/shared/pushoperation.md -docs/models/shared/pushoperations.md -docs/models/shared/security.md -docs/models/shared/clientratelimitreachedwebhook.md -docs/models/shared/clientratelimitreachedwebhookdata.md -docs/models/shared/clientratelimitresetwebhook.md -docs/models/shared/clientratelimitresetwebhookdata.md -docs/models/webhooks/clientratelimitreachedresponse.md -docs/models/webhooks/clientratelimitresetresponse.md +docs/sdk/models/operations/createcompanyresponse.md +docs/sdk/models/operations/deletecompanyrequest.md +docs/sdk/models/operations/deletecompanyresponse.md +docs/sdk/models/operations/getcompanyrequest.md +docs/sdk/models/operations/getcompanyresponse.md +docs/sdk/models/operations/listcompaniesrequest.md +docs/sdk/models/operations/listcompaniesresponse.md +docs/sdk/models/operations/updatecompanyrequest.md +docs/sdk/models/operations/updatecompanyresponse.md +docs/sdk/models/operations/createconnectionrequestbody.md +docs/sdk/models/operations/createconnectionrequest.md +docs/sdk/models/operations/createconnectionresponse.md +docs/sdk/models/operations/deleteconnectionrequest.md +docs/sdk/models/operations/deleteconnectionresponse.md +docs/sdk/models/operations/getconnectionrequest.md +docs/sdk/models/operations/getconnectionresponse.md +docs/sdk/models/operations/listconnectionsrequest.md +docs/sdk/models/operations/listconnectionsresponse.md +docs/sdk/models/operations/unlinkconnectionupdateconnection.md +docs/sdk/models/operations/unlinkconnectionrequest.md +docs/sdk/models/operations/unlinkconnectionresponse.md +docs/sdk/models/operations/createbankaccountmappingrequest.md +docs/sdk/models/operations/createbankaccountmappingresponse.md +docs/sdk/models/operations/getbankaccountmappingrequest.md +docs/sdk/models/operations/getbankaccountmappingresponse.md +docs/sdk/models/operations/createsourceaccountrequest.md +docs/sdk/models/operations/createsourceaccountresponse.md +docs/sdk/models/operations/deletesourceaccountrequest.md +docs/sdk/models/operations/deletesourceaccountresponse.md +docs/sdk/models/operations/deletebankfeedcredentialsrequest.md +docs/sdk/models/operations/deletebankfeedcredentialsresponse.md +docs/sdk/models/operations/generatecredentialsrequest.md +docs/sdk/models/operations/generatecredentialsresponse.md +docs/sdk/models/operations/listsourceaccountsrequest.md +docs/sdk/models/operations/listsourceaccountsresponse.md +docs/sdk/models/operations/updatesourceaccountrequest.md +docs/sdk/models/operations/updatesourceaccountresponse.md +docs/sdk/models/operations/createbanktransactionsrequest.md +docs/sdk/models/operations/createbanktransactionsresponse.md +docs/sdk/models/operations/getcreateoperationrequest.md +docs/sdk/models/operations/getcreateoperationresponse.md +docs/sdk/models/operations/listcreateoperationsrequest.md +docs/sdk/models/operations/listcreateoperationsresponse.md +docs/sdk/models/shared/zero.md +docs/sdk/models/shared/errormessage.md +docs/sdk/models/shared/company.md +docs/sdk/models/shared/sourcetype.md +docs/sdk/models/shared/connection.md +docs/sdk/models/shared/dataconnectionstatus.md +docs/sdk/models/shared/dataconnectionerror.md +docs/sdk/models/shared/companyrequestbody.md +docs/sdk/models/shared/companies.md +docs/sdk/models/shared/links.md +docs/sdk/models/shared/halref.md +docs/sdk/models/shared/connections.md +docs/sdk/models/shared/bankfeedaccountmappingresponse.md +docs/sdk/models/shared/bankfeedmapping.md +docs/sdk/models/shared/targetaccountoption.md +docs/sdk/models/shared/sourceaccount.md +docs/sdk/models/shared/bankaccountcredentials.md +docs/sdk/models/shared/createbanktransactionsresponse.md +docs/sdk/models/shared/validation.md +docs/sdk/models/shared/validationitem.md +docs/sdk/models/shared/pushoperationstatus.md +docs/sdk/models/shared/datatype.md +docs/sdk/models/shared/createbanktransactions.md +docs/sdk/models/shared/banktransactiontype.md +docs/sdk/models/shared/banktransactions.md +docs/sdk/models/shared/pushoperationchange.md +docs/sdk/models/shared/pushchangetype.md +docs/sdk/models/shared/pushoperationref.md +docs/sdk/models/shared/pushoperation.md +docs/sdk/models/shared/pushoperations.md +docs/sdk/models/shared/security.md +docs/sdk/models/shared/clientratelimitreachedwebhook.md +docs/sdk/models/shared/clientratelimitreachedwebhookdata.md +docs/sdk/models/shared/clientratelimitresetwebhook.md +docs/sdk/models/shared/clientratelimitresetwebhookdata.md +docs/sdk/models/webhooks/clientratelimitreachedresponse.md +docs/sdk/models/webhooks/clientratelimitresetresponse.md docs/sdks/codatbankfeeds/README.md -docs/models/utils/retryconfig.md -docs/sdks/accountmapping/README.md +docs/internal/utils/retryconfig.md docs/sdks/companies/README.md docs/sdks/connections/README.md +docs/sdks/accountmapping/README.md docs/sdks/sourceaccounts/README.md docs/sdks/transactions/README.md .gitattributes \ No newline at end of file diff --git a/bank-feeds/gen.yaml b/bank-feeds/gen.yaml index f3cb0db79..376c72b31 100644 --- a/bank-feeds/gen.yaml +++ b/bank-feeds/gen.yaml @@ -1,26 +1,43 @@ configVersion: 1.0.0 management: - docChecksum: d9b2a1016a2f9fa886f638661a6c9a2b + docChecksum: 3883df86e260290925331dc16726311d docVersion: 3.0.0 - speakeasyVersion: 1.100.2 - generationVersion: 2.159.2 + speakeasyVersion: 1.121.3 + generationVersion: 2.195.2 generation: + comments: {} sdkClassName: CodatBankFeeds - singleTagPerOp: false + repoURL: https://github.com/codatio/client-sdk-typescript.git + usageSnippets: + optionalPropertyRendering: withExample telemetryEnabled: true features: typescript: - core: 2.90.4 + core: 3.1.4 deprecations: 2.81.1 - examples: 2.81.2 + examples: 2.81.3 globalSecurity: 2.82.0 - globalServerURLs: 2.82.0 + globalServerURLs: 2.82.1 nameOverrides: 2.81.1 retries: 2.82.1 typescript: - version: 2.2.0 + version: 3.0.0 author: Codat + clientServerStatusCodesAsErrors: false description: Set up bank feeds from accounts in your application to supported accounting platforms. flattenGlobalSecurity: false + imports: + option: openapi + paths: + callbacks: sdk/models/callbacks + errors: sdk/models/errors + operations: sdk/models/operations + shared: sdk/models/shared + webhooks: sdk/models/webhooks + inputModelSuffix: input + installationURL: https://gitpkg.now.sh/codatio/client-sdk-typescript/bank-feeds maxMethodParams: 0 + outputModelSuffix: output packageName: '@codat/bank-feeds' + published: true + repoSubDirectory: bank-feeds diff --git a/bank-feeds/jest.config.js b/bank-feeds/jest.config.js old mode 100755 new mode 100644 index e3f8611e6..e45198852 --- a/bank-feeds/jest.config.js +++ b/bank-feeds/jest.config.js @@ -1,5 +1,8 @@ module.exports = { preset: "ts-jest", testEnvironment: "node", - testPathIgnorePatterns: ["/__tests__/helpers.ts", "/__tests__/common_helpers.ts"], + testPathIgnorePatterns: [ + "/__tests__/helpers.ts", + "/__tests__/common_helpers.ts", + ], }; diff --git a/bank-feeds/package-lock.json b/bank-feeds/package-lock.json old mode 100755 new mode 100644 index 1029479a9..7a7e49ef0 --- a/bank-feeds/package-lock.json +++ b/bank-feeds/package-lock.json @@ -1,12 +1,12 @@ { "name": "@codat/bank-feeds", - "version": "2.2.0", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@codat/bank-feeds", - "version": "2.2.0", + "version": "3.0.0", "dependencies": { "axios": "^1.1.3", "class-transformer": "^0.5.1", diff --git a/bank-feeds/package.json b/bank-feeds/package.json old mode 100755 new mode 100644 index 918f86aea..093625bf0 --- a/bank-feeds/package.json +++ b/bank-feeds/package.json @@ -1,6 +1,6 @@ { "name": "@codat/bank-feeds", - "version": "2.2.0", + "version": "3.0.0", "author": "Codat", "scripts": { "prepare": "tsc --build", diff --git a/bank-feeds/src/index.ts b/bank-feeds/src/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/internal/utils/contenttype.ts b/bank-feeds/src/internal/utils/contenttype.ts old mode 100755 new mode 100644 index 9aaafa941..ddf6c82ba --- a/bank-feeds/src/internal/utils/contenttype.ts +++ b/bank-feeds/src/internal/utils/contenttype.ts @@ -4,7 +4,7 @@ export function matchContentType( contentType: string, - pattern: string + pattern: string, ): boolean { let res = false; contentType diff --git a/bank-feeds/src/internal/utils/headers.ts b/bank-feeds/src/internal/utils/headers.ts old mode 100755 new mode 100644 index d570fda6c..489ba6732 --- a/bank-feeds/src/internal/utils/headers.ts +++ b/bank-feeds/src/internal/utils/headers.ts @@ -27,7 +27,7 @@ export function getHeadersFromRequest(headerParams: any): any { const requestBodyAnn: string = Reflect.getMetadata( requestMetadataKey, headerParams, - fname + fname, ); if (requestBodyAnn) return; @@ -35,7 +35,7 @@ export function getHeadersFromRequest(headerParams: any): any { const headerAnn: string = Reflect.getMetadata( headerMetadataKey, headerParams, - fname + fname, ); if (headerAnn == null) return; @@ -44,14 +44,14 @@ export function getHeadersFromRequest(headerParams: any): any { headerAnn, fname, "simple", - false + false, ); if (headerDecorator == null) return; const value: string = serializeHeader( headerParams[fname], - headerDecorator.Explode + headerDecorator.Explode, ); if (value != "") headers[headerDecorator.ParamName] = value; @@ -61,7 +61,7 @@ export function getHeadersFromRequest(headerParams: any): any { } export function getHeadersFromResponse( - headers: RawAxiosResponseHeaders | AxiosResponseHeaders + headers: RawAxiosResponseHeaders | AxiosResponseHeaders, ): Record { const reponseHeaders: Record = {}; @@ -110,7 +110,7 @@ function serializeHeader(header: any, explode: boolean): string { const headerAnn: string = Reflect.getMetadata( headerMetadataKey, header, - headerKey + headerKey, ); if (headerAnn == null) return; @@ -119,7 +119,7 @@ function serializeHeader(header: any, explode: boolean): string { headerAnn, headerKey, "simple", - explode + explode, ); if (headerDecorator == null) return; diff --git a/bank-feeds/src/internal/utils/index.ts b/bank-feeds/src/internal/utils/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/internal/utils/pathparams.ts b/bank-feeds/src/internal/utils/pathparams.ts old mode 100755 new mode 100644 index cdc9d8c7f..0b8137ac6 --- a/bank-feeds/src/internal/utils/pathparams.ts +++ b/bank-feeds/src/internal/utils/pathparams.ts @@ -17,7 +17,7 @@ export const ppMetadataKey = "pathParam"; export function getSimplePathParams( paramName: string, paramValue: any, - explode: boolean + explode: boolean, ): Map { const pathParams: Map = new Map(); const ppVals: string[] = []; @@ -34,7 +34,7 @@ export function getSimplePathParams( ) { Object.getOwnPropertyNames(paramValue).forEach((paramKey: string) => { const paramFieldValue = encodeURIComponent( - valToString(paramValue[paramKey]) + valToString(paramValue[paramKey]), ); if (explode) ppVals.push(`${paramKey}=${paramFieldValue}`); @@ -47,7 +47,7 @@ export function getSimplePathParams( const ppAnn: string = Reflect.getMetadata( ppMetadataKey, paramValue, - paramKey + paramKey, ); if (ppAnn == null) return; @@ -56,13 +56,13 @@ export function getSimplePathParams( ppAnn, paramKey, "simple", - explode + explode, ); if (ppDecorator == null) return; const paramFieldValue = encodeURIComponent( - valToString(paramValue[paramKey]) + valToString(paramValue[paramKey]), ); if (isEmpty(paramFieldValue)) return; diff --git a/bank-feeds/src/internal/utils/queryparams.ts b/bank-feeds/src/internal/utils/queryparams.ts old mode 100755 new mode 100644 index 90f565369..34a9f714f --- a/bank-feeds/src/internal/utils/queryparams.ts +++ b/bank-feeds/src/internal/utils/queryparams.ts @@ -7,15 +7,16 @@ import { parseParamDecorator, populateFromGlobals, shouldQueryParamSerialize, - valToString + valToString, } from "./utils"; -import {requestMetadataKey} from "./requestbody"; +import { requestMetadataKey } from "./requestbody"; export const qpMetadataKey = "queryParam"; const queryStringPrefix = "?"; -const filterAndJoin = (strings: string[]):string => strings.filter(s => !!s).join("&") +const filterAndJoin = (strings: string[]): string => + strings.filter((s) => !!s).join("&"); export function serializeQueryParams(queryParams: any, globals?: any): string { const queryStringParts: string[] = []; @@ -30,7 +31,7 @@ export function serializeQueryParams(queryParams: any, globals?: any): string { const requestBodyAnn: string = Reflect.getMetadata( requestMetadataKey, queryParams, - fname + fname, ); if (requestBodyAnn) return; @@ -38,16 +39,16 @@ export function serializeQueryParams(queryParams: any, globals?: any): string { const qpAnn: string = Reflect.getMetadata( qpMetadataKey, queryParams, - fname + fname, ); - if (!qpAnn) return {serialize: () => ""}; + if (!qpAnn) return { serialize: () => "" }; const qpDecorator: ParamDecorator = parseParamDecorator( qpAnn, fname, "form", - true + true, ); if (!qpDecorator) return; @@ -56,38 +57,38 @@ export function serializeQueryParams(queryParams: any, globals?: any): string { value = populateFromGlobals(value, fname, "queryParam", globals); if (qpDecorator.Serialization === "json") - queryStringParts.push(jsonSerializer({[qpDecorator.ParamName]: value})); + queryStringParts.push(jsonSerializer({ [qpDecorator.ParamName]: value })); else { switch (qpDecorator.Style) { case "deepObject": queryStringParts.push( - deepObjectSerializer({[qpDecorator.ParamName]: value}) + deepObjectSerializer({ [qpDecorator.ParamName]: value }), ); return; case "form": if (!qpDecorator.Explode) queryStringParts.push( - noExplodeSerializer({[qpDecorator.ParamName]: value}) + noExplodeSerializer({ [qpDecorator.ParamName]: value }), ); else queryStringParts.push( - formSerializerExplode({[qpDecorator.ParamName]: value}) + formSerializerExplode({ [qpDecorator.ParamName]: value }), ); return; case "pipeDelimited": if (!qpDecorator.Explode) { queryStringParts.push( - noExplodeSerializer({[qpDecorator.ParamName]: value}, "|") + noExplodeSerializer({ [qpDecorator.ParamName]: value }, "|"), ); } else { queryStringParts.push( - formSerializerExplode({[qpDecorator.ParamName]: value}) + formSerializerExplode({ [qpDecorator.ParamName]: value }), ); } return; default: queryStringParts.push( - formSerializerExplode({[qpDecorator.ParamName]: value}) + formSerializerExplode({ [qpDecorator.ParamName]: value }), ); } } @@ -106,7 +107,10 @@ function jsonSerializer(params: Record): string { } // TODO: Add support for disabling percent encoding for reserved characters -function noExplodeSerializer(params: Record, delimiter = ","): string { +function noExplodeSerializer( + params: Record, + delimiter = ",", +): string { const query: string[] = []; Object.entries(Object.assign({}, params)).forEach(([key, value]) => { @@ -123,19 +127,20 @@ function noExplodeSerializer(params: Record, delimiter = ","): stri const qpAnn: string = Reflect.getMetadata( qpMetadataKey, value, - paramKey + paramKey, ); const qpDecorator: ParamDecorator = parseParamDecorator( qpAnn, paramKey, "form", - true + true, ); if (qpDecorator == null) return; - return `${paramKey}${delimiter}${valToString(value[paramKey])}`; + const key = qpDecorator.ParamName || paramKey; + return `${key}${delimiter}${valToString(value[paramKey])}`; }) .join(delimiter); query.push(`${key}=${encodeURIComponent(values)}`); @@ -154,9 +159,9 @@ function formSerializerExplode(params: Record): string { query.push(`${key}=${encodeURIComponent(value)}`); else if (Array.isArray(value)) { query.push( - value + value .map((aValue) => `${key}=${encodeURIComponent(valToString(aValue))}`) - .join("&") + .join("&"), ); } else query.push( @@ -165,23 +170,22 @@ function formSerializerExplode(params: Record): string { const qpAnn: string = Reflect.getMetadata( qpMetadataKey, value, - paramKey + paramKey, ); const qpDecorator: ParamDecorator = parseParamDecorator( qpAnn, paramKey, "form", - true + true, ); if (qpDecorator == null) return; - return `${paramKey}=${encodeURIComponent( - valToString(value[paramKey]) - )}`; + const key = qpDecorator.ParamName || paramKey; + return `${key}=${encodeURIComponent(valToString(value[paramKey]))}`; }) - .join("&") + .join("&"), ); }); return filterAndJoin(query); @@ -200,9 +204,9 @@ function deepObjectSerializer(params: Record): string { value .map( ([objKey, objValue]) => - `${key}[${objKey}]=${encodeURIComponent(valToString(objValue))}` + `${key}[${objKey}]=${encodeURIComponent(valToString(objValue))}`, ) - .join("&") + .join("&"), ); } else query.push( @@ -211,14 +215,14 @@ function deepObjectSerializer(params: Record): string { const qpAnn: string = Reflect.getMetadata( qpMetadataKey, value, - paramKey + paramKey, ); const qpDecorator: ParamDecorator = parseParamDecorator( qpAnn, paramKey, "form", - true + true, ); if (qpDecorator == null) return; @@ -229,15 +233,15 @@ function deepObjectSerializer(params: Record): string { .map( (arrValue: any) => `${key}[${paramKey}]=${encodeURIComponent( - valToString(arrValue) - )}` + valToString(arrValue), + )}`, ) .join("&"); return `${key}[${paramKey}]=${encodeURIComponent( - valToString(value[paramKey]) + valToString(value[paramKey]), )}`; }) - .join("&") + .join("&"), ); }); return filterAndJoin(query); diff --git a/bank-feeds/src/internal/utils/requestbody.ts b/bank-feeds/src/internal/utils/requestbody.ts old mode 100755 new mode 100644 index f7a1f55f0..3e4374c15 --- a/bank-feeds/src/internal/utils/requestbody.ts +++ b/bank-feeds/src/internal/utils/requestbody.ts @@ -2,382 +2,356 @@ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. */ -import {isBooleanRecord, isNumberRecord, isStringRecord, SerializationMethodToContentType, valToString,} from "./utils"; +import { + isBooleanRecord, + isNumberRecord, + isStringRecord, + SerializationMethodToContentType, + valToString, +} from "./utils"; import FormData from "form-data"; -import {RFCDate} from "../../sdk/types"; -import {classToPlain} from "class-transformer"; +import { RFCDate } from "../../sdk/types"; +import { classToPlain } from "class-transformer"; export const requestMetadataKey = "request"; const mpFormMetadataKey = "multipart_form"; export function serializeRequestBody( - request: any, - requestFieldName: string, - serializationMethod: string + request: any, + requestFieldName: string, + serializationMethod: string ): [Record, any] { - if ( - request !== Object(request) || - !request.hasOwnProperty(requestFieldName) - ) { - return serializeContentType( - SerializationMethodToContentType[serializationMethod], - request - ); - } - - const requestBodyAnn: string = Reflect.getMetadata( - requestMetadataKey, - request, - requestFieldName - ); - if (!requestBodyAnn) { - throw new Error("invalid request type"); - } - - const requestDecorator: RequestDecorator = - parseRequestDecorator(requestBodyAnn); - return serializeContentType( - requestDecorator.MediaType, - request[requestFieldName] - ); -} + if (request !== Object(request) || !request.hasOwnProperty(requestFieldName)) { + return serializeContentType(SerializationMethodToContentType[serializationMethod], request); + } -const serializeContentType = ( - contentType: string, - reqBody: any -): [Record, any] => { - let [requestHeaders, requestBody]: [Record, any] = [{}, {}]; - - switch (contentType) { - case "multipart/form-data": - requestBody = encodeMultipartFormData(reqBody); - break; - - case "multipart/mixed": - requestBody = encodeMultipartFormData(reqBody); - requestHeaders = (requestBody as FormData).getHeaders(); - break; - - case "application/x-www-form-urlencoded": - [requestHeaders, requestBody] = [ - {"Content-Type": `${contentType}`}, - encodeFormUrlEncodeData(reqBody), - ]; - break; - - case "application/json": - [requestHeaders, requestBody] = [ - {"Content-Type": `${contentType}`}, - classToPlain(reqBody, {exposeUnsetFields: false}), - ]; - break; - case "text/json": - [requestHeaders, requestBody] = [ - {"Content-Type": `${contentType}`}, - reqBody, - ]; - break; - - default: { - requestBody = reqBody; - const requestBodyType: string = typeof requestBody; - if ( - requestBodyType === "string" || - requestBody instanceof String || - requestBody instanceof Uint8Array - ) - requestHeaders = {"Content-Type": `${contentType}`}; - else - throw new Error( - `invalid request body type ${requestBodyType} for mediaType ${contentType}` - ); + const requestBodyAnn: string = Reflect.getMetadata( + requestMetadataKey, + request, + requestFieldName + ); + if (!requestBodyAnn) { + throw new Error("invalid request type"); } - } - return [requestHeaders, requestBody]; -}; -const encodeFormUrlEncodeData = (data: any): FormData => { - const formData: FormData = new FormData(); - const fieldNames: string[] = Object.getOwnPropertyNames(data); + const requestDecorator: RequestDecorator = parseRequestDecorator(requestBodyAnn); + return serializeContentType(requestDecorator.MediaType, request[requestFieldName]); +} - if (isNumberRecord(data) || isBooleanRecord(data) || isStringRecord(data)) { - fieldNames.forEach((fname) => { - formData.append(fname, String(data[fname])); - }); - } else { - fieldNames.forEach((fname) => { - const formAnn: string = Reflect.getMetadata("form", data, fname); - if (formAnn === null) { - return; - } - const formDecorator: FormDecorator = parseFormDecorator(formAnn); - - if (formDecorator.JSON) { - formData.append( - formDecorator.Name ?? fname, - JSON.stringify(data[fname]) - ); - return; - } - - if (formDecorator.Style === "form") { - let parsed: Record; - if (formDecorator.Explode === true) { - parsed = formExplode(fname, data[fname]); - } else { - parsed = formNotExplode(fname, data[fname]); +const serializeContentType = (contentType: string, reqBody: any): [Record, any] => { + let [requestHeaders, requestBody]: [Record, any] = [{}, {}]; + + switch (contentType) { + case "multipart/form-data": + requestBody = encodeMultipartFormData(reqBody); + break; + + case "multipart/mixed": + requestBody = encodeMultipartFormData(reqBody); + requestHeaders = (requestBody as FormData).getHeaders(); + break; + + case "application/x-www-form-urlencoded": + [requestHeaders, requestBody] = [ + { "Content-Type": `${contentType}` }, + encodeFormUrlEncodedData(reqBody), + ]; + break; + + case "application/json": + [requestHeaders, requestBody] = [ + { "Content-Type": `${contentType}` }, + classToPlain(reqBody, { exposeUnsetFields: false }), + ]; + break; + case "text/json": + [requestHeaders, requestBody] = [{ "Content-Type": `${contentType}` }, reqBody]; + break; + + default: { + requestBody = reqBody; + const requestBodyType: string = typeof requestBody; + if ( + requestBodyType === "string" || + requestBody instanceof String || + requestBody instanceof Uint8Array + ) + requestHeaders = { "Content-Type": `${contentType}` }; + else + throw new Error( + `invalid request body type ${requestBodyType} for mediaType ${contentType}` + ); } + } + return [requestHeaders, requestBody]; +}; - Object.keys(parsed).forEach((key) => { - parsed[key].forEach((v) => formData.append(key, v)); +const encodeFormUrlEncodedData = (data: any): string => { + const fieldNames: string[] = Object.getOwnPropertyNames(data); + + let urlencoded = ""; + let amp = ""; + const appendPair = (key: string, value: string) => { + urlencoded += `${amp}${encodeURIComponent(key)}=${encodeURIComponent(value)}`; + amp = "&"; + }; + + if (isNumberRecord(data) || isBooleanRecord(data) || isStringRecord(data)) { + fieldNames.forEach((fname) => { + const formAnn: string = Reflect.getMetadata("form", data, fname); + let name = fname; + if (formAnn) { + const formDecorator: FormDecorator = parseFormDecorator(formAnn); + name = formDecorator.Name ?? fname; + } + appendPair(name, data[fname]?.toString()); }); - return; - } - }); - } - return formData; + } else { + fieldNames.forEach((fname) => { + const formAnn: string = Reflect.getMetadata("form", data, fname); + if (formAnn === null) { + return; + } + const formDecorator: FormDecorator = parseFormDecorator(formAnn); + + if (formDecorator.JSON) { + const name = formDecorator.Name ?? fname; + const val = JSON.stringify(data[fname]); + appendPair(name, val); + } else if (formDecorator.Style === "form") { + let parsed: Record; + const name = formDecorator.Name ?? fname; + if (formDecorator.Explode === true) { + parsed = formExplode(name, data[fname]); + } else { + parsed = formNotExplode(name, data[fname]); + } + + Object.keys(parsed).forEach((key) => { + parsed[key].forEach((v) => appendPair(key, v)); + }); + return; + } + }); + } + return urlencoded; }; const formExplode = (fname: string, data: any): Record => { - const exploded: Record = {}; - - if (Array.isArray(data)) { - data.forEach((value) => { - if (!exploded[fname]) { - exploded[fname] = []; - } - exploded[fname].push(value); - }); - } else if (typeof data === "object") { - if (data instanceof Date || data instanceof RFCDate) { - if (!exploded[fname]) { - exploded[fname] = []; - } - exploded[fname].push(valToString(data)); + const exploded: Record = {}; + + if (Array.isArray(data)) { + data.forEach((value) => { + if (!exploded[fname]) { + exploded[fname] = []; + } + exploded[fname].push(value); + }); + } else if (typeof data === "object") { + if (data instanceof Date || data instanceof RFCDate) { + if (!exploded[fname]) { + exploded[fname] = []; + } + exploded[fname].push(valToString(data)); + } else { + Object.keys(data).forEach((key) => { + if (!exploded[key]) { + exploded[key] = []; + } + exploded[key].push(data[key]); + }); + } } else { - Object.keys(data).forEach((key) => { - if (!exploded[key]) { - exploded[key] = []; + if (!exploded[fname]) { + exploded[fname] = []; } - exploded[key].push(data[key]); - }); - } - } else { - if (!exploded[fname]) { - exploded[fname] = []; + exploded[fname].push(valToString(data)); } - exploded[fname].push(valToString(data)); - } - return exploded; + return exploded; }; const formNotExplode = (fname: string, data: any): Record => { - const notExploded: Record = {}; + const notExploded: Record = {}; - if (Array.isArray(data)) { - if (!notExploded[fname]) { - notExploded[fname] = []; - } - notExploded[fname].push(data.map((item) => item.toString()).join(",")); - } else if (typeof data === "object") { - if (data instanceof Date || data instanceof RFCDate) { - if (!notExploded[fname]) { - notExploded[fname] = []; - } - notExploded[fname].push(valToString(data)); + if (Array.isArray(data)) { + if (!notExploded[fname]) { + notExploded[fname] = []; + } + notExploded[fname].push(data.map((item) => item.toString()).join(",")); + } else if (typeof data === "object") { + if (data instanceof Date || data instanceof RFCDate) { + if (!notExploded[fname]) { + notExploded[fname] = []; + } + notExploded[fname].push(valToString(data)); + } else { + Object.keys(data).forEach((key) => { + if (!notExploded[key]) { + notExploded[key] = []; + } + notExploded[fname].push(`${key}=${data[key]}`); + }); + } } else { - Object.keys(data).forEach((key) => { - if (!notExploded[key]) { - notExploded[key] = []; + if (!notExploded[fname]) { + notExploded[fname] = []; } - notExploded[fname].push(`${key}=${data[key]}`); - }); - } - } else { - if (!notExploded[fname]) { - notExploded[fname] = []; + notExploded[fname].push(valToString(data)); } - notExploded[fname].push(valToString(data)); - } - return notExploded; + return notExploded; }; function parseFormDecorator(formAnn: string): FormDecorator { - const formDecorator: FormDecorator = new FormDecorator( - "", - "form", - false, - false - ); - formAnn.split(";").forEach((formAnnPart) => { - const [formKey, formVal]: string[] = formAnnPart.split("="); - switch (formKey) { - case "name": - formDecorator.Name = formVal; - break; - case "style": - formDecorator.Style = formVal; - break; - case "explode": - formDecorator.Explode = formVal === "true"; - break; - case "json": - formDecorator.JSON = formVal === "true"; - break; - } - }); + const formDecorator: FormDecorator = new FormDecorator("", "form", false, false); + formAnn.split(";").forEach((formAnnPart) => { + const [formKey, formVal]: string[] = formAnnPart.split("="); + switch (formKey) { + case "name": + formDecorator.Name = formVal; + break; + case "style": + formDecorator.Style = formVal; + break; + case "explode": + formDecorator.Explode = formVal === "true"; + break; + case "json": + formDecorator.JSON = formVal === "true"; + break; + } + }); - return formDecorator; + return formDecorator; } class FormDecorator { - Name?: string; - Style?: string; - Explode?: boolean; - JSON?: boolean; - - constructor( - Name?: string, - Style?: string, - Explode?: boolean, - JSON?: boolean - ) { - this.Name = Name; - this.Style = Style; - this.Explode = Explode; - this.JSON = JSON; - } + Name?: string; + Style?: string; + Explode?: boolean; + JSON?: boolean; + + constructor(Name?: string, Style?: string, Explode?: boolean, JSON?: boolean) { + this.Name = Name; + this.Style = Style; + this.Explode = Explode; + this.JSON = JSON; + } } function encodeMultipartFormData(form: any): FormData { - const formData: FormData = new FormData(); - - const fieldNames: string[] = Object.getOwnPropertyNames(form); - fieldNames.forEach((fname) => { - const mpFormAnn: string = Reflect.getMetadata( - mpFormMetadataKey, - form, - fname - ); + const formData: FormData = new FormData(); - if (mpFormAnn == null) return; + const fieldNames: string[] = Object.getOwnPropertyNames(form); + fieldNames.forEach((fname) => { + const mpFormAnn: string = Reflect.getMetadata(mpFormMetadataKey, form, fname); - const mpFormDecorator: MultipartFormDecorator = - parseMultipartFormDecorator(mpFormAnn); + if (mpFormAnn == null) return; - if (mpFormDecorator.File) - return encodeMultipartFormDataFile(formData, form[fname]); - else if (mpFormDecorator.JSON) { - formData.append(mpFormDecorator.Name, JSON.stringify(form[fname])); - } else { - if (Array.isArray(form[fname])) { - form[fname].forEach((val: any) => { - formData.append(mpFormDecorator.Name + "[]", valToString(val)); - }); - } else { - formData.append(mpFormDecorator.Name, valToString(form[fname])); - } - } - }); - return formData; + const mpFormDecorator: MultipartFormDecorator = parseMultipartFormDecorator(mpFormAnn); + + if (mpFormDecorator.File) return encodeMultipartFormDataFile(formData, form[fname]); + else if (mpFormDecorator.JSON) { + formData.append(mpFormDecorator.Name, JSON.stringify(form[fname])); + } else { + if (Array.isArray(form[fname])) { + form[fname].forEach((val: any) => { + formData.append(mpFormDecorator.Name + "[]", valToString(val)); + }); + } else { + formData.append(mpFormDecorator.Name, valToString(form[fname])); + } + } + }); + return formData; } function encodeMultipartFormDataFile(formData: FormData, file: any): FormData { - if (typeof file !== "object" || Array.isArray(file) || file == null) { - throw new Error("invalid type for multipart/form-data file"); - } - let content: any = null; - let fileName = ""; - let mpFormDecoratorName = ""; - - const fieldNames: string[] = Object.getOwnPropertyNames(file); - fieldNames.forEach((fname) => { - const mpFormAnn: string = Reflect.getMetadata( - mpFormMetadataKey, - file, - fname - ); + if (typeof file !== "object" || Array.isArray(file) || file == null) { + throw new Error("invalid type for multipart/form-data file"); + } + let content: any = null; + let fileName = ""; + let mpFormDecoratorName = ""; - if (mpFormAnn == null) return; + const fieldNames: string[] = Object.getOwnPropertyNames(file); + fieldNames.forEach((fname) => { + const mpFormAnn: string = Reflect.getMetadata(mpFormMetadataKey, file, fname); - const mpFormDecorator: MultipartFormDecorator = - parseMultipartFormDecorator(mpFormAnn); + if (mpFormAnn == null) return; - if (!mpFormDecorator.Content && mpFormDecorator.Name == "") return; - if (mpFormDecorator.Content) content = file[fname]; - else { - mpFormDecoratorName = mpFormDecorator.Name; - fileName = file[fname]; - } - }); + const mpFormDecorator: MultipartFormDecorator = parseMultipartFormDecorator(mpFormAnn); - if (mpFormDecoratorName === "" || fileName === "" || content == null) { - throw new Error("invalid multipart/form-data file"); - } - formData.append(mpFormDecoratorName, Buffer.from(content), fileName); - return formData; -} + if (!mpFormDecorator.Content && mpFormDecorator.Name == "") return; + if (mpFormDecorator.Content) content = file[fname]; + else { + mpFormDecoratorName = mpFormDecorator.Name; + fileName = file[fname]; + } + }); -function parseMultipartFormDecorator( - mpFormAnn: string -): MultipartFormDecorator { - // example "name=file" - const mpFormDecorator: MultipartFormDecorator = new MultipartFormDecorator( - false, - false, - false, - "" - ); - mpFormAnn.split(";").forEach((mpFormAnnPart) => { - const [mpFormKey, mpFormVal]: string[] = mpFormAnnPart.split("="); - switch (mpFormKey) { - case "file": - mpFormDecorator.File = mpFormVal == "true"; - break; - case "content": - mpFormDecorator.Content = mpFormVal == "true"; - break; - case "name": - mpFormDecorator.Name = mpFormVal; - break; - case "json": - mpFormDecorator.JSON = mpFormVal == "true"; - break; + if (mpFormDecoratorName === "" || fileName === "" || content == null) { + throw new Error("invalid multipart/form-data file"); } - }); + formData.append(mpFormDecoratorName, Buffer.from(content), fileName); + return formData; +} - return mpFormDecorator; +function parseMultipartFormDecorator(mpFormAnn: string): MultipartFormDecorator { + // example "name=file" + const mpFormDecorator: MultipartFormDecorator = new MultipartFormDecorator( + false, + false, + false, + "" + ); + mpFormAnn.split(";").forEach((mpFormAnnPart) => { + const [mpFormKey, mpFormVal]: string[] = mpFormAnnPart.split("="); + switch (mpFormKey) { + case "file": + mpFormDecorator.File = mpFormVal == "true"; + break; + case "content": + mpFormDecorator.Content = mpFormVal == "true"; + break; + case "name": + mpFormDecorator.Name = mpFormVal; + break; + case "json": + mpFormDecorator.JSON = mpFormVal == "true"; + break; + } + }); + + return mpFormDecorator; } class MultipartFormDecorator { - File: boolean; - Content: boolean; - JSON: boolean; - Name: string; - - constructor(File: boolean, Content: boolean, JSON: boolean, Name: string) { - this.File = File; - this.Content = Content; - this.JSON = JSON; - this.Name = Name; - } + File: boolean; + Content: boolean; + JSON: boolean; + Name: string; + + constructor(File: boolean, Content: boolean, JSON: boolean, Name: string) { + this.File = File; + this.Content = Content; + this.JSON = JSON; + this.Name = Name; + } } function parseRequestDecorator(requestAnn: string): RequestDecorator { - // example "media_type=multipart/form-data" - const requestDecorator: RequestDecorator = new RequestDecorator( - "application/octet-stream" - ); - const [mediaTypeKey, mediaTypeVal]: string[] = requestAnn.split("="); - if (mediaTypeKey === "media_type") requestDecorator.MediaType = mediaTypeVal; - return requestDecorator; + // example "media_type=multipart/form-data" + const requestDecorator: RequestDecorator = new RequestDecorator("application/octet-stream"); + const [mediaTypeKey, mediaTypeVal]: string[] = requestAnn.split("="); + if (mediaTypeKey === "media_type") requestDecorator.MediaType = mediaTypeVal; + return requestDecorator; } class RequestDecorator { - MediaType: string; + MediaType: string; - constructor(MediaType: string) { - this.MediaType = MediaType; - } + constructor(MediaType: string) { + this.MediaType = MediaType; + } } diff --git a/bank-feeds/src/internal/utils/retries.ts b/bank-feeds/src/internal/utils/retries.ts old mode 100755 new mode 100644 index 8fea21de1..6b03d6f3d --- a/bank-feeds/src/internal/utils/retries.ts +++ b/bank-feeds/src/internal/utils/retries.ts @@ -14,7 +14,7 @@ export class BackoffStrategy { initialInterval: number, maxInterval: number, exponent: number, - maxElapsedTime: number + maxElapsedTime: number, ) { this.initialInterval = initialInterval; this.maxInterval = maxInterval; @@ -31,7 +31,7 @@ export class RetryConfig { constructor( strategy: "backoff" | "none", backoff?: BackoffStrategy, - retryConnectionErrors = true + retryConnectionErrors = true, ) { this.strategy = strategy; this.backoff = backoff; @@ -73,7 +73,7 @@ class TemporaryError extends Error { export async function Retry( fn: () => Promise>, - retries: Retries + retries: Retries, ): Promise> { switch (retries.config.strategy) { case "backoff": @@ -107,7 +107,7 @@ export async function Retry( retries.config.backoff?.initialInterval ?? 500, retries.config.backoff?.maxInterval ?? 60000, retries.config.backoff?.exponent ?? 1.5, - retries.config.backoff?.maxElapsedTime ?? 3600000 + retries.config.backoff?.maxElapsedTime ?? 3600000, ); default: return await fn(); @@ -116,7 +116,7 @@ export async function Retry( function isRetryableResponse( res: AxiosResponse, - statusCodes: string[] + statusCodes: string[], ): boolean { for (const code of statusCodes) { if (code.toUpperCase().includes("X")) { @@ -143,12 +143,13 @@ async function retryBackoff( initialInterval: number, maxInterval: number, exponent: number, - maxElapsedTime: number + maxElapsedTime: number, ): Promise> { const start = Date.now(); let x = 0; - while (true) { /* eslint-disable-line no-constant-condition */ + // eslint-disable-next-line no-constant-condition + while (true) { try { return await fn(); } catch (err) { @@ -167,7 +168,7 @@ async function retryBackoff( const d = Math.min( initialInterval * Math.pow(x, exponent) + Math.random() * 1000, - maxInterval + maxInterval, ); await delay(d); diff --git a/bank-feeds/src/internal/utils/security.ts b/bank-feeds/src/internal/utils/security.ts old mode 100755 new mode 100644 index 8f183b416..d9c693d47 --- a/bank-feeds/src/internal/utils/security.ts +++ b/bank-feeds/src/internal/utils/security.ts @@ -5,13 +5,11 @@ const securityMetadataKey = "security"; export type SecurityProperties = { - params: Record, - headers: Record, -} + params: Record; + headers: Record; +}; -export function parseSecurityProperties( - security: any -): SecurityProperties { +export function parseSecurityProperties(security: any): SecurityProperties { return parseSecurityClass(security); } @@ -48,23 +46,21 @@ function parseSecurityDecorator(securityAnn: string): SecurityDecorator { securityType, option, scheme, - securitySubType + securitySubType, ); } -function parseSecurityClass( - security: any -): SecurityProperties { +function parseSecurityClass(security: any): SecurityProperties { const fieldNames: string[] = Object.getOwnPropertyNames(security); const properties: SecurityProperties = { params: {}, headers: {}, - } + }; fieldNames.forEach((fname) => { const securityAnn: string = Reflect.getMetadata( securityMetadataKey, security, - fname + fname, ); if (securityAnn == null) return; const securityDecorator: SecurityDecorator = @@ -89,27 +85,31 @@ function parseSecurityClass( function parseSecurityOption( properties: SecurityProperties, - optionType: any + optionType: any, ): void { const fieldNames: string[] = Object.getOwnPropertyNames(optionType); fieldNames.forEach((fname) => { const securityAnn: string = Reflect.getMetadata( securityMetadataKey, optionType, - fname + fname, ); if (securityAnn == null) return; const securityDecorator: SecurityDecorator = parseSecurityDecorator(securityAnn); if (securityDecorator == null || !securityDecorator.Scheme) return; - return parseSecurityScheme(properties, securityDecorator, optionType[fname]); + return parseSecurityScheme( + properties, + securityDecorator, + optionType[fname], + ); }); } function parseSecurityScheme( properties: SecurityProperties, schemeDecorator: SecurityDecorator, - scheme: any + scheme: any, ): void { if (scheme === Object(scheme)) { if ( @@ -124,7 +124,7 @@ function parseSecurityScheme( const securityAnn: string = Reflect.getMetadata( securityMetadataKey, scheme, - fname + fname, ); if (securityAnn == null) return; const securityDecorator: SecurityDecorator = @@ -135,7 +135,7 @@ function parseSecurityScheme( properties, schemeDecorator, securityDecorator, - scheme[fname] + scheme[fname], ); }); } else { @@ -143,7 +143,7 @@ function parseSecurityScheme( properties, schemeDecorator, schemeDecorator, - scheme + scheme, ); } } @@ -152,7 +152,7 @@ function parseSecuritySchemeValue( properties: SecurityProperties, schemeDecorator: SecurityDecorator, securityDecorator: SecurityDecorator, - value: any + value: any, ): void { switch (schemeDecorator.Type) { case "apiKey": @@ -166,9 +166,7 @@ function parseSecuritySchemeValue( case "cookie": { const securityDecoratorName: string = securityDecorator.Name; const val: string = value; - properties.headers[ - "Cookie" - ] = `${securityDecoratorName}=${val}`; + properties.headers["Cookie"] = `${securityDecoratorName}=${val}`; break; } default: @@ -179,14 +177,22 @@ function parseSecuritySchemeValue( properties.headers[securityDecorator.Name] = value; break; case "oauth2": - properties.headers[securityDecorator.Name] = value; + properties.headers[securityDecorator.Name] = value + .toLowerCase() + .startsWith("bearer ") + ? value + : `Bearer ${value}`; break; case "http": switch (schemeDecorator.SubType) { case "basic": break; case "bearer": - properties.headers[securityDecorator.Name] = value.toLowerCase().startsWith("bearer ") ? value : `Bearer ${value}`; + properties.headers[securityDecorator.Name] = value + .toLowerCase() + .startsWith("bearer ") + ? value + : `Bearer ${value}`; break; default: throw new Error("not supported"); @@ -199,7 +205,7 @@ function parseSecuritySchemeValue( function parseBasicAuthScheme( properties: SecurityProperties, - scheme: any + scheme: any, ): void { let username, password = ""; @@ -209,7 +215,7 @@ function parseBasicAuthScheme( const securityAnn: string = Reflect.getMetadata( securityMetadataKey, scheme, - fname + fname, ); if (securityAnn == null) return; const securityDecorator: SecurityDecorator = @@ -226,7 +232,9 @@ function parseBasicAuthScheme( } }); - properties.headers["Authorization"] = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`; + properties.headers["Authorization"] = `Basic ${Buffer.from( + `${username}:${password}`, + ).toString("base64")}`; } class SecurityDecorator { @@ -240,7 +248,7 @@ class SecurityDecorator { Type: string, Option: boolean, Scheme: boolean, - SubType: string + SubType: string, ) { this.Name = Name; this.Type = Type; diff --git a/bank-feeds/src/internal/utils/utils.ts b/bank-feeds/src/internal/utils/utils.ts old mode 100755 new mode 100644 index 03daf8839..38f9f4b66 --- a/bank-feeds/src/internal/utils/utils.ts +++ b/bank-feeds/src/internal/utils/utils.ts @@ -4,401 +4,364 @@ import "reflect-metadata"; -import {getSimplePathParams, ppMetadataKey} from "./pathparams"; +import { getSimplePathParams, ppMetadataKey } from "./pathparams"; -import {plainToInstance} from "class-transformer"; -import {RFCDate} from "../../sdk/types"; -import {requestMetadataKey} from "./requestbody"; +import { plainToInstance } from "class-transformer"; +import { RFCDate } from "../../sdk/types"; +import { requestMetadataKey } from "./requestbody"; export const SerializationMethodToContentType: Record = { - json: "application/json", - form: "application/x-www-form-urlencoded", - multipart: "multipart/form-data", - raw: "application/octet-stream", - string: "text/plain", + json: "application/json", + form: "application/x-www-form-urlencoded", + multipart: "multipart/form-data", + raw: "application/octet-stream", + string: "text/plain", }; export interface PropInfo { - key: string | symbol; - type: any; - elemType: any; - elemDepth: number; + key: string | symbol; + type: any; + elemType: any; + elemDepth: number; } function isSpeakeasyBase(type: any): boolean { - return type && Object.getPrototypeOf(type)?.name == SpeakeasyBase.name; + return type && Object.getPrototypeOf(type)?.name == SpeakeasyBase.name; } function handleArray(value: any, elemType: any, elemDepth: number): any { - if (!Array.isArray(value)) { - return value; - } - - if (elemDepth == 1) { - return value.map((v: any) => new elemType(v)); - } else { - return value.map((v: any) => { - if (Array.isArray(v)) { - return handleArray(v, elemType, elemDepth - 1); - } else if (typeof v == "object") { - return handleObject(v, elemType, elemDepth - 1); - } else { - return v; - } - }); - } + if (!Array.isArray(value)) { + return value; + } + + if (elemDepth == 1) { + return value.map((v: any) => new elemType(v)); + } else { + return value.map((v: any) => { + if (Array.isArray(v)) { + return handleArray(v, elemType, elemDepth - 1); + } else if (typeof v == "object") { + return handleObject(v, elemType, elemDepth - 1); + } else { + return v; + } + }); + } } function handleObject(value: any, elemType: any, elemDepth: number): any { - if (typeof value != "object") { - return value; - } - - if (elemDepth == 1) { - return Object.keys(value).reduce((acc: any, key: string) => { - acc[key] = new elemType(value[key]); - return acc; - }, {}); - } else { - return Object.keys(value).reduce((acc: any, key: string) => { - const v = value[key]; - if (Array.isArray(v)) { - acc[key] = handleArray(v, elemType, elemDepth - 1); - } else if (typeof v == "object") { - acc[key] = handleObject(v, elemType, elemDepth - 1); - } else { - acc[key] = v; - } - return acc; - }, {}); - } + if (typeof value != "object") { + return value; + } + + if (elemDepth == 1) { + return Object.keys(value).reduce((acc: any, key: string) => { + acc[key] = new elemType(value[key]); + return acc; + }, {}); + } else { + return Object.keys(value).reduce((acc: any, key: string) => { + const v = value[key]; + if (Array.isArray(v)) { + acc[key] = handleArray(v, elemType, elemDepth - 1); + } else if (typeof v == "object") { + acc[key] = handleObject(v, elemType, elemDepth - 1); + } else { + acc[key] = v; + } + return acc; + }, {}); + } } export class SpeakeasyBase { - constructor(payload?: Record) { - const props: PropInfo[] = (this as any)["__props__"]; - if (props) { - for (const prop of props) { - if (payload && payload.hasOwnProperty(prop.key)) { - const value = payload[prop.key]; - if (isSpeakeasyBase(prop.type) && value != null) { - (this as any)[prop.key] = new prop.type(value); - } else if ( - prop.type.name == "Array" && - isSpeakeasyBase(prop.elemType) - ) { - (this as any)[prop.key] = handleArray( - value, - prop.elemType, - prop.elemDepth - ); - } else if ( - prop.type.name == "Object" && - isSpeakeasyBase(prop.elemType) - ) { - (this as any)[prop.key] = handleObject( - value, - prop.elemType, - prop.elemDepth - ); - } else if (prop.type.name == "RFCDate") { - if (value instanceof Date) { - (this as any)[prop.key] = new RFCDate(value); - } else { - (this as any)[prop.key] = value; + constructor(payload?: Record) { + const props: PropInfo[] = (this as any)["__props__"]; + if (props) { + for (const prop of props) { + if (payload && payload.hasOwnProperty(prop.key)) { + const value = payload[prop.key]; + if (isSpeakeasyBase(prop.type) && value != null) { + (this as any)[prop.key] = new prop.type(value); + } else if (prop.type.name == "Array" && isSpeakeasyBase(prop.elemType)) { + (this as any)[prop.key] = handleArray(value, prop.elemType, prop.elemDepth); + } else if (prop.type.name == "Object" && isSpeakeasyBase(prop.elemType)) { + (this as any)[prop.key] = handleObject( + value, + prop.elemType, + prop.elemDepth + ); + } else if (prop.type.name == "RFCDate") { + if (value instanceof Date) { + (this as any)[prop.key] = new RFCDate(value); + } else { + (this as any)[prop.key] = value; + } + } else { + (this as any)[prop.key] = value; + } + } } - } else { - (this as any)[prop.key] = value; - } } - } } - } } export class ParamDecorator { - Style: string; - Explode: boolean; - ParamName: string; - Serialization?: string; - constructor( - Style: string, - Explode: boolean, - ParamName: string, - Serialization?: string - ) { - this.Style = Style; - this.Explode = Explode; - this.ParamName = ParamName; - this.Serialization = Serialization; - } + Style: string; + Explode: boolean; + ParamName: string; + Serialization?: string; + constructor(Style: string, Explode: boolean, ParamName: string, Serialization?: string) { + this.Style = Style; + this.Explode = Explode; + this.ParamName = ParamName; + this.Serialization = Serialization; + } } export function SpeakeasyMetadata< - T extends SpeakeasyBase = Record ->(params?: { - data?: string; - elemType?: { new (): T }; - elemDepth?: number; -}): PropertyDecorator { - return (target, propertyKey) => { - if (params?.data) { - const annsArr = params.data.split(", "); - - for (let i = 0; i < annsArr.length; i += 2) { - Reflect.defineMetadata(annsArr[i], annsArr[i + 1], target, propertyKey); - } - } + T extends SpeakeasyBase = Record +>(params?: { data?: string; elemType?: { new (): T }; elemDepth?: number }): PropertyDecorator { + return (target, propertyKey) => { + if (params?.data) { + const annsArr = params.data.split(", "); + + for (let i = 0; i < annsArr.length; i += 2) { + Reflect.defineMetadata(annsArr[i], annsArr[i + 1], target, propertyKey); + } + } - let props: PropInfo[]; - if (target.hasOwnProperty("__props__")) { - props = (target as any)["__props__"]; - } else { - props = (target as any)["__props__"] = []; - } + let props: PropInfo[]; + if (target.hasOwnProperty("__props__")) { + props = (target as any)["__props__"]; + } else { + props = (target as any)["__props__"] = []; + } - const prop = { - key: propertyKey, - type: Reflect.getMetadata("design:type", target, propertyKey), - } as PropInfo; + const prop = { + key: propertyKey, + type: Reflect.getMetadata("design:type", target, propertyKey), + } as PropInfo; - if (params?.elemType) { - prop.elemType = params.elemType; - prop.elemDepth = params.elemDepth || 1; - } + if (params?.elemType) { + prop.elemType = params.elemType; + prop.elemDepth = params.elemDepth || 1; + } - props.push(prop); - }; + props.push(prop); + }; } -export function templateUrl( - stringWithParams: string, - params: Record -): string { - let res: string = stringWithParams; - if(params) { - Object.entries(params).forEach(([key, value]) => { - const match: string = "{" + key + "}"; - res = res.replaceAll(match, value); - }); - } - return res; +export function templateUrl(stringWithParams: string, params: Record): string { + let res: string = stringWithParams; + if (params) { + Object.entries(params).forEach(([key, value]) => { + const match: string = "{" + key + "}"; + res = res.replaceAll(match, value); + }); + } + return res; } export function generateURL( - serverURL: string, - path: string, - pathParams: any, - globals?: any + serverURL: string, + path: string, + pathParams: any, + globals?: any ): string { - const url: string = serverURL.replace(/\/$/, "") + path; - const parsedParameters: Record = {}; - - const fieldNames: string[] = - "__props__" in pathParams - ? pathParams["__props__"].map((prop: any) => prop.key) - : Object.getOwnPropertyNames(pathParams); - fieldNames.forEach((fname) => { - const requestBodyAnn: string = Reflect.getMetadata( - requestMetadataKey, - pathParams, - fname - ); + const url: string = serverURL.replace(/\/$/, "") + path; + const parsedParameters: Record = {}; - if (requestBodyAnn) return; + const fieldNames: string[] = + "__props__" in pathParams + ? pathParams["__props__"].map((prop: any) => prop.key) + : Object.getOwnPropertyNames(pathParams); + fieldNames.forEach((fname) => { + const requestBodyAnn: string = Reflect.getMetadata(requestMetadataKey, pathParams, fname); - const ppAnn: string = Reflect.getMetadata(ppMetadataKey, pathParams, fname); + if (requestBodyAnn) return; - if (ppAnn == null) return; + const ppAnn: string = Reflect.getMetadata(ppMetadataKey, pathParams, fname); - const ppDecorator: ParamDecorator = parseParamDecorator( - ppAnn, - fname, - "simple", - false - ); - if (ppDecorator == null) return; - - let value = pathParams[fname]; - value = populateFromGlobals(value, fname, "pathParam", globals); - - if (ppDecorator.Serialization) { - switch (ppDecorator.Serialization) { - case "json": - parsedParameters[ppDecorator.ParamName] = encodeURIComponent( - JSON.stringify(value) - ); - break; - } - } else { - switch (ppDecorator.Style) { - case "simple": { - const simpleParams: Map = getSimplePathParams( - ppDecorator.ParamName, - value, - ppDecorator.Explode - ); - simpleParams.forEach((value, key) => { - parsedParameters[key] = value; - }); + if (ppAnn == null) return; + + const ppDecorator: ParamDecorator = parseParamDecorator(ppAnn, fname, "simple", false); + if (ppDecorator == null) return; + + let value = pathParams[fname]; + value = populateFromGlobals(value, fname, "pathParam", globals); + + if (ppDecorator.Serialization) { + switch (ppDecorator.Serialization) { + case "json": + parsedParameters[ppDecorator.ParamName] = encodeURIComponent( + JSON.stringify(value) + ); + break; + } + } else { + switch (ppDecorator.Style) { + case "simple": { + const simpleParams: Map = getSimplePathParams( + ppDecorator.ParamName, + value, + ppDecorator.Explode + ); + simpleParams.forEach((value, key) => { + parsedParameters[key] = value; + }); + } + } } - } - } - }); - return templateUrl(url, parsedParameters); + }); + return templateUrl(url, parsedParameters); } export function parseParamDecorator( - ann: string, - fName: string, - defaultStyle: string, - defaultExplode: boolean + ann: string, + fName: string, + defaultStyle: string, + defaultExplode: boolean ): ParamDecorator { - // style=simple;explode=false;name=apiID - const decorator: ParamDecorator = new ParamDecorator( - defaultStyle, - defaultExplode, - fName.toLowerCase() - ); - - if (ann == null) return decorator; - ann.split(";").forEach((annPart) => { - const [paramKey, paramVal]: string[] = annPart.split("="); - switch (paramKey) { - case "style": - decorator.Style = paramVal; - break; - case "explode": - decorator.Explode = paramVal == "true"; - break; - case "name": - decorator.ParamName = paramVal; - break; - case "serialization": - decorator.Serialization = paramVal; - break; - } - }); - return decorator; + // style=simple;explode=false;name=apiID + const decorator: ParamDecorator = new ParamDecorator( + defaultStyle, + defaultExplode, + fName.toLowerCase() + ); + + if (ann == null) return decorator; + ann.split(";").forEach((annPart) => { + const [paramKey, paramVal]: string[] = annPart.split("="); + switch (paramKey) { + case "style": + decorator.Style = paramVal; + break; + case "explode": + decorator.Explode = paramVal == "true"; + break; + case "name": + decorator.ParamName = paramVal; + break; + case "serialization": + decorator.Serialization = paramVal; + break; + } + }); + return decorator; } export function isStringRecord(obj: any): obj is Record { - if (typeof obj !== "object") return false; + if (typeof obj !== "object") return false; - if (Object.getOwnPropertySymbols(obj).length > 0) return false; + if (Object.getOwnPropertySymbols(obj).length > 0) return false; - return Object.getOwnPropertyNames(obj).every( - (prop) => typeof obj[prop] === "string" - ); + return Object.getOwnPropertyNames(obj).every((prop) => typeof obj[prop] === "string"); } export function isNumberRecord(obj: any): obj is Record { - if (typeof obj !== "object") return false; + if (typeof obj !== "object") return false; - if (Object.getOwnPropertySymbols(obj).length > 0) return false; + if (Object.getOwnPropertySymbols(obj).length > 0) return false; - return Object.getOwnPropertyNames(obj).every( - (prop) => typeof obj[prop] === "number" - ); + return Object.getOwnPropertyNames(obj).every((prop) => typeof obj[prop] === "number"); } export function isBooleanRecord(obj: any): obj is Record { - if (typeof obj !== "object") return false; + if (typeof obj !== "object") return false; - if (Object.getOwnPropertySymbols(obj).length > 0) return false; + if (Object.getOwnPropertySymbols(obj).length > 0) return false; - return Object.getOwnPropertyNames(obj).every( - (prop) => typeof obj[prop] === "boolean" - ); + return Object.getOwnPropertyNames(obj).every((prop) => typeof obj[prop] === "boolean"); } export function isEmpty(value: any): boolean { - // check for undefined, null, and NaN - let res = false; - if (typeof value === "number") res = Number.isNaN(value); - else if (typeof value === "string") res = value === ""; - return res || value == null; + // check for undefined, null, and NaN + let res = false; + if (typeof value === "number") res = Number.isNaN(value); + else if (typeof value === "string") res = value === ""; + return res || value == null; } export function objectToClass(value: T, klass?: any, elemDepth = 0): any { - if (value !== Object(value)) { - return value; - } + if (value !== Object(value)) { + return value; + } - if (elemDepth === 0 && klass != null) { - return plainToInstance(klass, value, { - excludeExtraneousValues: true, - exposeUnsetFields: false, - }) as typeof klass; - } + if (elemDepth === 0 && klass != null) { + return plainToInstance(klass, value, { + excludeExtraneousValues: true, + exposeUnsetFields: false, + }) as typeof klass; + } - if (Array.isArray(value)) { - return value.map((v) => objectToClass(v, klass, elemDepth - 1)); - } + if (Array.isArray(value)) { + return value.map((v) => objectToClass(v, klass, elemDepth - 1)); + } - if (typeof value === "object" && value != null) { - const copiedRecord: Record = {}; - for (const key in value) { - copiedRecord[key] = objectToClass(value[key], klass, elemDepth - 1); + if (typeof value === "object" && value != null) { + const copiedRecord: Record = {}; + for (const key in value) { + copiedRecord[key] = objectToClass(value[key], klass, elemDepth - 1); + } + return copiedRecord; } - return copiedRecord; - } - return plainToInstance(klass, value, { - excludeExtraneousValues: true, - exposeUnsetFields: false, - }) as typeof klass; + return plainToInstance(klass, value, { + excludeExtraneousValues: true, + exposeUnsetFields: false, + }) as typeof klass; } export function getResFieldDepth(res: any): number { - const props = res["__props__"]; - let resFieldDepth = 1; - - if (props) { - for (const prop of props) { - if (res && res.hasOwnProperty(prop.key)) { - if ( - (prop.type.name == "Array" || prop.type.name == "Object") && - isSpeakeasyBase(prop.elemType) - ) { - if (prop.elemDepth > resFieldDepth) { - resFieldDepth = prop.elemDepth; - break; - } + const props = res["__props__"]; + let resFieldDepth = 1; + + if (props) { + for (const prop of props) { + if (res && res.hasOwnProperty(prop.key)) { + if ( + (prop.type.name == "Array" || prop.type.name == "Object") && + isSpeakeasyBase(prop.elemType) + ) { + if (prop.elemDepth > resFieldDepth) { + resFieldDepth = prop.elemDepth; + break; + } + } + } } - } } - } - return resFieldDepth; + return resFieldDepth; } export function populateFromGlobals( - value: any, - fieldName: string, - paramType: string, - globals: any + value: any, + fieldName: string, + paramType: string, + globals: any ): any { - if (globals && value === undefined) { - if ("parameters" in globals && paramType in globals.parameters) { - const globalValue = globals.parameters[paramType][fieldName]; - if (globalValue !== undefined) { - value = globalValue; - } + if (globals && value === undefined) { + if ("parameters" in globals && paramType in globals.parameters) { + const globalValue = globals.parameters[paramType][fieldName]; + if (globalValue !== undefined) { + value = globalValue; + } + } } - } - return value; + return value; } export function valToString(value: any): string { - if (value instanceof Date) { - return value.toISOString(); - } + if (value instanceof Date) { + return value.toISOString(); + } - return value.toString(); + return value.toString(); } export function shouldQueryParamSerialize(value: any): boolean { - return !(value === undefined || value === null || value === "") + return !(value === undefined || value === null || value === ""); } diff --git a/bank-feeds/src/sdk/accountmapping.ts b/bank-feeds/src/sdk/accountmapping.ts old mode 100755 new mode 100644 index 8ba19b15e..dae9e1700 --- a/bank-feeds/src/sdk/accountmapping.ts +++ b/bank-feeds/src/sdk/accountmapping.ts @@ -3,9 +3,9 @@ */ import * as utils from "../internal/utils"; -import * as errors from "./models/errors"; -import * as operations from "./models/operations"; -import * as shared from "./models/shared"; +import * as errors from "../sdk/models/errors"; +import * as operations from "../sdk/models/operations"; +import * as shared from "../sdk/models/shared"; import { SDKConfiguration } from "./sdk"; import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; @@ -45,7 +45,7 @@ export class AccountMapping { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", req @@ -54,7 +54,7 @@ export class AccountMapping { let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; try { - [reqBodyHeaders, reqBody] = utils.serializeRequestBody(req, "requestBody", "json"); + [reqBodyHeaders, reqBody] = utils.serializeRequestBody(req, "zero", "json"); } catch (e: unknown) { if (e instanceof Error) { throw new Error(`Error serializing request body, cause: ${e.message}`); @@ -94,7 +94,7 @@ export class AccountMapping { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", @@ -103,7 +103,7 @@ export class AccountMapping { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -112,35 +112,35 @@ export class AccountMapping { const res: operations.CreateBankAccountMappingResponse = new operations.CreateBankAccountMappingResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.bankFeedAccountMappingResponse = utils.objectToClass( JSON.parse(decodedRes), shared.BankFeedAccountMappingResponse ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [400, 401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -175,7 +175,7 @@ export class AccountMapping { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/bankFeedAccounts/mapping", req @@ -210,7 +210,7 @@ export class AccountMapping { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer", @@ -218,7 +218,7 @@ export class AccountMapping { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -227,35 +227,35 @@ export class AccountMapping { const res: operations.GetBankAccountMappingResponse = new operations.GetBankAccountMappingResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.bankFeedMapping = utils.objectToClass( JSON.parse(decodedRes), shared.BankFeedMapping ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes diff --git a/bank-feeds/src/sdk/companies.ts b/bank-feeds/src/sdk/companies.ts old mode 100755 new mode 100644 index adebaddc8..d99dcefa2 --- a/bank-feeds/src/sdk/companies.ts +++ b/bank-feeds/src/sdk/companies.ts @@ -3,9 +3,9 @@ */ import * as utils from "../internal/utils"; -import * as errors from "./models/errors"; -import * as operations from "./models/operations"; -import * as shared from "./models/shared"; +import * as errors from "../sdk/models/errors"; +import * as operations from "../sdk/models/operations"; +import * as shared from "../sdk/models/shared"; import { SDKConfiguration } from "./sdk"; import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; @@ -43,7 +43,7 @@ export class Companies { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = baseURL.replace(/\/$/, "") + "/companies"; + const operationUrl: string = baseURL.replace(/\/$/, "") + "/companies"; let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; @@ -88,7 +88,7 @@ export class Companies { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", @@ -97,7 +97,7 @@ export class Companies { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -105,32 +105,32 @@ export class Companies { const res: operations.CreateCompanyResponse = new operations.CreateCompanyResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.company = utils.objectToClass(JSON.parse(decodedRes), shared.Company); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [400, 401, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -162,7 +162,7 @@ export class Companies { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL(baseURL, "/companies/{companyId}", req); + const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}", req); const client: AxiosInstance = this.sdkConfiguration.defaultClient; let globalSecurity = this.sdkConfiguration.security; if (typeof globalSecurity === "function") { @@ -193,7 +193,7 @@ export class Companies { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer", @@ -201,7 +201,7 @@ export class Companies { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -209,22 +209,22 @@ export class Companies { const res: operations.DeleteCompanyResponse = new operations.DeleteCompanyResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 204: break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -255,7 +255,7 @@ export class Companies { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL(baseURL, "/companies/{companyId}", req); + const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}", req); const client: AxiosInstance = this.sdkConfiguration.defaultClient; let globalSecurity = this.sdkConfiguration.security; if (typeof globalSecurity === "function") { @@ -286,7 +286,7 @@ export class Companies { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer", @@ -294,7 +294,7 @@ export class Companies { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -302,32 +302,32 @@ export class Companies { const res: operations.GetCompanyResponse = new operations.GetCompanyResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.company = utils.objectToClass(JSON.parse(decodedRes), shared.Company); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -358,7 +358,7 @@ export class Companies { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = baseURL.replace(/\/$/, "") + "/companies"; + const operationUrl: string = baseURL.replace(/\/$/, "") + "/companies"; const client: AxiosInstance = this.sdkConfiguration.defaultClient; let globalSecurity = this.sdkConfiguration.security; if (typeof globalSecurity === "function") { @@ -390,7 +390,7 @@ export class Companies { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url + queryParams, + url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer", @@ -398,7 +398,7 @@ export class Companies { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -406,32 +406,32 @@ export class Companies { const res: operations.ListCompaniesResponse = new operations.ListCompaniesResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.companies = utils.objectToClass(JSON.parse(decodedRes), shared.Companies); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [400, 401, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -462,7 +462,7 @@ export class Companies { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL(baseURL, "/companies/{companyId}", req); + const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}", req); let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; @@ -511,7 +511,7 @@ export class Companies { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", @@ -520,7 +520,7 @@ export class Companies { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -528,32 +528,32 @@ export class Companies { const res: operations.UpdateCompanyResponse = new operations.UpdateCompanyResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.company = utils.objectToClass(JSON.parse(decodedRes), shared.Company); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes diff --git a/bank-feeds/src/sdk/connections.ts b/bank-feeds/src/sdk/connections.ts old mode 100755 new mode 100644 index 991cf9287..08cd96fc5 --- a/bank-feeds/src/sdk/connections.ts +++ b/bank-feeds/src/sdk/connections.ts @@ -3,9 +3,9 @@ */ import * as utils from "../internal/utils"; -import * as errors from "./models/errors"; -import * as operations from "./models/operations"; -import * as shared from "./models/shared"; +import * as errors from "../sdk/models/errors"; +import * as operations from "../sdk/models/operations"; +import * as shared from "../sdk/models/shared"; import { SDKConfiguration } from "./sdk"; import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; @@ -41,7 +41,11 @@ export class Connections { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL(baseURL, "/companies/{companyId}/connections", req); + const operationUrl: string = utils.generateURL( + baseURL, + "/companies/{companyId}/connections", + req + ); let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; @@ -86,7 +90,7 @@ export class Connections { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", @@ -95,7 +99,7 @@ export class Connections { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -103,32 +107,32 @@ export class Connections { const res: operations.CreateConnectionResponse = new operations.CreateConnectionResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.connection = utils.objectToClass(JSON.parse(decodedRes), shared.Connection); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -160,7 +164,7 @@ export class Connections { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}", req @@ -195,7 +199,7 @@ export class Connections { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer", @@ -203,7 +207,7 @@ export class Connections { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -211,22 +215,22 @@ export class Connections { const res: operations.DeleteConnectionResponse = new operations.DeleteConnectionResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -257,7 +261,7 @@ export class Connections { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}", req @@ -292,7 +296,7 @@ export class Connections { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer", @@ -300,7 +304,7 @@ export class Connections { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -308,32 +312,32 @@ export class Connections { const res: operations.GetConnectionResponse = new operations.GetConnectionResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.connection = utils.objectToClass(JSON.parse(decodedRes), shared.Connection); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -364,7 +368,11 @@ export class Connections { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL(baseURL, "/companies/{companyId}/connections", req); + const operationUrl: string = utils.generateURL( + baseURL, + "/companies/{companyId}/connections", + req + ); const client: AxiosInstance = this.sdkConfiguration.defaultClient; let globalSecurity = this.sdkConfiguration.security; if (typeof globalSecurity === "function") { @@ -396,7 +404,7 @@ export class Connections { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url + queryParams, + url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer", @@ -404,7 +412,7 @@ export class Connections { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -412,35 +420,35 @@ export class Connections { const res: operations.ListConnectionsResponse = new operations.ListConnectionsResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.connections = utils.objectToClass( JSON.parse(decodedRes), shared.Connections ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [400, 401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -471,7 +479,7 @@ export class Connections { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}", req @@ -520,7 +528,7 @@ export class Connections { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", @@ -529,7 +537,7 @@ export class Connections { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -537,32 +545,32 @@ export class Connections { const res: operations.UnlinkConnectionResponse = new operations.UnlinkConnectionResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.connection = utils.objectToClass(JSON.parse(decodedRes), shared.Connection); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes diff --git a/bank-feeds/src/sdk/index.ts b/bank-feeds/src/sdk/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/errors/index.ts b/bank-feeds/src/sdk/models/errors/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/errors/sdkerror.ts b/bank-feeds/src/sdk/models/errors/sdkerror.ts old mode 100755 new mode 100644 index 0d6987286..f12b6e29a --- a/bank-feeds/src/sdk/models/errors/sdkerror.ts +++ b/bank-feeds/src/sdk/models/errors/sdkerror.ts @@ -13,7 +13,7 @@ export class SDKError extends Error { message: string, statusCode: number, body: string, - rawResponse: AxiosResponse + rawResponse: AxiosResponse, ) { let bodyString = ""; if (body?.length > 0) { diff --git a/bank-feeds/src/sdk/models/operations/createbankaccountmapping.ts b/bank-feeds/src/sdk/models/operations/createbankaccountmapping.ts old mode 100755 new mode 100644 index 7ad70a80c..1937231fd --- a/bank-feeds/src/sdk/models/operations/createbankaccountmapping.ts +++ b/bank-feeds/src/sdk/models/operations/createbankaccountmapping.ts @@ -3,59 +3,12 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; -import { Expose } from "class-transformer"; - -/** - * A bank feed connection between a source account and a target account. - */ -export class CreateBankAccountMappingBankFeedAccountMapping extends SpeakeasyBase { - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00:00` - * - UTC time offsets: `2021-11-15T01:00:00-05:00` - * - * > Time zones - * > - * > Not all dates from Codat will contain information about time zones. - * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - */ - @SpeakeasyMetadata() - @Expose({ name: "feedStartDate" }) - feedStartDate?: string; - - /** - * Unique ID for the source account - */ - @SpeakeasyMetadata() - @Expose({ name: "sourceAccountId" }) - sourceAccountId?: string; - - /** - * Unique ID for the target account - */ - @SpeakeasyMetadata() - @Expose({ name: "targetAccountId" }) - targetAccountId?: string; -} export class CreateBankAccountMappingRequest extends SpeakeasyBase { @SpeakeasyMetadata({ data: "request, media_type=application/json" }) - requestBody?: CreateBankAccountMappingBankFeedAccountMapping; + zero?: shared.Zero; /** * Unique identifier for a company. @@ -99,5 +52,5 @@ export class CreateBankAccountMappingResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/createbanktransactions.ts b/bank-feeds/src/sdk/models/operations/createbanktransactions.ts old mode 100755 new mode 100644 index d49d492f1..ccb7b8b60 --- a/bank-feeds/src/sdk/models/operations/createbanktransactions.ts +++ b/bank-feeds/src/sdk/models/operations/createbanktransactions.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class CreateBankTransactionsRequest extends SpeakeasyBase { @@ -55,7 +55,7 @@ export class CreateBankTransactionsResponse extends SpeakeasyBase { createBankTransactionsResponse?: shared.CreateBankTransactionsResponse; /** - * Your API request was not properly authorized. + * The request made is not valid. */ @SpeakeasyMetadata() errorMessage?: shared.ErrorMessage; @@ -70,5 +70,5 @@ export class CreateBankTransactionsResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/createcompany.ts b/bank-feeds/src/sdk/models/operations/createcompany.ts old mode 100755 new mode 100644 index a71d72551..74b819f4c --- a/bank-feeds/src/sdk/models/operations/createcompany.ts +++ b/bank-feeds/src/sdk/models/operations/createcompany.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class CreateCompanyResponse extends SpeakeasyBase { @@ -35,5 +35,5 @@ export class CreateCompanyResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/createconnection.ts b/bank-feeds/src/sdk/models/operations/createconnection.ts old mode 100755 new mode 100644 index 404244f82..8b8baf146 --- a/bank-feeds/src/sdk/models/operations/createconnection.ts +++ b/bank-feeds/src/sdk/models/operations/createconnection.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; import { Expose } from "class-transformer"; @@ -56,5 +56,5 @@ export class CreateConnectionResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/createsourceaccount.ts b/bank-feeds/src/sdk/models/operations/createsourceaccount.ts old mode 100755 new mode 100644 index b19849f4f..1344626b3 --- a/bank-feeds/src/sdk/models/operations/createsourceaccount.ts +++ b/bank-feeds/src/sdk/models/operations/createsourceaccount.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class CreateSourceAccountRequest extends SpeakeasyBase { @@ -52,5 +52,5 @@ export class CreateSourceAccountResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/deletebankfeedcredentials.ts b/bank-feeds/src/sdk/models/operations/deletebankfeedcredentials.ts old mode 100755 new mode 100644 index 613402304..62c428107 --- a/bank-feeds/src/sdk/models/operations/deletebankfeedcredentials.ts +++ b/bank-feeds/src/sdk/models/operations/deletebankfeedcredentials.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class DeleteBankFeedCredentialsRequest extends SpeakeasyBase { @@ -43,5 +43,5 @@ export class DeleteBankFeedCredentialsResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/deletecompany.ts b/bank-feeds/src/sdk/models/operations/deletecompany.ts old mode 100755 new mode 100644 index f52a5d714..4ded139e9 --- a/bank-feeds/src/sdk/models/operations/deletecompany.ts +++ b/bank-feeds/src/sdk/models/operations/deletecompany.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class DeleteCompanyRequest extends SpeakeasyBase { @@ -37,5 +37,5 @@ export class DeleteCompanyResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/deleteconnection.ts b/bank-feeds/src/sdk/models/operations/deleteconnection.ts old mode 100755 new mode 100644 index 255051c8b..32528870a --- a/bank-feeds/src/sdk/models/operations/deleteconnection.ts +++ b/bank-feeds/src/sdk/models/operations/deleteconnection.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class DeleteConnectionRequest extends SpeakeasyBase { @@ -43,5 +43,5 @@ export class DeleteConnectionResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/deletesourceaccount.ts b/bank-feeds/src/sdk/models/operations/deletesourceaccount.ts old mode 100755 new mode 100644 index 919efeea8..47fd76bf9 --- a/bank-feeds/src/sdk/models/operations/deletesourceaccount.ts +++ b/bank-feeds/src/sdk/models/operations/deletesourceaccount.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class DeleteSourceAccountRequest extends SpeakeasyBase { @@ -49,5 +49,5 @@ export class DeleteSourceAccountResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/generatecredentials.ts b/bank-feeds/src/sdk/models/operations/generatecredentials.ts old mode 100755 new mode 100644 index 01519429d..8812d9122 --- a/bank-feeds/src/sdk/models/operations/generatecredentials.ts +++ b/bank-feeds/src/sdk/models/operations/generatecredentials.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class GenerateCredentialsRequest extends SpeakeasyBase { @@ -52,5 +52,5 @@ export class GenerateCredentialsResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/getbankaccountmapping.ts b/bank-feeds/src/sdk/models/operations/getbankaccountmapping.ts old mode 100755 new mode 100644 index 55a9056a6..d19b02898 --- a/bank-feeds/src/sdk/models/operations/getbankaccountmapping.ts +++ b/bank-feeds/src/sdk/models/operations/getbankaccountmapping.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class GetBankAccountMappingRequest extends SpeakeasyBase { @@ -49,5 +49,5 @@ export class GetBankAccountMappingResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/getcompany.ts b/bank-feeds/src/sdk/models/operations/getcompany.ts old mode 100755 new mode 100644 index 94a2c71c7..facf51b5a --- a/bank-feeds/src/sdk/models/operations/getcompany.ts +++ b/bank-feeds/src/sdk/models/operations/getcompany.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class GetCompanyRequest extends SpeakeasyBase { @@ -43,5 +43,5 @@ export class GetCompanyResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/getconnection.ts b/bank-feeds/src/sdk/models/operations/getconnection.ts old mode 100755 new mode 100644 index 9c447b2cd..be017c8dd --- a/bank-feeds/src/sdk/models/operations/getconnection.ts +++ b/bank-feeds/src/sdk/models/operations/getconnection.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class GetConnectionRequest extends SpeakeasyBase { @@ -49,5 +49,5 @@ export class GetConnectionResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/getcreateoperation.ts b/bank-feeds/src/sdk/models/operations/getcreateoperation.ts old mode 100755 new mode 100644 index a9f918c2f..85db0fe92 --- a/bank-feeds/src/sdk/models/operations/getcreateoperation.ts +++ b/bank-feeds/src/sdk/models/operations/getcreateoperation.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class GetCreateOperationRequest extends SpeakeasyBase { @@ -49,5 +49,5 @@ export class GetCreateOperationResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/index.ts b/bank-feeds/src/sdk/models/operations/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/operations/listcompanies.ts b/bank-feeds/src/sdk/models/operations/listcompanies.ts old mode 100755 new mode 100644 index 36de793b8..0f76bf55e --- a/bank-feeds/src/sdk/models/operations/listcompanies.ts +++ b/bank-feeds/src/sdk/models/operations/listcompanies.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class ListCompaniesRequest extends SpeakeasyBase { @@ -61,5 +61,5 @@ export class ListCompaniesResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/listconnections.ts b/bank-feeds/src/sdk/models/operations/listconnections.ts old mode 100755 new mode 100644 index 0eb222eae..f2b232473 --- a/bank-feeds/src/sdk/models/operations/listconnections.ts +++ b/bank-feeds/src/sdk/models/operations/listconnections.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class ListConnectionsRequest extends SpeakeasyBase { @@ -67,5 +67,5 @@ export class ListConnectionsResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/listcreateoperations.ts b/bank-feeds/src/sdk/models/operations/listcreateoperations.ts old mode 100755 new mode 100644 index af1321f7e..4a5a0f14d --- a/bank-feeds/src/sdk/models/operations/listcreateoperations.ts +++ b/bank-feeds/src/sdk/models/operations/listcreateoperations.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class ListCreateOperationsRequest extends SpeakeasyBase { @@ -67,5 +67,5 @@ export class ListCreateOperationsResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/listsourceaccounts.ts b/bank-feeds/src/sdk/models/operations/listsourceaccounts.ts old mode 100755 new mode 100644 index 15644de36..bf6298fd4 --- a/bank-feeds/src/sdk/models/operations/listsourceaccounts.ts +++ b/bank-feeds/src/sdk/models/operations/listsourceaccounts.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class ListSourceAccountsRequest extends SpeakeasyBase { @@ -49,5 +49,5 @@ export class ListSourceAccountsResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/unlinkconnection.ts b/bank-feeds/src/sdk/models/operations/unlinkconnection.ts old mode 100755 new mode 100644 index 4d2a7cde1..1af9d0459 --- a/bank-feeds/src/sdk/models/operations/unlinkconnection.ts +++ b/bank-feeds/src/sdk/models/operations/unlinkconnection.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; import { Expose } from "class-transformer"; @@ -62,5 +62,5 @@ export class UnlinkConnectionResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/updatecompany.ts b/bank-feeds/src/sdk/models/operations/updatecompany.ts old mode 100755 new mode 100644 index 6138b03ef..5e9c5b28e --- a/bank-feeds/src/sdk/models/operations/updatecompany.ts +++ b/bank-feeds/src/sdk/models/operations/updatecompany.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class UpdateCompanyRequest extends SpeakeasyBase { @@ -46,5 +46,5 @@ export class UpdateCompanyResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/operations/updatesourceaccount.ts b/bank-feeds/src/sdk/models/operations/updatesourceaccount.ts old mode 100755 new mode 100644 index 48a380ef8..febd93da0 --- a/bank-feeds/src/sdk/models/operations/updatesourceaccount.ts +++ b/bank-feeds/src/sdk/models/operations/updatesourceaccount.ts @@ -3,7 +3,7 @@ */ import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../shared"; +import * as shared from "../../../sdk/models/shared"; import { AxiosResponse } from "axios"; export class UpdateSourceAccountRequest extends SpeakeasyBase { @@ -37,7 +37,7 @@ export class UpdateSourceAccountResponse extends SpeakeasyBase { contentType: string; /** - * Your API request was not properly authorized. + * The request made is not valid. */ @SpeakeasyMetadata() errorMessage?: shared.ErrorMessage; @@ -58,5 +58,5 @@ export class UpdateSourceAccountResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/shared/bankaccountcredentials.ts b/bank-feeds/src/sdk/models/shared/bankaccountcredentials.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/bankfeedaccountmappingresponse.ts b/bank-feeds/src/sdk/models/shared/bankfeedaccountmappingresponse.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/bankfeedmapping.ts b/bank-feeds/src/sdk/models/shared/bankfeedmapping.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/banktransactions.ts b/bank-feeds/src/sdk/models/shared/banktransactions.ts old mode 100755 new mode 100644 index 8ec9bca7f..331aa183b --- a/bank-feeds/src/sdk/models/shared/banktransactions.ts +++ b/bank-feeds/src/sdk/models/shared/banktransactions.ts @@ -8,7 +8,7 @@ import { Expose } from "class-transformer"; /** * Type of transaction for the bank statement line. */ -export enum BankTransactionsBankTransactionType { +export enum BankTransactionType { Unknown = "Unknown", Credit = "Credit", Debit = "Debit", @@ -111,5 +111,5 @@ export class BankTransactions extends SpeakeasyBase { */ @SpeakeasyMetadata() @Expose({ name: "transactionType" }) - transactionType?: BankTransactionsBankTransactionType; + transactionType?: BankTransactionType; } diff --git a/bank-feeds/src/sdk/models/shared/clientratelimitreachedwebhook.ts b/bank-feeds/src/sdk/models/shared/clientratelimitreachedwebhook.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts b/bank-feeds/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/clientratelimitresetwebhook.ts b/bank-feeds/src/sdk/models/shared/clientratelimitresetwebhook.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/clientratelimitresetwebhookdata.ts b/bank-feeds/src/sdk/models/shared/clientratelimitresetwebhookdata.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/companies.ts b/bank-feeds/src/sdk/models/shared/companies.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/company.ts b/bank-feeds/src/sdk/models/shared/company.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/companyrequestbody.ts b/bank-feeds/src/sdk/models/shared/companyrequestbody.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/connection.ts b/bank-feeds/src/sdk/models/shared/connection.ts old mode 100755 new mode 100644 index 935213b12..db68b8902 --- a/bank-feeds/src/sdk/models/shared/connection.ts +++ b/bank-feeds/src/sdk/models/shared/connection.ts @@ -10,7 +10,7 @@ import { Expose, Type } from "class-transformer"; /** * The type of platform of the connection. */ -export enum ConnectionSourceType { +export enum SourceType { Accounting = "Accounting", Banking = "Banking", Commerce = "Commerce", @@ -147,7 +147,7 @@ export class Connection extends SpeakeasyBase { */ @SpeakeasyMetadata() @Expose({ name: "sourceType" }) - sourceType: ConnectionSourceType; + sourceType: SourceType; /** * The current authorization status of the data connection. diff --git a/bank-feeds/src/sdk/models/shared/connections.ts b/bank-feeds/src/sdk/models/shared/connections.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/createbanktransactions.ts b/bank-feeds/src/sdk/models/shared/createbanktransactions.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/createbanktransactionsresponse.ts b/bank-feeds/src/sdk/models/shared/createbanktransactionsresponse.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/dataconnectionerror.ts b/bank-feeds/src/sdk/models/shared/dataconnectionerror.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/dataconnectionstatus.ts b/bank-feeds/src/sdk/models/shared/dataconnectionstatus.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/datatype.ts b/bank-feeds/src/sdk/models/shared/datatype.ts old mode 100755 new mode 100644 index a3bff9dd2..bc1e94283 --- a/bank-feeds/src/sdk/models/shared/datatype.ts +++ b/bank-feeds/src/sdk/models/shared/datatype.ts @@ -21,6 +21,7 @@ export enum DataType { DirectCosts = "directCosts", DirectIncomes = "directIncomes", Invoices = "invoices", + ItemReceipts = "itemReceipts", Items = "items", JournalEntries = "journalEntries", Journals = "journals", diff --git a/bank-feeds/src/sdk/models/shared/errormessage.ts b/bank-feeds/src/sdk/models/shared/errormessage.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/halref.ts b/bank-feeds/src/sdk/models/shared/halref.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/index.ts b/bank-feeds/src/sdk/models/shared/index.ts old mode 100755 new mode 100644 index 95b5a08cc..5ae5b70d3 --- a/bank-feeds/src/sdk/models/shared/index.ts +++ b/bank-feeds/src/sdk/models/shared/index.ts @@ -34,3 +34,4 @@ export * from "./sourceaccount"; export * from "./targetaccountoption"; export * from "./validation"; export * from "./validationitem"; +export * from "./zero"; diff --git a/bank-feeds/src/sdk/models/shared/links.ts b/bank-feeds/src/sdk/models/shared/links.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/pushchangetype.ts b/bank-feeds/src/sdk/models/shared/pushchangetype.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/pushoperation.ts b/bank-feeds/src/sdk/models/shared/pushoperation.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/pushoperationchange.ts b/bank-feeds/src/sdk/models/shared/pushoperationchange.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/pushoperationref.ts b/bank-feeds/src/sdk/models/shared/pushoperationref.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/pushoperations.ts b/bank-feeds/src/sdk/models/shared/pushoperations.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/pushoperationstatus.ts b/bank-feeds/src/sdk/models/shared/pushoperationstatus.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/security.ts b/bank-feeds/src/sdk/models/shared/security.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/sourceaccount.ts b/bank-feeds/src/sdk/models/shared/sourceaccount.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/targetaccountoption.ts b/bank-feeds/src/sdk/models/shared/targetaccountoption.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/validation.ts b/bank-feeds/src/sdk/models/shared/validation.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/validationitem.ts b/bank-feeds/src/sdk/models/shared/validationitem.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/models/shared/zero.ts b/bank-feeds/src/sdk/models/shared/zero.ts new file mode 100644 index 000000000..7eb5076da --- /dev/null +++ b/bank-feeds/src/sdk/models/shared/zero.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; +import { Expose } from "class-transformer"; + +/** + * A bank feed connection between a source account and a target account. + */ +export class Zero extends SpeakeasyBase { + /** + * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + * + * @remarks + * + * ``` + * 2020-10-08T22:40:50Z + * 2021-01-01T00:00:00 + * ``` + * + * + * + * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + * + * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + * - Unqualified local time: `2021-11-15T01:00:00` + * - UTC time offsets: `2021-11-15T01:00:00-05:00` + * + * > Time zones + * > + * > Not all dates from Codat will contain information about time zones. + * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. + */ + @SpeakeasyMetadata() + @Expose({ name: "feedStartDate" }) + feedStartDate?: string; + + /** + * Unique ID for the source account + */ + @SpeakeasyMetadata() + @Expose({ name: "sourceAccountId" }) + sourceAccountId?: string; + + /** + * Unique ID for the target account + */ + @SpeakeasyMetadata() + @Expose({ name: "targetAccountId" }) + targetAccountId?: string; +} diff --git a/bank-feeds/src/sdk/models/webhooks/clientratelimitreached.ts b/bank-feeds/src/sdk/models/webhooks/clientratelimitreached.ts old mode 100755 new mode 100644 index 2e2db92fc..46150bb19 --- a/bank-feeds/src/sdk/models/webhooks/clientratelimitreached.ts +++ b/bank-feeds/src/sdk/models/webhooks/clientratelimitreached.ts @@ -22,5 +22,5 @@ export class ClientRateLimitReachedResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/webhooks/clientratelimitreset.ts b/bank-feeds/src/sdk/models/webhooks/clientratelimitreset.ts old mode 100755 new mode 100644 index a128e2d24..bbb9f9830 --- a/bank-feeds/src/sdk/models/webhooks/clientratelimitreset.ts +++ b/bank-feeds/src/sdk/models/webhooks/clientratelimitreset.ts @@ -22,5 +22,5 @@ export class ClientRateLimitResetResponse extends SpeakeasyBase { * Raw HTTP response; suitable for custom response parsing */ @SpeakeasyMetadata() - rawResponse?: AxiosResponse; + rawResponse: AxiosResponse; } diff --git a/bank-feeds/src/sdk/models/webhooks/index.ts b/bank-feeds/src/sdk/models/webhooks/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/sdk.ts b/bank-feeds/src/sdk/sdk.ts old mode 100755 new mode 100644 index e593e31c4..313fa6ef2 --- a/bank-feeds/src/sdk/sdk.ts +++ b/bank-feeds/src/sdk/sdk.ts @@ -3,10 +3,10 @@ */ import * as utils from "../internal/utils"; +import * as shared from "../sdk/models/shared"; import { AccountMapping } from "./accountmapping"; import { Companies } from "./companies"; import { Connections } from "./connections"; -import * as shared from "./models/shared"; import { SourceAccounts } from "./sourceaccounts"; import { Transactions } from "./transactions"; import axios from "axios"; @@ -58,9 +58,9 @@ export class SDKConfiguration { serverDefaults: any; language = "typescript"; openapiDocVersion = "3.0.0"; - sdkVersion = "2.2.0"; - genVersion = "2.159.2"; - userAgent = "speakeasy-sdk/typescript 2.2.0 2.159.2 3.0.0 @codat/bank-feeds"; + sdkVersion = "3.0.0"; + genVersion = "2.195.2"; + userAgent = "speakeasy-sdk/typescript 3.0.0 2.195.2 3.0.0 @codat/bank-feeds"; retryConfig?: utils.RetryConfig; public constructor(init?: Partial) { Object.assign(this, init); @@ -89,10 +89,6 @@ export class SDKConfiguration { * | Account mapping | Extra functionality for building an account management UI | */ export class CodatBankFeeds { - /** - * Bank feed bank account mapping. - */ - public accountMapping: AccountMapping; /** * Create and manage your Codat companies. */ @@ -101,6 +97,10 @@ export class CodatBankFeeds { * Manage your companies' data connections. */ public connections: Connections; + /** + * Bank feed bank account mapping. + */ + public accountMapping: AccountMapping; /** * Source accounts act as a bridge to bank accounts in accounting software. */ @@ -120,7 +120,7 @@ export class CodatBankFeeds { serverURL = ServerList[serverIdx]; } - const defaultClient = props?.defaultClient ?? axios.create({ baseURL: serverURL }); + const defaultClient = props?.defaultClient ?? axios.create(); this.sdkConfiguration = new SDKConfiguration({ defaultClient: defaultClient, security: props?.security, @@ -128,9 +128,9 @@ export class CodatBankFeeds { retryConfig: props?.retryConfig, }); - this.accountMapping = new AccountMapping(this.sdkConfiguration); this.companies = new Companies(this.sdkConfiguration); this.connections = new Connections(this.sdkConfiguration); + this.accountMapping = new AccountMapping(this.sdkConfiguration); this.sourceAccounts = new SourceAccounts(this.sdkConfiguration); this.transactions = new Transactions(this.sdkConfiguration); } diff --git a/bank-feeds/src/sdk/sourceaccounts.ts b/bank-feeds/src/sdk/sourceaccounts.ts old mode 100755 new mode 100644 index 4a1150eef..75a6e6365 --- a/bank-feeds/src/sdk/sourceaccounts.ts +++ b/bank-feeds/src/sdk/sourceaccounts.ts @@ -3,9 +3,9 @@ */ import * as utils from "../internal/utils"; -import * as errors from "./models/errors"; -import * as operations from "./models/operations"; -import * as shared from "./models/shared"; +import * as errors from "../sdk/models/errors"; +import * as operations from "../sdk/models/operations"; +import * as shared from "../sdk/models/shared"; import { SDKConfiguration } from "./sdk"; import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; @@ -59,7 +59,7 @@ export class SourceAccounts { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts", req @@ -108,7 +108,7 @@ export class SourceAccounts { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", @@ -117,7 +117,7 @@ export class SourceAccounts { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -126,35 +126,35 @@ export class SourceAccounts { const res: operations.CreateSourceAccountResponse = new operations.CreateSourceAccountResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.sourceAccount = utils.objectToClass( JSON.parse(decodedRes), shared.SourceAccount ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [400, 401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -188,7 +188,7 @@ export class SourceAccounts { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}", req @@ -223,7 +223,7 @@ export class SourceAccounts { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer", @@ -231,7 +231,7 @@ export class SourceAccounts { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -240,22 +240,22 @@ export class SourceAccounts { const res: operations.DeleteSourceAccountResponse = new operations.DeleteSourceAccountResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 204: break; - case [401, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -288,7 +288,7 @@ export class SourceAccounts { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials", req @@ -323,7 +323,7 @@ export class SourceAccounts { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer", @@ -331,7 +331,7 @@ export class SourceAccounts { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -340,22 +340,22 @@ export class SourceAccounts { const res: operations.DeleteBankFeedCredentialsResponse = new operations.DeleteBankFeedCredentialsResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 204: break; - case [401, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -389,7 +389,7 @@ export class SourceAccounts { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/credentials", req @@ -439,7 +439,7 @@ export class SourceAccounts { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", @@ -448,7 +448,7 @@ export class SourceAccounts { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -457,35 +457,35 @@ export class SourceAccounts { const res: operations.GenerateCredentialsResponse = new operations.GenerateCredentialsResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.bankAccountCredentials = utils.objectToClass( JSON.parse(decodedRes), shared.BankAccountCredentials ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -519,7 +519,7 @@ export class SourceAccounts { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts", req @@ -554,7 +554,7 @@ export class SourceAccounts { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer", @@ -562,7 +562,7 @@ export class SourceAccounts { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -571,35 +571,35 @@ export class SourceAccounts { const res: operations.ListSourceAccountsResponse = new operations.ListSourceAccountsResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.sourceAccount = utils.objectToClass( JSON.parse(decodedRes), shared.SourceAccount ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -631,7 +631,7 @@ export class SourceAccounts { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/connectionInfo/bankFeedAccounts/{accountId}", req @@ -680,7 +680,7 @@ export class SourceAccounts { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", @@ -689,7 +689,7 @@ export class SourceAccounts { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -698,35 +698,35 @@ export class SourceAccounts { const res: operations.UpdateSourceAccountResponse = new operations.UpdateSourceAccountResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.sourceAccount = utils.objectToClass( JSON.parse(decodedRes), shared.SourceAccount ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes diff --git a/bank-feeds/src/sdk/transactions.ts b/bank-feeds/src/sdk/transactions.ts old mode 100755 new mode 100644 index be065bcff..16691a7d2 --- a/bank-feeds/src/sdk/transactions.ts +++ b/bank-feeds/src/sdk/transactions.ts @@ -3,9 +3,9 @@ */ import * as utils from "../internal/utils"; -import * as errors from "./models/errors"; -import * as operations from "./models/operations"; -import * as shared from "./models/shared"; +import * as errors from "../sdk/models/errors"; +import * as operations from "../sdk/models/operations"; +import * as shared from "../sdk/models/shared"; import { SDKConfiguration } from "./sdk"; import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; @@ -48,7 +48,7 @@ export class Transactions { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/connections/{connectionId}/push/bankAccounts/{accountId}/bankTransactions", req @@ -102,7 +102,7 @@ export class Transactions { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url + queryParams, + url: operationUrl + queryParams, method: "post", headers: headers, responseType: "arraybuffer", @@ -111,7 +111,7 @@ export class Transactions { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -120,35 +120,35 @@ export class Transactions { const res: operations.CreateBankTransactionsResponse = new operations.CreateBankTransactionsResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.createBankTransactionsResponse = utils.objectToClass( JSON.parse(decodedRes), shared.CreateBankTransactionsResponse ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -179,7 +179,7 @@ export class Transactions { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL( + const operationUrl: string = utils.generateURL( baseURL, "/companies/{companyId}/push/{pushOperationKey}", req @@ -214,7 +214,7 @@ export class Transactions { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url, + url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer", @@ -222,7 +222,7 @@ export class Transactions { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -231,35 +231,35 @@ export class Transactions { const res: operations.GetCreateOperationResponse = new operations.GetCreateOperationResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.pushOperation = utils.objectToClass( JSON.parse(decodedRes), shared.PushOperation ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes @@ -290,7 +290,7 @@ export class Transactions { this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const url: string = utils.generateURL(baseURL, "/companies/{companyId}/push", req); + const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}/push", req); const client: AxiosInstance = this.sdkConfiguration.defaultClient; let globalSecurity = this.sdkConfiguration.security; if (typeof globalSecurity === "function") { @@ -322,7 +322,7 @@ export class Transactions { const httpRes: AxiosResponse = await utils.Retry(() => { return client.request({ validateStatus: () => true, - url: url + queryParams, + url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer", @@ -330,7 +330,7 @@ export class Transactions { }); }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - const contentType: string = httpRes?.headers?.["content-type"] ?? ""; + const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; if (httpRes?.status == null) { throw new Error(`status code not found in response: ${httpRes}`); @@ -339,35 +339,35 @@ export class Transactions { const res: operations.ListCreateOperationsResponse = new operations.ListCreateOperationsResponse({ statusCode: httpRes.status, - contentType: contentType, + contentType: responseContentType, rawResponse: httpRes, }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: - if (utils.matchContentType(contentType, `application/json`)) { + if (utils.matchContentType(responseContentType, `application/json`)) { res.pushOperations = utils.objectToClass( JSON.parse(decodedRes), shared.PushOperations ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes ); } break; - case [400, 401, 404, 429].includes(httpRes?.status): - if (utils.matchContentType(contentType, `application/json`)) { + case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): + if (utils.matchContentType(responseContentType, `application/json`)) { res.errorMessage = utils.objectToClass( JSON.parse(decodedRes), shared.ErrorMessage ); } else { throw new errors.SDKError( - "unknown content-type received: " + contentType, + "unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes diff --git a/bank-feeds/src/sdk/types/index.ts b/bank-feeds/src/sdk/types/index.ts old mode 100755 new mode 100644 diff --git a/bank-feeds/src/sdk/types/rfcdate.ts b/bank-feeds/src/sdk/types/rfcdate.ts old mode 100755 new mode 100644 index 903ac7da6..f423fd4a4 --- a/bank-feeds/src/sdk/types/rfcdate.ts +++ b/bank-feeds/src/sdk/types/rfcdate.ts @@ -5,7 +5,7 @@ export class RFCDate { private date: Date; - constructor(date: Date | {date:string} | string | undefined) { + constructor(date: Date | { date: string } | string | undefined) { if (!date) { this.date = new Date(); return; @@ -16,11 +16,11 @@ export class RFCDate { return; } if (date instanceof Date) { - this.date = date as Date + this.date = date as Date; return; } - const anyDate = (date as any); + const anyDate = date as any; if (date && !!anyDate.date) { this.date = new Date(anyDate.date); } diff --git a/bank-feeds/tsconfig.json b/bank-feeds/tsconfig.json old mode 100755 new mode 100644