UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

374 lines (373 loc) 22.3 kB
/* tslint:disable */ /* eslint-disable */ /** * API v4 * Swagger documentation for API v4 * * The version of the OpenAPI document: 4.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import { V4AirtableCommentSubscriptionsCreateSubscriptionBodyDtoToJSON, V4AirtableCommentSubscriptionsCreateSubscriptionResponseDtoFromJSON, V4AirtableCommentSubscriptionsDeleteSubscriptionResponseDtoFromJSON, V4AirtableCommentSubscriptionsGetSubscriptionColumnsResponseDtoFromJSON, V4AirtableCommentSubscriptionsGetSubscriptionResponseDtoFromJSON, V4AirtableCommentSubscriptionsGetSubscriptionsFilteredByResponseDtoFromJSON, V4AirtableCommentSubscriptionsGetSubscriptionsInViewResponseDtoFromJSON, V4AirtableCommentSubscriptionsGetSubscriptionsResponseDtoFromJSON, V4AirtableCommentSubscriptionsUpdateSubscriptionBodyDtoToJSON, V4AirtableCommentSubscriptionsUpdateSubscriptionResponseDtoFromJSON, } from '../models/index'; /** * */ export class AirtableCommentSubscriptionsAPIV4Api extends runtime.BaseAPI { /** * Creates a new subscription for the authenticated user * Create a new subscription */ async v4AirtableCommentSubscriptionsControllerCreateSubscriptionV4Raw(requestParameters, initOverrides) { if (requestParameters['v4AirtableCommentSubscriptionsCreateSubscriptionBodyDto'] == null) { throw new runtime.RequiredError('v4AirtableCommentSubscriptionsCreateSubscriptionBodyDto', 'Required parameter "v4AirtableCommentSubscriptionsCreateSubscriptionBodyDto" was null or undefined when calling v4AirtableCommentSubscriptionsControllerCreateSubscriptionV4().'); } const queryParameters = {}; const headerParameters = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions`; const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: V4AirtableCommentSubscriptionsCreateSubscriptionBodyDtoToJSON(requestParameters['v4AirtableCommentSubscriptionsCreateSubscriptionBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsCreateSubscriptionResponseDtoFromJSON(jsonValue)); } /** * Creates a new subscription for the authenticated user * Create a new subscription */ async v4AirtableCommentSubscriptionsControllerCreateSubscriptionV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerCreateSubscriptionV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Deletes a subscription by composite key * Delete a specific subscription */ async v4AirtableCommentSubscriptionsControllerDeleteSubscriptionV4Raw(requestParameters, initOverrides) { if (requestParameters['tableId'] == null) { throw new runtime.RequiredError('tableId', 'Required parameter "tableId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerDeleteSubscriptionV4().'); } if (requestParameters['recordId'] == null) { throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerDeleteSubscriptionV4().'); } const queryParameters = {}; const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions/{tableId}/{recordId}`; urlPath = urlPath.replace(`{${"tableId"}}`, encodeURIComponent(String(requestParameters['tableId']))); urlPath = urlPath.replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))); const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsDeleteSubscriptionResponseDtoFromJSON(jsonValue)); } /** * Deletes a subscription by composite key * Delete a specific subscription */ async v4AirtableCommentSubscriptionsControllerDeleteSubscriptionV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerDeleteSubscriptionV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves specific columns of a subscription by composite key * Get specific columns of a subscription */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionColumnsV4Raw(requestParameters, initOverrides) { if (requestParameters['tableId'] == null) { throw new runtime.RequiredError('tableId', 'Required parameter "tableId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionColumnsV4().'); } if (requestParameters['recordId'] == null) { throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionColumnsV4().'); } if (requestParameters['columns'] == null) { throw new runtime.RequiredError('columns', 'Required parameter "columns" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionColumnsV4().'); } const queryParameters = {}; const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions/{tableId}/{recordId}/columns/{columns}`; urlPath = urlPath.replace(`{${"tableId"}}`, encodeURIComponent(String(requestParameters['tableId']))); urlPath = urlPath.replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))); urlPath = urlPath.replace(`{${"columns"}}`, encodeURIComponent(String(requestParameters['columns']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsGetSubscriptionColumnsResponseDtoFromJSON(jsonValue)); } /** * Retrieves specific columns of a subscription by composite key * Get specific columns of a subscription */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionColumnsV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerGetSubscriptionColumnsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves a single subscription by table and record IDs * Get a specific subscription by composite key */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionV4Raw(requestParameters, initOverrides) { if (requestParameters['tableId'] == null) { throw new runtime.RequiredError('tableId', 'Required parameter "tableId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionV4().'); } if (requestParameters['recordId'] == null) { throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionV4().'); } const queryParameters = {}; if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions/{tableId}/{recordId}`; urlPath = urlPath.replace(`{${"tableId"}}`, encodeURIComponent(String(requestParameters['tableId']))); urlPath = urlPath.replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsGetSubscriptionResponseDtoFromJSON(jsonValue)); } /** * Retrieves a single subscription by table and record IDs * Get a specific subscription by composite key */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerGetSubscriptionV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves subscriptions filtered by a column with support for different filter operations * Get subscriptions filtered by a specific column and value */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4Raw(requestParameters, initOverrides) { if (requestParameters['column'] == null) { throw new runtime.RequiredError('column', 'Required parameter "column" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4().'); } if (requestParameters['value'] == null) { throw new runtime.RequiredError('value', 'Required parameter "value" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4().'); } const queryParameters = {}; if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } if (requestParameters['filterOperation'] != null) { queryParameters['filterOperation'] = requestParameters['filterOperation']; } if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } if (requestParameters['columns'] != null) { queryParameters['columns'] = requestParameters['columns']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions/filteredBy/{column}/{value}`; urlPath = urlPath.replace(`{${"column"}}`, encodeURIComponent(String(requestParameters['column']))); urlPath = urlPath.replace(`{${"value"}}`, encodeURIComponent(String(requestParameters['value']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsGetSubscriptionsFilteredByResponseDtoFromJSON(jsonValue)); } /** * Retrieves subscriptions filtered by a column with support for different filter operations * Get subscriptions filtered by a specific column and value */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves subscriptions using a specific view configuration * Get subscriptions with a specific viewId */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionsInViewV4Raw(requestParameters, initOverrides) { if (requestParameters['viewId'] == null) { throw new runtime.RequiredError('viewId', 'Required parameter "viewId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerGetSubscriptionsInViewV4().'); } const queryParameters = {}; if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions/viewId/{viewId}`; urlPath = urlPath.replace(`{${"viewId"}}`, encodeURIComponent(String(requestParameters['viewId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsGetSubscriptionsInViewResponseDtoFromJSON(jsonValue)); } /** * Retrieves subscriptions using a specific view configuration * Get subscriptions with a specific viewId */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionsInViewV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerGetSubscriptionsInViewV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves subscriptions for the authenticated user with support for views, pagination, and filtering * Get subscriptions with optional viewId */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionsV4Raw(requestParameters, initOverrides) { const queryParameters = {}; if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsGetSubscriptionsResponseDtoFromJSON(jsonValue)); } /** * Retrieves subscriptions for the authenticated user with support for views, pagination, and filtering * Get subscriptions with optional viewId */ async v4AirtableCommentSubscriptionsControllerGetSubscriptionsV4(requestParameters = {}, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerGetSubscriptionsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Updates a subscription by composite key * Update a specific subscription */ async v4AirtableCommentSubscriptionsControllerUpdateSubscriptionV4Raw(requestParameters, initOverrides) { if (requestParameters['tableId'] == null) { throw new runtime.RequiredError('tableId', 'Required parameter "tableId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerUpdateSubscriptionV4().'); } if (requestParameters['recordId'] == null) { throw new runtime.RequiredError('recordId', 'Required parameter "recordId" was null or undefined when calling v4AirtableCommentSubscriptionsControllerUpdateSubscriptionV4().'); } if (requestParameters['v4AirtableCommentSubscriptionsUpdateSubscriptionBodyDto'] == null) { throw new runtime.RequiredError('v4AirtableCommentSubscriptionsUpdateSubscriptionBodyDto', 'Required parameter "v4AirtableCommentSubscriptionsUpdateSubscriptionBodyDto" was null or undefined when calling v4AirtableCommentSubscriptionsControllerUpdateSubscriptionV4().'); } const queryParameters = {}; const headerParameters = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/airtable-comment-subscriptions/{tableId}/{recordId}`; urlPath = urlPath.replace(`{${"tableId"}}`, encodeURIComponent(String(requestParameters['tableId']))); urlPath = urlPath.replace(`{${"recordId"}}`, encodeURIComponent(String(requestParameters['recordId']))); const response = await this.request({ path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: V4AirtableCommentSubscriptionsUpdateSubscriptionBodyDtoToJSON(requestParameters['v4AirtableCommentSubscriptionsUpdateSubscriptionBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentSubscriptionsUpdateSubscriptionResponseDtoFromJSON(jsonValue)); } /** * Updates a subscription by composite key * Update a specific subscription */ async v4AirtableCommentSubscriptionsControllerUpdateSubscriptionV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentSubscriptionsControllerUpdateSubscriptionV4Raw(requestParameters, initOverrides); return await response.value(); } } /** * @export * @enum {string} */ export var V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation; (function (V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation) { V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation["Contains"] = "contains"; V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation["DoesNotContain"] = "does not contain"; V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation["Is"] = "is"; V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation["IsNot"] = "is not"; V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation["IsAnyOf"] = "is any of"; V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation["IsNoneOf"] = "is none of"; })(V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation || (V4AirtableCommentSubscriptionsControllerGetSubscriptionsFilteredByV4FilterOperation = {}));