Skip to content

Commit

Permalink
Merge pull request #164 from apideck-libraries/generator-update
Browse files Browse the repository at this point in the history
Automated update by SDK Generator
  • Loading branch information
nicklloyd authored Feb 23, 2024
2 parents ecfc511 + d23920f commit 7c03a95
Show file tree
Hide file tree
Showing 642 changed files with 939 additions and 651 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@apideck/node",
"version": "3.2.0",
"version": "3.2.1",
"description": "Apideck Node.js SDK",
"keywords": [
"apideck",
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/AccountingApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/AtsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/ConnectorApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/CrmApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/EcommerceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/FileStorageApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/HrisApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/IssueTrackingApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/LeadApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/PosApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/SmsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
80 changes: 79 additions & 1 deletion src/gen/apis/VaultApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -99,6 +99,14 @@ export interface VaultApiConnectionsOneRequest {
appId?: string
}

export interface VaultApiConnectionsTokenRequest {
serviceId: string
unifiedApi: string
consumerId?: string
appId?: string
body?: object
}

export interface VaultApiConnectionsUpdateRequest {
serviceId: string
unifiedApi: string
Expand Down Expand Up @@ -594,6 +602,76 @@ export class VaultApi extends runtime.BaseAPI {
return await response.value()
}

/**
* Triggers exchanging persisted connection credentials for an access token and store it in Vault. Currently supported for connections with the `client_credentials` or `password` OAuth grant type. Note: - Do not include any credentials in the request body. This operation does not persist changes, but only triggers the exchange of persisted connection credentials for an access token. - The access token will not be returned in the response. A 200 response code indicates the authorization was successful and that a valid access token was stored on the connection. - The access token will be used for subsequent API requests.
* Authorize Access Token
*/
async connectionsTokenRaw(
requestParameters: VaultApiConnectionsTokenRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GetConnectionResponse>> {
if (requestParameters.serviceId === null || requestParameters.serviceId === undefined) {
throw new runtime.RequiredError(
'serviceId',
'Required parameter requestParameters.serviceId was null or undefined when calling connectionsToken.'
)
}

if (requestParameters.unifiedApi === null || requestParameters.unifiedApi === undefined) {
throw new runtime.RequiredError(
'unifiedApi',
'Required parameter requestParameters.unifiedApi was null or undefined when calling connectionsToken.'
)
}

const queryParameters: any = {}

const headerParameters: runtime.HTTPHeaders = {}

headerParameters['Content-Type'] = 'application/json'

if (requestParameters.consumerId !== undefined && requestParameters.consumerId !== null) {
headerParameters['x-apideck-consumer-id'] = String(requestParameters.consumerId)
}

if (requestParameters.appId !== undefined && requestParameters.appId !== null) {
headerParameters['x-apideck-app-id'] = String(requestParameters.appId)
}

if (this.configuration && this.configuration.apiKey) {
headerParameters['Authorization'] = this.configuration.apiKey('Authorization') // apiKey authentication
}

const response = await this.request(
{
path: `/vault/connections/{unified_api}/{service_id}/token`
.replace(`{${'service_id'}}`, encodeURIComponent(String(requestParameters.serviceId)))
.replace(`{${'unified_api'}}`, encodeURIComponent(String(requestParameters.unifiedApi))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.body as any
},
initOverrides
)

return new runtime.JSONApiResponse(response, jsonValue =>
GetConnectionResponseFromJSON(jsonValue)
)
}

/**
* Triggers exchanging persisted connection credentials for an access token and store it in Vault. Currently supported for connections with the `client_credentials` or `password` OAuth grant type. Note: - Do not include any credentials in the request body. This operation does not persist changes, but only triggers the exchange of persisted connection credentials for an access token. - The access token will not be returned in the response. A 200 response code indicates the authorization was successful and that a valid access token was stored on the connection. - The access token will be used for subsequent API requests.
* Authorize Access Token
*/
async connectionsToken(
requestParameters: VaultApiConnectionsTokenRequest,
initOverrides?: RequestInit
): Promise<GetConnectionResponse> {
const response = await this.connectionsTokenRaw(requestParameters, initOverrides)
return await response.value()
}

/**
* Update a connection
* Update connection
Expand Down
2 changes: 1 addition & 1 deletion src/gen/apis/WebhookApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
72 changes: 72 additions & 0 deletions src/gen/docs/apis/VaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [Deletes A Connection](#connectionsDelete)
* [Import Connection](#connectionsImport)
* [Get Connection](#connectionsOne)
* [Authorize Access Token](#connectionsToken)
* [Update Connection](#connectionsUpdate)
* [Consumer Request Counts](#consumerRequestCountsAll)
* [Create Consumer](#consumersAdd)
Expand Down Expand Up @@ -484,6 +485,77 @@ try {
```


[[Back to top]](#) [[Back to API list]](../../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../../README.md)

<a name="connectionsToken"></a>
# Authorize Access Token


Method: **connectionsToken**

```typescript
vaultApi.connectionsToken(body)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **object**| |
**serviceId** | [**string**] | Service ID of the resource to return |
**unifiedApi** | [**string**] | Unified API |
**consumerId** | [**string**] | ID of the consumer which you want to get or push data from | (optional)
**appId** | [**string**] | The ID of your Unify application | (optional)



### Response Type

[`GetConnectionResponse`](../models/GetConnectionResponse.md)



### HTTP response details
| Status code | Description |
|-------------|-------------|
**200** | Connection |
**400** | Bad Request |
**401** | Unauthorized |
**402** | Payment Required |
**404** | The specified resource was not found |
**422** | Unprocessable |
4/5xx | Unexpected error |


## Example Usage

```typescript
import { Apideck } from '@apideck/node';

const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
});

const params = {
serviceId: 'pipedrive',
unifiedApi: 'crm',
connectionsToken: {}
}

try {
const { data } = await apideck.vault.connectionsToken(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
return error.json()
}


```


[[Back to top]](#) [[Back to API list]](../../../../README.md#documentation-for-api-endpoints) [[Back to README]](../../../../README.md)

<a name="connectionsUpdate"></a>
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/AccountingDepartment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/AccountingDepartmentsFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/AccountingEventType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/AccountingLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/AccountingLocationsFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/ActivitiesFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/ActivitiesSort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/Activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/ActivityAttendee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion src/gen/models/Address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.3.1
* The version of the OpenAPI document: 10.3.3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit 7c03a95

Please sign in to comment.