UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

422 lines (421 loc) 24.5 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 { V4AirtableCommentNotificationsCreateNotificationBodyDtoToJSON, V4AirtableCommentNotificationsCreateNotificationResponseDtoFromJSON, V4AirtableCommentNotificationsDeleteNotificationResponseDtoFromJSON, V4AirtableCommentNotificationsGetNotificationColumnsResponseDtoFromJSON, V4AirtableCommentNotificationsGetNotificationResponseDtoFromJSON, V4AirtableCommentNotificationsGetNotificationsFilteredByResponseDtoFromJSON, V4AirtableCommentNotificationsGetNotificationsInViewResponseDtoFromJSON, V4AirtableCommentNotificationsGetNotificationsResponseDtoFromJSON, V4AirtableCommentNotificationsMarkAllNotificationsReadResponseDtoFromJSON, V4AirtableCommentNotificationsMarkNotificationReadResponseDtoFromJSON, V4AirtableCommentNotificationsUpdateNotificationBodyDtoToJSON, V4AirtableCommentNotificationsUpdateNotificationResponseDtoFromJSON, } from '../models/index'; /** * */ export class AirtableCommentNotificationsAPIV4Api extends runtime.BaseAPI { /** * Creates a new notification for the authenticated user * Create a new notification */ async v4AirtableCommentNotificationsControllerCreateNotificationV4Raw(requestParameters, initOverrides) { if (requestParameters['v4AirtableCommentNotificationsCreateNotificationBodyDto'] == null) { throw new runtime.RequiredError('v4AirtableCommentNotificationsCreateNotificationBodyDto', 'Required parameter "v4AirtableCommentNotificationsCreateNotificationBodyDto" was null or undefined when calling v4AirtableCommentNotificationsControllerCreateNotificationV4().'); } 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-notifications`; const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: V4AirtableCommentNotificationsCreateNotificationBodyDtoToJSON(requestParameters['v4AirtableCommentNotificationsCreateNotificationBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsCreateNotificationResponseDtoFromJSON(jsonValue)); } /** * Creates a new notification for the authenticated user * Create a new notification */ async v4AirtableCommentNotificationsControllerCreateNotificationV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerCreateNotificationV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Deletes a notification by its ID * Delete a specific notification */ async v4AirtableCommentNotificationsControllerDeleteNotificationV4Raw(requestParameters, initOverrides) { if (requestParameters['notificationId'] == null) { throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling v4AirtableCommentNotificationsControllerDeleteNotificationV4().'); } 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-notifications/{notificationId}`; urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId']))); const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsDeleteNotificationResponseDtoFromJSON(jsonValue)); } /** * Deletes a notification by its ID * Delete a specific notification */ async v4AirtableCommentNotificationsControllerDeleteNotificationV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerDeleteNotificationV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves specific columns of a notification by its ID * Get specific columns of a notification */ async v4AirtableCommentNotificationsControllerGetNotificationColumnsV4Raw(requestParameters, initOverrides) { if (requestParameters['notificationId'] == null) { throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling v4AirtableCommentNotificationsControllerGetNotificationColumnsV4().'); } if (requestParameters['columns'] == null) { throw new runtime.RequiredError('columns', 'Required parameter "columns" was null or undefined when calling v4AirtableCommentNotificationsControllerGetNotificationColumnsV4().'); } 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-notifications/{notificationId}/{columns}`; urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId']))); 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) => V4AirtableCommentNotificationsGetNotificationColumnsResponseDtoFromJSON(jsonValue)); } /** * Retrieves specific columns of a notification by its ID * Get specific columns of a notification */ async v4AirtableCommentNotificationsControllerGetNotificationColumnsV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerGetNotificationColumnsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves a single notification by its ID * Get a specific notification by ID */ async v4AirtableCommentNotificationsControllerGetNotificationV4Raw(requestParameters, initOverrides) { if (requestParameters['notificationId'] == null) { throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling v4AirtableCommentNotificationsControllerGetNotificationV4().'); } 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-notifications/{notificationId}`; urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsGetNotificationResponseDtoFromJSON(jsonValue)); } /** * Retrieves a single notification by its ID * Get a specific notification by ID */ async v4AirtableCommentNotificationsControllerGetNotificationV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerGetNotificationV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves notifications filtered by a column with support for different filter operations * Get notifications filtered by a specific column and value */ async v4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4Raw(requestParameters, initOverrides) { if (requestParameters['column'] == null) { throw new runtime.RequiredError('column', 'Required parameter "column" was null or undefined when calling v4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4().'); } if (requestParameters['value'] == null) { throw new runtime.RequiredError('value', 'Required parameter "value" was null or undefined when calling v4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4().'); } 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-notifications/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) => V4AirtableCommentNotificationsGetNotificationsFilteredByResponseDtoFromJSON(jsonValue)); } /** * Retrieves notifications filtered by a column with support for different filter operations * Get notifications filtered by a specific column and value */ async v4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves notifications using a specific view configuration * Get notifications with a specific viewId */ async v4AirtableCommentNotificationsControllerGetNotificationsInViewV4Raw(requestParameters, initOverrides) { if (requestParameters['viewId'] == null) { throw new runtime.RequiredError('viewId', 'Required parameter "viewId" was null or undefined when calling v4AirtableCommentNotificationsControllerGetNotificationsInViewV4().'); } 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-notifications/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) => V4AirtableCommentNotificationsGetNotificationsInViewResponseDtoFromJSON(jsonValue)); } /** * Retrieves notifications using a specific view configuration * Get notifications with a specific viewId */ async v4AirtableCommentNotificationsControllerGetNotificationsInViewV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerGetNotificationsInViewV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Retrieves notifications for the authenticated user with support for views, pagination, and filtering * Get notifications with optional viewId */ async v4AirtableCommentNotificationsControllerGetNotificationsV4Raw(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-notifications`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsGetNotificationsResponseDtoFromJSON(jsonValue)); } /** * Retrieves notifications for the authenticated user with support for views, pagination, and filtering * Get notifications with optional viewId */ async v4AirtableCommentNotificationsControllerGetNotificationsV4(requestParameters = {}, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerGetNotificationsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Marks all notifications as read for the authenticated user * Mark all notifications as read */ async v4AirtableCommentNotificationsControllerMarkAllNotificationsAsReadV4Raw(initOverrides) { 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-notifications/read-all`; const response = await this.request({ path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsMarkAllNotificationsReadResponseDtoFromJSON(jsonValue)); } /** * Marks all notifications as read for the authenticated user * Mark all notifications as read */ async v4AirtableCommentNotificationsControllerMarkAllNotificationsAsReadV4(initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerMarkAllNotificationsAsReadV4Raw(initOverrides); return await response.value(); } /** * Marks a specific notification as read for the authenticated user * Mark a notification as read */ async v4AirtableCommentNotificationsControllerMarkNotificationAsReadV4Raw(requestParameters, initOverrides) { if (requestParameters['notificationId'] == null) { throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling v4AirtableCommentNotificationsControllerMarkNotificationAsReadV4().'); } 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-notifications/{notificationId}/read`; urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId']))); const response = await this.request({ path: urlPath, method: 'PUT', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsMarkNotificationReadResponseDtoFromJSON(jsonValue)); } /** * Marks a specific notification as read for the authenticated user * Mark a notification as read */ async v4AirtableCommentNotificationsControllerMarkNotificationAsReadV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerMarkNotificationAsReadV4Raw(requestParameters, initOverrides); return await response.value(); } /** * Updates a notification by its ID * Update a specific notification */ async v4AirtableCommentNotificationsControllerUpdateNotificationV4Raw(requestParameters, initOverrides) { if (requestParameters['notificationId'] == null) { throw new runtime.RequiredError('notificationId', 'Required parameter "notificationId" was null or undefined when calling v4AirtableCommentNotificationsControllerUpdateNotificationV4().'); } if (requestParameters['v4AirtableCommentNotificationsUpdateNotificationBodyDto'] == null) { throw new runtime.RequiredError('v4AirtableCommentNotificationsUpdateNotificationBodyDto', 'Required parameter "v4AirtableCommentNotificationsUpdateNotificationBodyDto" was null or undefined when calling v4AirtableCommentNotificationsControllerUpdateNotificationV4().'); } 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-notifications/{notificationId}`; urlPath = urlPath.replace(`{${"notificationId"}}`, encodeURIComponent(String(requestParameters['notificationId']))); const response = await this.request({ path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: V4AirtableCommentNotificationsUpdateNotificationBodyDtoToJSON(requestParameters['v4AirtableCommentNotificationsUpdateNotificationBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4AirtableCommentNotificationsUpdateNotificationResponseDtoFromJSON(jsonValue)); } /** * Updates a notification by its ID * Update a specific notification */ async v4AirtableCommentNotificationsControllerUpdateNotificationV4(requestParameters, initOverrides) { const response = await this.v4AirtableCommentNotificationsControllerUpdateNotificationV4Raw(requestParameters, initOverrides); return await response.value(); } } /** * @export * @enum {string} */ export var V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation; (function (V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation) { V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation["Contains"] = "contains"; V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation["DoesNotContain"] = "does not contain"; V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation["Is"] = "is"; V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation["IsNot"] = "is not"; V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation["IsAnyOf"] = "is any of"; V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation["IsNoneOf"] = "is none of"; })(V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation || (V4AirtableCommentNotificationsControllerGetNotificationsFilteredByV4FilterOperation = {}));