diff --git a/generated-sources/api/.openapi-generator/FILES b/generated-sources/api/.openapi-generator/FILES index f787b78bb..efb7654be 100644 --- a/generated-sources/api/.openapi-generator/FILES +++ b/generated-sources/api/.openapi-generator/FILES @@ -88,11 +88,8 @@ src/models/CreateOrgRequest.ts src/models/CreateProjectRequest.ts src/models/CreateProviderAppRequest.ts src/models/CreateRevisionRequest.ts -src/models/CreateTargetRequest.ts -src/models/CreateTargetRequestMetadata.ts src/models/CreateTopicDestinationRouteRequest.ts src/models/CreateTopicRequest.ts -src/models/CreateTopicTargetRouteRequest.ts src/models/CustomAuthHeader.ts src/models/CustomAuthInput.ts src/models/CustomAuthOpts.ts @@ -106,7 +103,10 @@ src/models/DestinationMetadata.ts src/models/DestinationSecrets.ts src/models/DynamicMappingsInputEntry.ts src/models/DynamicMappingsInputMappedValue.ts +src/models/FieldChangedEvent.ts +src/models/FieldCreatedEvent.ts src/models/FieldDefinition.ts +src/models/FieldDeletedEvent.ts src/models/FieldMetadata.ts src/models/FieldSetting.ts src/models/FieldSettingDefault.ts @@ -139,6 +139,7 @@ src/models/IntegrationSubscribeObject.ts src/models/IntegrationWrite.ts src/models/IntegrationWriteObject.ts src/models/Invite.ts +src/models/JSONPatchOperation.ts src/models/JWTKey.ts src/models/JWTKeyResponse.ts src/models/ListOperations200Response.ts @@ -151,9 +152,6 @@ src/models/MetadataItemInput.ts src/models/MetadataItemPostAuthentication.ts src/models/ModuleInfo.ts src/models/NotificationEventTopicRoute.ts -src/models/NotificationTarget.ts -src/models/NotificationTargetMetadata.ts -src/models/NotificationTopicTargetRoute.ts src/models/NumericFieldOptions.ts src/models/Oauth2AuthorizationCode.ts src/models/Oauth2AuthorizationCodeAccessToken.ts @@ -172,6 +170,10 @@ src/models/PatchApiKeyRequest.ts src/models/PatchApiKeyRequestApiKey.ts src/models/PatchJWTKeyRequest.ts src/models/PatchJWTKeyRequestJwtKey.ts +src/models/PatchObjectConfigContentRequest.ts +src/models/PatchObjectConfigContentRequestAllOf.ts +src/models/PatchObjectConfigContentRequestAllOfOneOf.ts +src/models/PatchObjectConfigContentRequestAllOfOneOf1.ts src/models/Problem.ts src/models/Project.ts src/models/ProjectEntitlements.ts @@ -213,8 +215,6 @@ src/models/UpdateProjectRequest.ts src/models/UpdateProjectRequestProject.ts src/models/UpdateProviderAppRequest.ts src/models/UpdateProviderAppRequestProviderApp.ts -src/models/UpdateTargetRequest.ts -src/models/UpdateTargetRequestTarget.ts src/models/UpdateTopicRequest.ts src/models/UpsertMetadataRequest.ts src/models/UpsertMetadataResponse.ts @@ -223,6 +223,8 @@ src/models/ValueDefaultBoolean.ts src/models/ValueDefaultInteger.ts src/models/ValueDefaultString.ts src/models/ValueDefaults.ts +src/models/WatchSchema.ts +src/models/WatchSchemaAllObjects.ts src/models/WriteConfig.ts src/models/WriteConfigAllOf.ts src/models/WriteConfigObject.ts diff --git a/generated-sources/api/src/apis/InstallationApi.ts b/generated-sources/api/src/apis/InstallationApi.ts index 2bf8dcd53..b04ead360 100644 --- a/generated-sources/api/src/apis/InstallationApi.ts +++ b/generated-sources/api/src/apis/InstallationApi.ts @@ -19,6 +19,7 @@ import type { CreateInstallationRequest, InputValidationProblem, Installation, + PatchObjectConfigContentRequest, UpdateInstallationRequest, } from '../models'; import { @@ -30,6 +31,8 @@ import { InputValidationProblemToJSON, InstallationFromJSON, InstallationToJSON, + PatchObjectConfigContentRequestFromJSON, + PatchObjectConfigContentRequestToJSON, UpdateInstallationRequestFromJSON, UpdateInstallationRequestToJSON, } from '../models'; @@ -63,6 +66,13 @@ export interface ListInstallationsForProjectRequest { groupRef?: string; } +export interface PatchObjectConfigContentOperationRequest { + projectIdOrName: string; + integrationId: string; + objectName: string; + patchObjectConfigContent: PatchObjectConfigContentRequest; +} + export interface UpdateInstallationOperationRequest { projectIdOrName: string; integrationId: string; @@ -162,6 +172,25 @@ export interface InstallationApiInterface { */ listInstallationsForProject(requestParameters: ListInstallationsForProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + /** + * Updates a single object\'s configuration within an installation using JSON Patch syntax. + * @summary Update an installation object + * @param {string} projectIdOrName The Ampersand project ID or project name. + * @param {string} integrationId The integration ID. + * @param {string} objectName The object name whose config content will be patched. Must match an object name defined in the integration\'s manifest for the specified action type (read, subscribe, or write). Common examples include: `account`, `contact`, `lead`, `opportunity` (for Salesforce), `deal`, `company` (for HubSpot), etc. + * @param {PatchObjectConfigContentRequest} patchObjectConfigContent + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstallationApiInterface + */ + patchObjectConfigContentRaw(requestParameters: PatchObjectConfigContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Updates a single object\'s configuration within an installation using JSON Patch syntax. + * Update an installation object + */ + patchObjectConfigContent(requestParameters: PatchObjectConfigContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** * NOTE: Updating an installation with the Subscribe action typically takes 1–2 minutes, but it may take up to 10 minutes to take effect due to delays in the provider’s system. * @summary Update an installation @@ -438,6 +467,65 @@ export class InstallationApi extends runtime.BaseAPI implements InstallationApiI return await response.value(); } + /** + * Updates a single object\'s configuration within an installation using JSON Patch syntax. + * Update an installation object + */ + async patchObjectConfigContentRaw(requestParameters: PatchObjectConfigContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { + throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling patchObjectConfigContent.'); + } + + if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) { + throw new runtime.RequiredError('integrationId','Required parameter requestParameters.integrationId was null or undefined when calling patchObjectConfigContent.'); + } + + if (requestParameters.objectName === null || requestParameters.objectName === undefined) { + throw new runtime.RequiredError('objectName','Required parameter requestParameters.objectName was null or undefined when calling patchObjectConfigContent.'); + } + + if (requestParameters.patchObjectConfigContent === null || requestParameters.patchObjectConfigContent === undefined) { + throw new runtime.RequiredError('patchObjectConfigContent','Required parameter requestParameters.patchObjectConfigContent was null or undefined when calling patchObjectConfigContent.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("Bearer", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/projects/{projectIdOrName}/integrations/{integrationId}/objects/{objectName}/config-content`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))).replace(`{${"objectName"}}`, encodeURIComponent(String(requestParameters.objectName))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: PatchObjectConfigContentRequestToJSON(requestParameters.patchObjectConfigContent), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => InstallationFromJSON(jsonValue)); + } + + /** + * Updates a single object\'s configuration within an installation using JSON Patch syntax. + * Update an installation object + */ + async patchObjectConfigContent(requestParameters: PatchObjectConfigContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.patchObjectConfigContentRaw(requestParameters, initOverrides); + return await response.value(); + } + /** * NOTE: Updating an installation with the Subscribe action typically takes 1–2 minutes, but it may take up to 10 minutes to take effect due to delays in the provider’s system. * Update an installation diff --git a/generated-sources/api/src/apis/IntegrationApi.ts b/generated-sources/api/src/apis/IntegrationApi.ts index 6f5013120..e2928dc67 100644 --- a/generated-sources/api/src/apis/IntegrationApi.ts +++ b/generated-sources/api/src/apis/IntegrationApi.ts @@ -67,7 +67,7 @@ export interface ListIntegrationsRequest { */ export interface IntegrationApiInterface { /** - * + * This endpoint is used by the Ampersand CLI to batch upsert integrations. We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly. * @summary Batch upsert a group of integrations * @param {string} projectIdOrName The Ampersand project ID or project name. * @param {BatchUpsertIntegrationsRequest} batchUpsertIntegrationsRequest @@ -79,6 +79,7 @@ export interface IntegrationApiInterface { batchUpsertIntegrationsRaw(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** + * This endpoint is used by the Ampersand CLI to batch upsert integrations. We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly. * Batch upsert a group of integrations */ batchUpsertIntegrations(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; @@ -100,7 +101,7 @@ export interface IntegrationApiInterface { createIntegration(requestParameters: CreateIntegrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** - * + * Delete an integration and all its installations. * @summary Delete an integration * @param {string} projectIdOrName The Ampersand project ID or project name. * @param {string} integrationId The integration ID. @@ -111,6 +112,7 @@ export interface IntegrationApiInterface { deleteIntegrationRaw(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** + * Delete an integration and all its installations. * Delete an integration */ deleteIntegration(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; @@ -154,6 +156,7 @@ export interface IntegrationApiInterface { export class IntegrationApi extends runtime.BaseAPI implements IntegrationApiInterface { /** + * This endpoint is used by the Ampersand CLI to batch upsert integrations. We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly. * Batch upsert a group of integrations */ async batchUpsertIntegrationsRaw(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -199,6 +202,7 @@ export class IntegrationApi extends runtime.BaseAPI implements IntegrationApiInt } /** + * This endpoint is used by the Ampersand CLI to batch upsert integrations. We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly. * Batch upsert a group of integrations */ async batchUpsertIntegrations(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -255,6 +259,7 @@ export class IntegrationApi extends runtime.BaseAPI implements IntegrationApiInt } /** + * Delete an integration and all its installations. * Delete an integration */ async deleteIntegrationRaw(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -293,6 +298,7 @@ export class IntegrationApi extends runtime.BaseAPI implements IntegrationApiInt } /** + * Delete an integration and all its installations. * Delete an integration */ async deleteIntegration(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/generated-sources/api/src/apis/NotificationApi.ts b/generated-sources/api/src/apis/NotificationApi.ts index ab9a4fa02..e663fc032 100644 --- a/generated-sources/api/src/apis/NotificationApi.ts +++ b/generated-sources/api/src/apis/NotificationApi.ts @@ -17,33 +17,18 @@ import * as runtime from '../runtime'; import type { ApiProblem, CreateEventTopicRouteRequest, - CreateTargetRequest, - CreateTopicTargetRouteRequest, InputValidationProblem, NotificationEventTopicRoute, - NotificationTarget, - NotificationTopicTargetRoute, - UpdateTargetRequest, } from '../models'; import { ApiProblemFromJSON, ApiProblemToJSON, CreateEventTopicRouteRequestFromJSON, CreateEventTopicRouteRequestToJSON, - CreateTargetRequestFromJSON, - CreateTargetRequestToJSON, - CreateTopicTargetRouteRequestFromJSON, - CreateTopicTargetRouteRequestToJSON, InputValidationProblemFromJSON, InputValidationProblemToJSON, NotificationEventTopicRouteFromJSON, NotificationEventTopicRouteToJSON, - NotificationTargetFromJSON, - NotificationTargetToJSON, - NotificationTopicTargetRouteFromJSON, - NotificationTopicTargetRouteToJSON, - UpdateTargetRequestFromJSON, - UpdateTargetRequestToJSON, } from '../models'; export interface CreateEventTopicRouteOperationRequest { @@ -51,58 +36,17 @@ export interface CreateEventTopicRouteOperationRequest { eventTopicRoute: CreateEventTopicRouteRequest; } -export interface CreateTargetOperationRequest { - projectIdOrName: string; - target: CreateTargetRequest; -} - -export interface CreateTopicTargetRouteOperationRequest { - projectIdOrName: string; - topicTargetRoute: CreateTopicTargetRouteRequest; -} - export interface DeleteEventTopicRouteRequest { projectIdOrName: string; routeId: string; } -export interface DeleteTargetRequest { - projectIdOrName: string; - targetId: string; -} - -export interface DeleteTopicTargetRouteRequest { - projectIdOrName: string; - routeId: string; -} - -export interface GetTargetByIdRequest { - projectIdOrName: string; - targetId: string; -} - export interface ListEventTopicRoutesRequest { projectIdOrName: string; topicId?: string; eventType?: ListEventTopicRoutesEventTypeEnum; } -export interface ListTargetsRequest { - projectIdOrName: string; -} - -export interface ListTopicTargetRoutesRequest { - projectIdOrName: string; - topicId?: string; - targetId?: string; -} - -export interface UpdateTargetOperationRequest { - projectIdOrName: string; - targetId: string; - updateTargetRequest: UpdateTargetRequest; -} - /** * NotificationApi - interface * @@ -126,38 +70,6 @@ export interface NotificationApiInterface { */ createEventTopicRoute(requestParameters: CreateEventTopicRouteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - /** - * - * @summary Create a notification target - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {CreateTargetRequest} target - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - createTargetRaw(requestParameters: CreateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a notification target - */ - createTarget(requestParameters: CreateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Create a notification topic-target route - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {CreateTopicTargetRouteRequest} topicTargetRoute - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - createTopicTargetRouteRaw(requestParameters: CreateTopicTargetRouteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Create a notification topic-target route - */ - createTopicTargetRoute(requestParameters: CreateTopicTargetRouteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - /** * * @summary Delete a notification event-topic route @@ -174,60 +86,12 @@ export interface NotificationApiInterface { */ deleteEventTopicRoute(requestParameters: DeleteEventTopicRouteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - /** - * - * @summary Delete a notification target - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {string} targetId The notification target ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - deleteTargetRaw(requestParameters: DeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Delete a notification target - */ - deleteTarget(requestParameters: DeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Delete a notification topic-target route - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {string} routeId The topic-target route ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - deleteTopicTargetRouteRaw(requestParameters: DeleteTopicTargetRouteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Delete a notification topic-target route - */ - deleteTopicTargetRoute(requestParameters: DeleteTopicTargetRouteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - - /** - * - * @summary Get a notification target - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {string} targetId The notification target ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - getTargetByIdRaw(requestParameters: GetTargetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Get a notification target - */ - getTargetById(requestParameters: GetTargetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - /** * * @summary List notification event-topic routes * @param {string} projectIdOrName The Ampersand project ID or project name. * @param {string} [topicId] Filter by topic ID. - * @param {'read.backfill.done' | 'connection.created' | 'installation.created' | 'installation.updated' | 'installation.deleted' | 'read.schedule.paused'} [eventType] Filter by notification event type. + * @param {'read.backfill.done' | 'connection.created' | 'connection.error' | 'installation.created' | 'installation.updated' | 'installation.deleted' | 'read.schedule.paused' | 'destination.webhook.disabled'} [eventType] Filter by notification event type. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NotificationApiInterface @@ -239,55 +103,6 @@ export interface NotificationApiInterface { */ listEventTopicRoutes(requestParameters: ListEventTopicRoutesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - /** - * - * @summary List notification targets - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - listTargetsRaw(requestParameters: ListTargetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; - - /** - * List notification targets - */ - listTargets(requestParameters: ListTargetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * - * @summary List notification topic-target routes - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {string} [topicId] Filter by notification topic ID. - * @param {string} [targetId] Filter by notification target ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - listTopicTargetRoutesRaw(requestParameters: ListTopicTargetRoutesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; - - /** - * List notification topic-target routes - */ - listTopicTargetRoutes(requestParameters: ListTopicTargetRoutesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * - * @summary Update a notification target - * @param {string} projectIdOrName The Ampersand project ID or project name. - * @param {string} targetId The notification target ID. - * @param {UpdateTargetRequest} updateTargetRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof NotificationApiInterface - */ - updateTargetRaw(requestParameters: UpdateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; - - /** - * Update a notification target - */ - updateTarget(requestParameters: UpdateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; - } /** @@ -344,104 +159,6 @@ export class NotificationApi extends runtime.BaseAPI implements NotificationApiI return await response.value(); } - /** - * Create a notification target - */ - async createTargetRaw(requestParameters: CreateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling createTarget.'); - } - - if (requestParameters.target === null || requestParameters.target === undefined) { - throw new runtime.RequiredError('target','Required parameter requestParameters.target was null or undefined when calling createTarget.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/targets`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateTargetRequestToJSON(requestParameters.target), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTargetFromJSON(jsonValue)); - } - - /** - * Create a notification target - */ - async createTarget(requestParameters: CreateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createTargetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create a notification topic-target route - */ - async createTopicTargetRouteRaw(requestParameters: CreateTopicTargetRouteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling createTopicTargetRoute.'); - } - - if (requestParameters.topicTargetRoute === null || requestParameters.topicTargetRoute === undefined) { - throw new runtime.RequiredError('topicTargetRoute','Required parameter requestParameters.topicTargetRoute was null or undefined when calling createTopicTargetRoute.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/topic-target-routes`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateTopicTargetRouteRequestToJSON(requestParameters.topicTargetRoute), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTopicTargetRouteFromJSON(jsonValue)); - } - - /** - * Create a notification topic-target route - */ - async createTopicTargetRoute(requestParameters: CreateTopicTargetRouteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createTopicTargetRouteRaw(requestParameters, initOverrides); - return await response.value(); - } - /** * Delete a notification event-topic route */ @@ -487,142 +204,6 @@ export class NotificationApi extends runtime.BaseAPI implements NotificationApiI await this.deleteEventTopicRouteRaw(requestParameters, initOverrides); } - /** - * Delete a notification target - */ - async deleteTargetRaw(requestParameters: DeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling deleteTarget.'); - } - - if (requestParameters.targetId === null || requestParameters.targetId === undefined) { - throw new runtime.RequiredError('targetId','Required parameter requestParameters.targetId was null or undefined when calling deleteTarget.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/targets/{targetId}`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))).replace(`{${"targetId"}}`, encodeURIComponent(String(requestParameters.targetId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a notification target - */ - async deleteTarget(requestParameters: DeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteTargetRaw(requestParameters, initOverrides); - } - - /** - * Delete a notification topic-target route - */ - async deleteTopicTargetRouteRaw(requestParameters: DeleteTopicTargetRouteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling deleteTopicTargetRoute.'); - } - - if (requestParameters.routeId === null || requestParameters.routeId === undefined) { - throw new runtime.RequiredError('routeId','Required parameter requestParameters.routeId was null or undefined when calling deleteTopicTargetRoute.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/topic-target-routes/{routeId}`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))).replace(`{${"routeId"}}`, encodeURIComponent(String(requestParameters.routeId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a notification topic-target route - */ - async deleteTopicTargetRoute(requestParameters: DeleteTopicTargetRouteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteTopicTargetRouteRaw(requestParameters, initOverrides); - } - - /** - * Get a notification target - */ - async getTargetByIdRaw(requestParameters: GetTargetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling getTargetById.'); - } - - if (requestParameters.targetId === null || requestParameters.targetId === undefined) { - throw new runtime.RequiredError('targetId','Required parameter requestParameters.targetId was null or undefined when calling getTargetById.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/targets/{targetId}`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))).replace(`{${"targetId"}}`, encodeURIComponent(String(requestParameters.targetId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTargetFromJSON(jsonValue)); - } - - /** - * Get a notification target - */ - async getTargetById(requestParameters: GetTargetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTargetByIdRaw(requestParameters, initOverrides); - return await response.value(); - } - /** * List notification event-topic routes */ @@ -673,151 +254,6 @@ export class NotificationApi extends runtime.BaseAPI implements NotificationApiI return await response.value(); } - /** - * List notification targets - */ - async listTargetsRaw(requestParameters: ListTargetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling listTargets.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/targets`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NotificationTargetFromJSON)); - } - - /** - * List notification targets - */ - async listTargets(requestParameters: ListTargetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.listTargetsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List notification topic-target routes - */ - async listTopicTargetRoutesRaw(requestParameters: ListTopicTargetRoutesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling listTopicTargetRoutes.'); - } - - const queryParameters: any = {}; - - if (requestParameters.topicId !== undefined) { - queryParameters['topicId'] = requestParameters.topicId; - } - - if (requestParameters.targetId !== undefined) { - queryParameters['targetId'] = requestParameters.targetId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/topic-target-routes`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NotificationTopicTargetRouteFromJSON)); - } - - /** - * List notification topic-target routes - */ - async listTopicTargetRoutes(requestParameters: ListTopicTargetRoutesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.listTopicTargetRoutesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a notification target - */ - async updateTargetRaw(requestParameters: UpdateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.projectIdOrName === null || requestParameters.projectIdOrName === undefined) { - throw new runtime.RequiredError('projectIdOrName','Required parameter requestParameters.projectIdOrName was null or undefined when calling updateTarget.'); - } - - if (requestParameters.targetId === null || requestParameters.targetId === undefined) { - throw new runtime.RequiredError('targetId','Required parameter requestParameters.targetId was null or undefined when calling updateTarget.'); - } - - if (requestParameters.updateTargetRequest === null || requestParameters.updateTargetRequest === undefined) { - throw new runtime.RequiredError('updateTargetRequest','Required parameter requestParameters.updateTargetRequest was null or undefined when calling updateTarget.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["X-Api-Key"] = this.configuration.apiKey("X-Api-Key"); // APIKeyHeader authentication - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("Bearer", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - const response = await this.request({ - path: `/projects/{projectIdOrName}/notifications/targets/{targetId}`.replace(`{${"projectIdOrName"}}`, encodeURIComponent(String(requestParameters.projectIdOrName))).replace(`{${"targetId"}}`, encodeURIComponent(String(requestParameters.targetId))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: UpdateTargetRequestToJSON(requestParameters.updateTargetRequest), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NotificationTargetFromJSON(jsonValue)); - } - - /** - * Update a notification target - */ - async updateTarget(requestParameters: UpdateTargetOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateTargetRaw(requestParameters, initOverrides); - return await response.value(); - } - } /** @@ -826,9 +262,11 @@ export class NotificationApi extends runtime.BaseAPI implements NotificationApiI export const ListEventTopicRoutesEventTypeEnum = { ReadBackfillDone: 'read.backfill.done', ConnectionCreated: 'connection.created', + ConnectionError: 'connection.error', InstallationCreated: 'installation.created', InstallationUpdated: 'installation.updated', InstallationDeleted: 'installation.deleted', - ReadSchedulePaused: 'read.schedule.paused' + ReadSchedulePaused: 'read.schedule.paused', + DestinationWebhookDisabled: 'destination.webhook.disabled' } as const; export type ListEventTopicRoutesEventTypeEnum = typeof ListEventTopicRoutesEventTypeEnum[keyof typeof ListEventTopicRoutesEventTypeEnum]; diff --git a/generated-sources/api/src/apis/ObjectsFieldsApi.ts b/generated-sources/api/src/apis/ObjectsFieldsApi.ts index 0417ee1ab..565aa8996 100644 --- a/generated-sources/api/src/apis/ObjectsFieldsApi.ts +++ b/generated-sources/api/src/apis/ObjectsFieldsApi.ts @@ -36,6 +36,7 @@ export interface GetObjectMetadataForConnectionRequest { provider: string; objectName: string; groupRef?: string; + excludeReadOnly?: boolean; } export interface GetObjectMetadataForInstallationRequest { @@ -43,19 +44,18 @@ export interface GetObjectMetadataForInstallationRequest { integrationId: string; objectName: string; groupRef?: string; + excludeReadOnly?: boolean; } export interface UpsertMetadataForConnectionRequest { projectIdOrName: string; provider: string; - groupRef: string; upsertMetadataRequest: UpsertMetadataRequest; } export interface UpsertMetadataForInstallationRequest { projectIdOrName: string; integrationId: string; - groupRef: string; upsertMetadataRequest: UpsertMetadataRequest; } @@ -73,6 +73,7 @@ export interface ObjectsFieldsApiInterface { * @param {string} provider The API Provider * @param {string} objectName Object name (mapped or unmapped) * @param {string} [groupRef] The groupRef for the connection. + * @param {boolean} [excludeReadOnly] Excludes fields where `ReadOnly` is `true` from the response. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsFieldsApiInterface @@ -92,6 +93,7 @@ export interface ObjectsFieldsApiInterface { * @param {string} integrationId The integration ID. * @param {string} objectName Object name (mapped or unmapped) * @param {string} [groupRef] The groupRef for the installation + * @param {boolean} [excludeReadOnly] Excludes fields where `ReadOnly` is `true` from the response. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ObjectsFieldsApiInterface @@ -109,7 +111,6 @@ export interface ObjectsFieldsApiInterface { * @summary Upsert custom fields for connection * @param {string} projectIdOrName The Ampersand project ID or project name. * @param {string} provider The provider that this connection connects to. - * @param {string} groupRef The ID that your app uses to identify the group of users for this Connection. * @param {UpsertMetadataRequest} upsertMetadataRequest Metadata upsert request containing field definitions to create or update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -128,7 +129,6 @@ export interface ObjectsFieldsApiInterface { * @summary Upsert custom fields for installation * @param {string} projectIdOrName The Ampersand project ID or project name. * @param {string} integrationId The integration ID. - * @param {string} groupRef The groupRef for the installation * @param {UpsertMetadataRequest} upsertMetadataRequest Metadata upsert request containing field definitions to create or update * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -172,6 +172,10 @@ export class ObjectsFieldsApi extends runtime.BaseAPI implements ObjectsFieldsAp queryParameters['groupRef'] = requestParameters.groupRef; } + if (requestParameters.excludeReadOnly !== undefined) { + queryParameters['excludeReadOnly'] = requestParameters.excludeReadOnly; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -228,6 +232,10 @@ export class ObjectsFieldsApi extends runtime.BaseAPI implements ObjectsFieldsAp queryParameters['groupRef'] = requestParameters.groupRef; } + if (requestParameters.excludeReadOnly !== undefined) { + queryParameters['excludeReadOnly'] = requestParameters.excludeReadOnly; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -274,20 +282,12 @@ export class ObjectsFieldsApi extends runtime.BaseAPI implements ObjectsFieldsAp throw new runtime.RequiredError('provider','Required parameter requestParameters.provider was null or undefined when calling upsertMetadataForConnection.'); } - if (requestParameters.groupRef === null || requestParameters.groupRef === undefined) { - throw new runtime.RequiredError('groupRef','Required parameter requestParameters.groupRef was null or undefined when calling upsertMetadataForConnection.'); - } - if (requestParameters.upsertMetadataRequest === null || requestParameters.upsertMetadataRequest === undefined) { throw new runtime.RequiredError('upsertMetadataRequest','Required parameter requestParameters.upsertMetadataRequest was null or undefined when calling upsertMetadataForConnection.'); } const queryParameters: any = {}; - if (requestParameters.groupRef !== undefined) { - queryParameters['groupRef'] = requestParameters.groupRef; - } - const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -337,20 +337,12 @@ export class ObjectsFieldsApi extends runtime.BaseAPI implements ObjectsFieldsAp throw new runtime.RequiredError('integrationId','Required parameter requestParameters.integrationId was null or undefined when calling upsertMetadataForInstallation.'); } - if (requestParameters.groupRef === null || requestParameters.groupRef === undefined) { - throw new runtime.RequiredError('groupRef','Required parameter requestParameters.groupRef was null or undefined when calling upsertMetadataForInstallation.'); - } - if (requestParameters.upsertMetadataRequest === null || requestParameters.upsertMetadataRequest === undefined) { throw new runtime.RequiredError('upsertMetadataRequest','Required parameter requestParameters.upsertMetadataRequest was null or undefined when calling upsertMetadataForInstallation.'); } const queryParameters: any = {}; - if (requestParameters.groupRef !== undefined) { - queryParameters['groupRef'] = requestParameters.groupRef; - } - const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; diff --git a/generated-sources/api/src/apis/RevisionApi.ts b/generated-sources/api/src/apis/RevisionApi.ts index 9b9de4ae8..97a534a27 100644 --- a/generated-sources/api/src/apis/RevisionApi.ts +++ b/generated-sources/api/src/apis/RevisionApi.ts @@ -53,7 +53,7 @@ export interface GetHydratedRevisionRequest { */ export interface RevisionApiInterface { /** - * + * We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly, unless you have an advanced use case. * @summary Create a new revision. * @param {string} projectIdOrName The Ampersand project ID or project name. * @param {string} integrationId The integration ID. @@ -66,6 +66,7 @@ export interface RevisionApiInterface { createRevisionRaw(requestParameters: CreateRevisionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** + * We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly, unless you have an advanced use case. * Create a new revision. */ createRevision(requestParameters: CreateRevisionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; @@ -97,6 +98,7 @@ export interface RevisionApiInterface { export class RevisionApi extends runtime.BaseAPI implements RevisionApiInterface { /** + * We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly, unless you have an advanced use case. * Create a new revision. */ async createRevisionRaw(requestParameters: CreateRevisionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -146,6 +148,7 @@ export class RevisionApi extends runtime.BaseAPI implements RevisionApiInterface } /** + * We recommend using the [CLI\'s deploy command](https://docs.withampersand.com/cli/overview#deploy-integrations) rather than this API endpoint directly, unless you have an advanced use case. * Create a new revision. */ async createRevision(requestParameters: CreateRevisionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/generated-sources/api/src/models/CreateEventTopicRouteRequest.ts b/generated-sources/api/src/models/CreateEventTopicRouteRequest.ts index cea3261ae..a89f4a0c4 100644 --- a/generated-sources/api/src/models/CreateEventTopicRouteRequest.ts +++ b/generated-sources/api/src/models/CreateEventTopicRouteRequest.ts @@ -40,10 +40,12 @@ export interface CreateEventTopicRouteRequest { export const CreateEventTopicRouteRequestEventTypeEnum = { ReadBackfillDone: 'read.backfill.done', ConnectionCreated: 'connection.created', + ConnectionError: 'connection.error', InstallationCreated: 'installation.created', InstallationUpdated: 'installation.updated', InstallationDeleted: 'installation.deleted', - ReadSchedulePaused: 'read.schedule.paused' + ReadSchedulePaused: 'read.schedule.paused', + DestinationWebhookDisabled: 'destination.webhook.disabled' } as const; export type CreateEventTopicRouteRequestEventTypeEnum = typeof CreateEventTopicRouteRequestEventTypeEnum[keyof typeof CreateEventTopicRouteRequestEventTypeEnum]; diff --git a/generated-sources/api/src/models/CreateTargetRequest.ts b/generated-sources/api/src/models/CreateTargetRequest.ts deleted file mode 100644 index b4cd49329..000000000 --- a/generated-sources/api/src/models/CreateTargetRequest.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -import type { CreateTargetRequestMetadata } from './CreateTargetRequestMetadata'; -import { - CreateTargetRequestMetadataFromJSON, - CreateTargetRequestMetadataFromJSONTyped, - CreateTargetRequestMetadataToJSON, -} from './CreateTargetRequestMetadata'; - -/** - * - * @export - * @interface CreateTargetRequest - */ -export interface CreateTargetRequest { - /** - * A human-readable label for the notification target. - * @type {string} - * @memberof CreateTargetRequest - */ - label: string; - /** - * The type of notification target. - * @type {string} - * @memberof CreateTargetRequest - */ - type: CreateTargetRequestTypeEnum; - /** - * - * @type {CreateTargetRequestMetadata} - * @memberof CreateTargetRequest - */ - metadata: CreateTargetRequestMetadata; - /** - * Secrets for the target. - * @type {object} - * @memberof CreateTargetRequest - */ - secrets?: object; -} - - -/** - * @export - */ -export const CreateTargetRequestTypeEnum = { - Webhook: 'webhook' -} as const; -export type CreateTargetRequestTypeEnum = typeof CreateTargetRequestTypeEnum[keyof typeof CreateTargetRequestTypeEnum]; - - -/** - * Check if a given object implements the CreateTargetRequest interface. - */ -export function instanceOfCreateTargetRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "label" in value; - isInstance = isInstance && "type" in value; - isInstance = isInstance && "metadata" in value; - - return isInstance; -} - -export function CreateTargetRequestFromJSON(json: any): CreateTargetRequest { - return CreateTargetRequestFromJSONTyped(json, false); -} - -export function CreateTargetRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTargetRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'label': json['label'], - 'type': json['type'], - 'metadata': CreateTargetRequestMetadataFromJSON(json['metadata']), - 'secrets': !exists(json, 'secrets') ? undefined : json['secrets'], - }; -} - -export function CreateTargetRequestToJSON(value?: CreateTargetRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'label': value.label, - 'type': value.type, - 'metadata': CreateTargetRequestMetadataToJSON(value.metadata), - 'secrets': value.secrets, - }; -} - diff --git a/generated-sources/api/src/models/CreateTargetRequestMetadata.ts b/generated-sources/api/src/models/CreateTargetRequestMetadata.ts deleted file mode 100644 index 2ecb190b9..000000000 --- a/generated-sources/api/src/models/CreateTargetRequestMetadata.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CreateTargetRequestMetadata - */ -export interface CreateTargetRequestMetadata { - /** - * Webhook URL, must start with "https://". - * @type {string} - * @memberof CreateTargetRequestMetadata - */ - url?: string; - /** - * Additional headers to add when Ampersand sends a webhook message - * @type {{ [key: string]: string; }} - * @memberof CreateTargetRequestMetadata - */ - headers?: { [key: string]: string; } | null; -} - -/** - * Check if a given object implements the CreateTargetRequestMetadata interface. - */ -export function instanceOfCreateTargetRequestMetadata(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function CreateTargetRequestMetadataFromJSON(json: any): CreateTargetRequestMetadata { - return CreateTargetRequestMetadataFromJSONTyped(json, false); -} - -export function CreateTargetRequestMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTargetRequestMetadata { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'url': !exists(json, 'url') ? undefined : json['url'], - 'headers': !exists(json, 'headers') ? undefined : json['headers'], - }; -} - -export function CreateTargetRequestMetadataToJSON(value?: CreateTargetRequestMetadata | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'url': value.url, - 'headers': value.headers, - }; -} - diff --git a/generated-sources/api/src/models/CreateTopicTargetRouteRequest.ts b/generated-sources/api/src/models/CreateTopicTargetRouteRequest.ts deleted file mode 100644 index 6e88d7d13..000000000 --- a/generated-sources/api/src/models/CreateTopicTargetRouteRequest.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CreateTopicTargetRouteRequest - */ -export interface CreateTopicTargetRouteRequest { - /** - * The ID of the notification topic. - * @type {string} - * @memberof CreateTopicTargetRouteRequest - */ - topicId: string; - /** - * The ID of the notification target. - * @type {string} - * @memberof CreateTopicTargetRouteRequest - */ - targetId: string; -} - -/** - * Check if a given object implements the CreateTopicTargetRouteRequest interface. - */ -export function instanceOfCreateTopicTargetRouteRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "topicId" in value; - isInstance = isInstance && "targetId" in value; - - return isInstance; -} - -export function CreateTopicTargetRouteRequestFromJSON(json: any): CreateTopicTargetRouteRequest { - return CreateTopicTargetRouteRequestFromJSONTyped(json, false); -} - -export function CreateTopicTargetRouteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTopicTargetRouteRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'topicId': json['topicId'], - 'targetId': json['targetId'], - }; -} - -export function CreateTopicTargetRouteRequestToJSON(value?: CreateTopicTargetRouteRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'topicId': value.topicId, - 'targetId': value.targetId, - }; -} - diff --git a/generated-sources/api/src/models/FieldChangedEvent.ts b/generated-sources/api/src/models/FieldChangedEvent.ts new file mode 100644 index 000000000..90bdfd099 --- /dev/null +++ b/generated-sources/api/src/models/FieldChangedEvent.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +/** + * Configuration for detecting when fields are changed. + * @export + * @interface FieldChangedEvent + */ +export interface FieldChangedEvent { + /** + * If always, the integration will monitor for field changes by default. + * @type {string} + * @memberof FieldChangedEvent + */ + enabled: FieldChangedEventEnabledEnum; +} + + +/** + * @export + */ +export const FieldChangedEventEnabledEnum = { + Always: 'always' +} as const; +export type FieldChangedEventEnabledEnum = typeof FieldChangedEventEnabledEnum[keyof typeof FieldChangedEventEnabledEnum]; + + +/** + * Check if a given object implements the FieldChangedEvent interface. + */ +export function instanceOfFieldChangedEvent(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "enabled" in value; + + return isInstance; +} + +export function FieldChangedEventFromJSON(json: any): FieldChangedEvent { + return FieldChangedEventFromJSONTyped(json, false); +} + +export function FieldChangedEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldChangedEvent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'enabled': json['enabled'], + }; +} + +export function FieldChangedEventToJSON(value?: FieldChangedEvent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'enabled': value.enabled, + }; +} + diff --git a/generated-sources/api/src/models/FieldCreatedEvent.ts b/generated-sources/api/src/models/FieldCreatedEvent.ts new file mode 100644 index 000000000..6e72c85c6 --- /dev/null +++ b/generated-sources/api/src/models/FieldCreatedEvent.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +/** + * Configuration for detecting when new fields are created. + * @export + * @interface FieldCreatedEvent + */ +export interface FieldCreatedEvent { + /** + * If always, the integration will monitor for new fields by default. + * @type {string} + * @memberof FieldCreatedEvent + */ + enabled: FieldCreatedEventEnabledEnum; +} + + +/** + * @export + */ +export const FieldCreatedEventEnabledEnum = { + Always: 'always' +} as const; +export type FieldCreatedEventEnabledEnum = typeof FieldCreatedEventEnabledEnum[keyof typeof FieldCreatedEventEnabledEnum]; + + +/** + * Check if a given object implements the FieldCreatedEvent interface. + */ +export function instanceOfFieldCreatedEvent(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "enabled" in value; + + return isInstance; +} + +export function FieldCreatedEventFromJSON(json: any): FieldCreatedEvent { + return FieldCreatedEventFromJSONTyped(json, false); +} + +export function FieldCreatedEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldCreatedEvent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'enabled': json['enabled'], + }; +} + +export function FieldCreatedEventToJSON(value?: FieldCreatedEvent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'enabled': value.enabled, + }; +} + diff --git a/generated-sources/api/src/models/FieldDeletedEvent.ts b/generated-sources/api/src/models/FieldDeletedEvent.ts new file mode 100644 index 000000000..3c4e3aa15 --- /dev/null +++ b/generated-sources/api/src/models/FieldDeletedEvent.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +/** + * Configuration for detecting when fields are deleted. + * @export + * @interface FieldDeletedEvent + */ +export interface FieldDeletedEvent { + /** + * If always, the integration will monitor for deleted fields by default. + * @type {string} + * @memberof FieldDeletedEvent + */ + enabled: FieldDeletedEventEnabledEnum; +} + + +/** + * @export + */ +export const FieldDeletedEventEnabledEnum = { + Always: 'always' +} as const; +export type FieldDeletedEventEnabledEnum = typeof FieldDeletedEventEnabledEnum[keyof typeof FieldDeletedEventEnabledEnum]; + + +/** + * Check if a given object implements the FieldDeletedEvent interface. + */ +export function instanceOfFieldDeletedEvent(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "enabled" in value; + + return isInstance; +} + +export function FieldDeletedEventFromJSON(json: any): FieldDeletedEvent { + return FieldDeletedEventFromJSONTyped(json, false); +} + +export function FieldDeletedEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldDeletedEvent { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'enabled': json['enabled'], + }; +} + +export function FieldDeletedEventToJSON(value?: FieldDeletedEvent | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'enabled': value.enabled, + }; +} + diff --git a/generated-sources/api/src/models/FieldMetadata.ts b/generated-sources/api/src/models/FieldMetadata.ts index 469d75d66..494cdc8c2 100644 --- a/generated-sources/api/src/models/FieldMetadata.ts +++ b/generated-sources/api/src/models/FieldMetadata.ts @@ -56,6 +56,18 @@ export interface FieldMetadata { * @memberof FieldMetadata */ readOnly?: boolean; + /** + * Whether the field is custom field. + * @type {boolean} + * @memberof FieldMetadata + */ + isCustom?: boolean; + /** + * Whether the field is required when creating a new record. + * @type {boolean} + * @memberof FieldMetadata + */ + isRequired?: boolean; /** * If the valueType is singleSelect or multiSelect, this is a list of possible values * @type {Array} @@ -108,6 +120,8 @@ export function FieldMetadataFromJSONTyped(json: any, ignoreDiscriminator: boole 'valueType': !exists(json, 'valueType') ? undefined : json['valueType'], 'providerType': !exists(json, 'providerType') ? undefined : json['providerType'], 'readOnly': !exists(json, 'readOnly') ? undefined : json['readOnly'], + 'isCustom': !exists(json, 'isCustom') ? undefined : json['isCustom'], + 'isRequired': !exists(json, 'isRequired') ? undefined : json['isRequired'], 'values': !exists(json, 'values') ? undefined : ((json['values'] as Array).map(FieldValueFromJSON)), }; } @@ -126,6 +140,8 @@ export function FieldMetadataToJSON(value?: FieldMetadata | null): any { 'valueType': value.valueType, 'providerType': value.providerType, 'readOnly': value.readOnly, + 'isCustom': value.isCustom, + 'isRequired': value.isRequired, 'values': value.values === undefined ? undefined : ((value.values as Array).map(FieldValueToJSON)), }; } diff --git a/generated-sources/api/src/models/Installation.ts b/generated-sources/api/src/models/Installation.ts index f60f4c8e0..30241cb5e 100644 --- a/generated-sources/api/src/models/Installation.ts +++ b/generated-sources/api/src/models/Installation.ts @@ -68,6 +68,12 @@ export interface Installation { * @memberof Installation */ healthStatus: string; + /** + * The status of the latest operation for this installation. + * @type {string} + * @memberof Installation + */ + lastOperationStatus?: InstallationLastOperationStatusEnum; /** * * @type {Connection} @@ -100,6 +106,18 @@ export interface Installation { config: Config; } + +/** + * @export + */ +export const InstallationLastOperationStatusEnum = { + Success: 'success', + Failure: 'failure', + InProgress: 'in_progress' +} as const; +export type InstallationLastOperationStatusEnum = typeof InstallationLastOperationStatusEnum[keyof typeof InstallationLastOperationStatusEnum]; + + /** * Check if a given object implements the Installation interface. */ @@ -132,6 +150,7 @@ export function InstallationFromJSONTyped(json: any, ignoreDiscriminator: boolea 'integrationId': json['integrationId'], 'group': !exists(json, 'group') ? undefined : GroupFromJSON(json['group']), 'healthStatus': json['healthStatus'], + 'lastOperationStatus': !exists(json, 'lastOperationStatus') ? undefined : json['lastOperationStatus'], 'connection': ConnectionFromJSON(json['connection']), 'createTime': (new Date(json['createTime'])), 'createdBy': json['createdBy'], @@ -154,6 +173,7 @@ export function InstallationToJSON(value?: Installation | null): any { 'integrationId': value.integrationId, 'group': GroupToJSON(value.group), 'healthStatus': value.healthStatus, + 'lastOperationStatus': value.lastOperationStatus, 'connection': ConnectionToJSON(value.connection), 'createTime': (value.createTime.toISOString()), 'createdBy': value.createdBy, diff --git a/generated-sources/api/src/models/Integration1.ts b/generated-sources/api/src/models/Integration1.ts index 90ee2d5a7..c568a9437 100644 --- a/generated-sources/api/src/models/Integration1.ts +++ b/generated-sources/api/src/models/Integration1.ts @@ -37,6 +37,12 @@ import { IntegrationWriteFromJSONTyped, IntegrationWriteToJSON, } from './IntegrationWrite'; +import type { WatchSchema } from './WatchSchema'; +import { + WatchSchemaFromJSON, + WatchSchemaFromJSONTyped, + WatchSchemaToJSON, +} from './WatchSchema'; /** * @@ -92,6 +98,12 @@ export interface Integration1 { * @memberof Integration1 */ subscribe?: IntegrationSubscribe; + /** + * + * @type {WatchSchema} + * @memberof Integration1 + */ + watchSchema?: WatchSchema; } /** @@ -123,6 +135,7 @@ export function Integration1FromJSONTyped(json: any, ignoreDiscriminator: boolea 'write': !exists(json, 'write') ? undefined : IntegrationWriteFromJSON(json['write']), 'proxy': !exists(json, 'proxy') ? undefined : IntegrationProxyFromJSON(json['proxy']), 'subscribe': !exists(json, 'subscribe') ? undefined : IntegrationSubscribeFromJSON(json['subscribe']), + 'watchSchema': !exists(json, 'watchSchema') ? undefined : WatchSchemaFromJSON(json['watchSchema']), }; } @@ -143,6 +156,7 @@ export function Integration1ToJSON(value?: Integration1 | null): any { 'write': IntegrationWriteToJSON(value.write), 'proxy': IntegrationProxyToJSON(value.proxy), 'subscribe': IntegrationSubscribeToJSON(value.subscribe), + 'watchSchema': WatchSchemaToJSON(value.watchSchema), }; } diff --git a/generated-sources/api/src/models/JSONPatchOperation.ts b/generated-sources/api/src/models/JSONPatchOperation.ts new file mode 100644 index 000000000..10a32f972 --- /dev/null +++ b/generated-sources/api/src/models/JSONPatchOperation.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +/** + * Represents a single JSON Patch operation (RFC 6902). + * Only supports add, remove, and replace operations for config updates. + * @export + * @interface JSONPatchOperation + */ +export interface JSONPatchOperation { + /** + * The operation to perform. + * - "add": Adds a new field or replaces an existing one at the specified path + * - "remove": Removes the field at the specified path + * - "replace": Replaces the value at the specified path + * @type {string} + * @memberof JSONPatchOperation + */ + op: JSONPatchOperationOpEnum; + /** + * JSON Pointer path to the field to operate on (RFC 6901). + * All paths must start with "/" (e.g., "/schedule", "/selectedFields/phone"). + * @type {string} + * @memberof JSONPatchOperation + */ + path: string; + /** + * The value to set for add/replace operations. + * Not used for remove operations. + * @type {any} + * @memberof JSONPatchOperation + */ + value?: any | null; +} + + +/** + * @export + */ +export const JSONPatchOperationOpEnum = { + Add: 'add', + Remove: 'remove', + Replace: 'replace' +} as const; +export type JSONPatchOperationOpEnum = typeof JSONPatchOperationOpEnum[keyof typeof JSONPatchOperationOpEnum]; + + +/** + * Check if a given object implements the JSONPatchOperation interface. + */ +export function instanceOfJSONPatchOperation(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "op" in value; + isInstance = isInstance && "path" in value; + + return isInstance; +} + +export function JSONPatchOperationFromJSON(json: any): JSONPatchOperation { + return JSONPatchOperationFromJSONTyped(json, false); +} + +export function JSONPatchOperationFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchOperation { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'op': json['op'], + 'path': json['path'], + 'value': !exists(json, 'value') ? undefined : json['value'], + }; +} + +export function JSONPatchOperationToJSON(value?: JSONPatchOperation | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'op': value.op, + 'path': value.path, + 'value': value.value, + }; +} + diff --git a/generated-sources/api/src/models/NotificationEventTopicRoute.ts b/generated-sources/api/src/models/NotificationEventTopicRoute.ts index 493fb3b93..e95a7d162 100644 --- a/generated-sources/api/src/models/NotificationEventTopicRoute.ts +++ b/generated-sources/api/src/models/NotificationEventTopicRoute.ts @@ -64,10 +64,12 @@ export interface NotificationEventTopicRoute { export const NotificationEventTopicRouteEventTypeEnum = { ReadBackfillDone: 'read.backfill.done', ConnectionCreated: 'connection.created', + ConnectionError: 'connection.error', InstallationCreated: 'installation.created', InstallationUpdated: 'installation.updated', InstallationDeleted: 'installation.deleted', - ReadSchedulePaused: 'read.schedule.paused' + ReadSchedulePaused: 'read.schedule.paused', + DestinationWebhookDisabled: 'destination.webhook.disabled' } as const; export type NotificationEventTopicRouteEventTypeEnum = typeof NotificationEventTopicRouteEventTypeEnum[keyof typeof NotificationEventTopicRouteEventTypeEnum]; diff --git a/generated-sources/api/src/models/NotificationTarget.ts b/generated-sources/api/src/models/NotificationTarget.ts deleted file mode 100644 index 8f28380ea..000000000 --- a/generated-sources/api/src/models/NotificationTarget.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -import type { NotificationTargetMetadata } from './NotificationTargetMetadata'; -import { - NotificationTargetMetadataFromJSON, - NotificationTargetMetadataFromJSONTyped, - NotificationTargetMetadataToJSON, -} from './NotificationTargetMetadata'; - -/** - * - * @export - * @interface NotificationTarget - */ -export interface NotificationTarget { - /** - * The notification target ID. - * @type {string} - * @memberof NotificationTarget - */ - id: string; - /** - * A human-readable label for the notification target. - * @type {string} - * @memberof NotificationTarget - */ - label: string; - /** - * The type of notification target. - * @type {string} - * @memberof NotificationTarget - */ - type: NotificationTargetTypeEnum; - /** - * - * @type {NotificationTargetMetadata} - * @memberof NotificationTarget - */ - metadata: NotificationTargetMetadata; - /** - * Secrets for the target. - * @type {object} - * @memberof NotificationTarget - */ - secrets?: object; - /** - * The time when the notification target was created. - * @type {Date} - * @memberof NotificationTarget - */ - createTime: Date; - /** - * The time when the notification target was last updated. - * @type {Date} - * @memberof NotificationTarget - */ - updateTime?: Date; -} - - -/** - * @export - */ -export const NotificationTargetTypeEnum = { - Webhook: 'webhook' -} as const; -export type NotificationTargetTypeEnum = typeof NotificationTargetTypeEnum[keyof typeof NotificationTargetTypeEnum]; - - -/** - * Check if a given object implements the NotificationTarget interface. - */ -export function instanceOfNotificationTarget(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "label" in value; - isInstance = isInstance && "type" in value; - isInstance = isInstance && "metadata" in value; - isInstance = isInstance && "createTime" in value; - - return isInstance; -} - -export function NotificationTargetFromJSON(json: any): NotificationTarget { - return NotificationTargetFromJSONTyped(json, false); -} - -export function NotificationTargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTarget { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'label': json['label'], - 'type': json['type'], - 'metadata': NotificationTargetMetadataFromJSON(json['metadata']), - 'secrets': !exists(json, 'secrets') ? undefined : json['secrets'], - 'createTime': (new Date(json['createTime'])), - 'updateTime': !exists(json, 'updateTime') ? undefined : (new Date(json['updateTime'])), - }; -} - -export function NotificationTargetToJSON(value?: NotificationTarget | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'label': value.label, - 'type': value.type, - 'metadata': NotificationTargetMetadataToJSON(value.metadata), - 'secrets': value.secrets, - 'createTime': (value.createTime.toISOString()), - 'updateTime': value.updateTime === undefined ? undefined : (value.updateTime.toISOString()), - }; -} - diff --git a/generated-sources/api/src/models/NotificationTargetMetadata.ts b/generated-sources/api/src/models/NotificationTargetMetadata.ts deleted file mode 100644 index b51c25548..000000000 --- a/generated-sources/api/src/models/NotificationTargetMetadata.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface NotificationTargetMetadata - */ -export interface NotificationTargetMetadata { - /** - * Webhook URL, must start with "https://". - * @type {string} - * @memberof NotificationTargetMetadata - */ - url: string; - /** - * Additional headers to add when Ampersand sends a webhook message - * @type {{ [key: string]: string; }} - * @memberof NotificationTargetMetadata - */ - headers?: { [key: string]: string; } | null; -} - -/** - * Check if a given object implements the NotificationTargetMetadata interface. - */ -export function instanceOfNotificationTargetMetadata(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "url" in value; - - return isInstance; -} - -export function NotificationTargetMetadataFromJSON(json: any): NotificationTargetMetadata { - return NotificationTargetMetadataFromJSONTyped(json, false); -} - -export function NotificationTargetMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTargetMetadata { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'url': json['url'], - 'headers': !exists(json, 'headers') ? undefined : json['headers'], - }; -} - -export function NotificationTargetMetadataToJSON(value?: NotificationTargetMetadata | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'url': value.url, - 'headers': value.headers, - }; -} - diff --git a/generated-sources/api/src/models/NotificationTopicTargetRoute.ts b/generated-sources/api/src/models/NotificationTopicTargetRoute.ts deleted file mode 100644 index 637cd875a..000000000 --- a/generated-sources/api/src/models/NotificationTopicTargetRoute.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface NotificationTopicTargetRoute - */ -export interface NotificationTopicTargetRoute { - /** - * The topic-target route ID. - * @type {string} - * @memberof NotificationTopicTargetRoute - */ - id: string; - /** - * The ID of the notification topic. - * @type {string} - * @memberof NotificationTopicTargetRoute - */ - topicId: string; - /** - * The ID of the notification target. - * @type {string} - * @memberof NotificationTopicTargetRoute - */ - targetId: string; - /** - * The Ampersand project ID. - * @type {string} - * @memberof NotificationTopicTargetRoute - */ - projectId: string; - /** - * The time when the topic-target route was created. - * @type {Date} - * @memberof NotificationTopicTargetRoute - */ - createTime: Date; -} - -/** - * Check if a given object implements the NotificationTopicTargetRoute interface. - */ -export function instanceOfNotificationTopicTargetRoute(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "id" in value; - isInstance = isInstance && "topicId" in value; - isInstance = isInstance && "targetId" in value; - isInstance = isInstance && "projectId" in value; - isInstance = isInstance && "createTime" in value; - - return isInstance; -} - -export function NotificationTopicTargetRouteFromJSON(json: any): NotificationTopicTargetRoute { - return NotificationTopicTargetRouteFromJSONTyped(json, false); -} - -export function NotificationTopicTargetRouteFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationTopicTargetRoute { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': json['id'], - 'topicId': json['topicId'], - 'targetId': json['targetId'], - 'projectId': json['projectId'], - 'createTime': (new Date(json['createTime'])), - }; -} - -export function NotificationTopicTargetRouteToJSON(value?: NotificationTopicTargetRoute | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'topicId': value.topicId, - 'targetId': value.targetId, - 'projectId': value.projectId, - 'createTime': (value.createTime.toISOString()), - }; -} - diff --git a/generated-sources/api/src/models/Oauth2Opts.ts b/generated-sources/api/src/models/Oauth2Opts.ts index 8088c3d38..6e7ed2747 100644 --- a/generated-sources/api/src/models/Oauth2Opts.ts +++ b/generated-sources/api/src/models/Oauth2Opts.ts @@ -62,6 +62,12 @@ export interface Oauth2Opts { * @memberof Oauth2Opts */ audience?: Array; + /** + * Maps input scopes to their full OAuth scope values with template variable support. Scopes not in this map are passed through unchanged. Needed for some providers. + * @type {{ [key: string]: string; }} + * @memberof Oauth2Opts + */ + scopeMappings?: { [key: string]: string; }; /** * * @type {TokenMetadataFields} @@ -125,6 +131,7 @@ export function Oauth2OptsFromJSONTyped(json: any, ignoreDiscriminator: boolean) 'explicitScopesRequired': json['explicitScopesRequired'], 'explicitWorkspaceRequired': json['explicitWorkspaceRequired'], 'audience': !exists(json, 'audience') ? undefined : json['audience'], + 'scopeMappings': !exists(json, 'scopeMappings') ? undefined : json['scopeMappings'], 'tokenMetadataFields': TokenMetadataFieldsFromJSON(json['tokenMetadataFields']), 'docsURL': !exists(json, 'docsURL') ? undefined : json['docsURL'], 'authURLParams': !exists(json, 'authURLParams') ? undefined : json['authURLParams'], @@ -146,6 +153,7 @@ export function Oauth2OptsToJSON(value?: Oauth2Opts | null): any { 'explicitScopesRequired': value.explicitScopesRequired, 'explicitWorkspaceRequired': value.explicitWorkspaceRequired, 'audience': value.audience, + 'scopeMappings': value.scopeMappings, 'tokenMetadataFields': TokenMetadataFieldsToJSON(value.tokenMetadataFields), 'docsURL': value.docsURL, 'authURLParams': value.authURLParams, diff --git a/generated-sources/api/src/models/PatchObjectConfigContentRequest.ts b/generated-sources/api/src/models/PatchObjectConfigContentRequest.ts new file mode 100644 index 000000000..1c032b110 --- /dev/null +++ b/generated-sources/api/src/models/PatchObjectConfigContentRequest.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +import type { JSONPatchOperation } from './JSONPatchOperation'; +import { + JSONPatchOperationFromJSON, + JSONPatchOperationFromJSONTyped, + JSONPatchOperationToJSON, +} from './JSONPatchOperation'; + +/** + * + * @export + * @interface PatchObjectConfigContentRequest + */ +export interface PatchObjectConfigContentRequest { + /** + * The ID of the user group that has access to this installation. + * Either groupRef or installationId must be provided. + * @type {string} + * @memberof PatchObjectConfigContentRequest + */ + groupRef: string; + /** + * The action type for the object config (read, subscribe, or write). + * @type {string} + * @memberof PatchObjectConfigContentRequest + */ + action: PatchObjectConfigContentRequestActionEnum; + /** + * Array of JSON Patch operations to apply. + * @type {Array} + * @memberof PatchObjectConfigContentRequest + */ + changes: Array; + /** + * The installation ID. + * Either groupRef or installationId must be provided. + * @type {string} + * @memberof PatchObjectConfigContentRequest + */ + installationId: string; +} + + +/** + * @export + */ +export const PatchObjectConfigContentRequestActionEnum = { + Read: 'read', + Subscribe: 'subscribe', + Write: 'write' +} as const; +export type PatchObjectConfigContentRequestActionEnum = typeof PatchObjectConfigContentRequestActionEnum[keyof typeof PatchObjectConfigContentRequestActionEnum]; + + +/** + * Check if a given object implements the PatchObjectConfigContentRequest interface. + */ +export function instanceOfPatchObjectConfigContentRequest(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "groupRef" in value; + isInstance = isInstance && "action" in value; + isInstance = isInstance && "changes" in value; + isInstance = isInstance && "installationId" in value; + + return isInstance; +} + +export function PatchObjectConfigContentRequestFromJSON(json: any): PatchObjectConfigContentRequest { + return PatchObjectConfigContentRequestFromJSONTyped(json, false); +} + +export function PatchObjectConfigContentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchObjectConfigContentRequest { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'groupRef': json['groupRef'], + 'action': json['action'], + 'changes': ((json['changes'] as Array).map(JSONPatchOperationFromJSON)), + 'installationId': json['installationId'], + }; +} + +export function PatchObjectConfigContentRequestToJSON(value?: PatchObjectConfigContentRequest | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'groupRef': value.groupRef, + 'action': value.action, + 'changes': ((value.changes as Array).map(JSONPatchOperationToJSON)), + 'installationId': value.installationId, + }; +} + diff --git a/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOf.ts b/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOf.ts new file mode 100644 index 000000000..0c9f3a375 --- /dev/null +++ b/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOf.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { + PatchObjectConfigContentRequestAllOfOneOf, + instanceOfPatchObjectConfigContentRequestAllOfOneOf, + PatchObjectConfigContentRequestAllOfOneOfFromJSON, + PatchObjectConfigContentRequestAllOfOneOfFromJSONTyped, + PatchObjectConfigContentRequestAllOfOneOfToJSON, +} from './PatchObjectConfigContentRequestAllOfOneOf'; +import { + PatchObjectConfigContentRequestAllOfOneOf1, + instanceOfPatchObjectConfigContentRequestAllOfOneOf1, + PatchObjectConfigContentRequestAllOfOneOf1FromJSON, + PatchObjectConfigContentRequestAllOfOneOf1FromJSONTyped, + PatchObjectConfigContentRequestAllOfOneOf1ToJSON, +} from './PatchObjectConfigContentRequestAllOfOneOf1'; + +/** + * @type PatchObjectConfigContentRequestAllOf + * + * @export + */ +export type PatchObjectConfigContentRequestAllOf = PatchObjectConfigContentRequestAllOfOneOf | PatchObjectConfigContentRequestAllOfOneOf1; + +export function PatchObjectConfigContentRequestAllOfFromJSON(json: any): PatchObjectConfigContentRequestAllOf { + return PatchObjectConfigContentRequestAllOfFromJSONTyped(json, false); +} + +export function PatchObjectConfigContentRequestAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchObjectConfigContentRequestAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { ...PatchObjectConfigContentRequestAllOfOneOfFromJSONTyped(json, true), ...PatchObjectConfigContentRequestAllOfOneOf1FromJSONTyped(json, true) }; +} + +export function PatchObjectConfigContentRequestAllOfToJSON(value?: PatchObjectConfigContentRequestAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + + if (instanceOfPatchObjectConfigContentRequestAllOfOneOf(value)) { + return PatchObjectConfigContentRequestAllOfOneOfToJSON(value as PatchObjectConfigContentRequestAllOfOneOf); + } + if (instanceOfPatchObjectConfigContentRequestAllOfOneOf1(value)) { + return PatchObjectConfigContentRequestAllOfOneOf1ToJSON(value as PatchObjectConfigContentRequestAllOfOneOf1); + } + + return {}; +} + diff --git a/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOfOneOf.ts b/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOfOneOf.ts new file mode 100644 index 000000000..547706abb --- /dev/null +++ b/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOfOneOf.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +import type { JSONPatchOperation } from './JSONPatchOperation'; +import { + JSONPatchOperationFromJSON, + JSONPatchOperationFromJSONTyped, + JSONPatchOperationToJSON, +} from './JSONPatchOperation'; + +/** + * + * @export + * @interface PatchObjectConfigContentRequestAllOfOneOf + */ +export interface PatchObjectConfigContentRequestAllOfOneOf { + /** + * The ID of the user group that has access to this installation. + * Either groupRef or installationId must be provided. + * @type {string} + * @memberof PatchObjectConfigContentRequestAllOfOneOf + */ + groupRef: string; + /** + * The action type for the object config (read, subscribe, or write). + * @type {string} + * @memberof PatchObjectConfigContentRequestAllOfOneOf + */ + action: PatchObjectConfigContentRequestAllOfOneOfActionEnum; + /** + * Array of JSON Patch operations to apply. + * @type {Array} + * @memberof PatchObjectConfigContentRequestAllOfOneOf + */ + changes: Array; +} + + +/** + * @export + */ +export const PatchObjectConfigContentRequestAllOfOneOfActionEnum = { + Read: 'read', + Subscribe: 'subscribe', + Write: 'write' +} as const; +export type PatchObjectConfigContentRequestAllOfOneOfActionEnum = typeof PatchObjectConfigContentRequestAllOfOneOfActionEnum[keyof typeof PatchObjectConfigContentRequestAllOfOneOfActionEnum]; + + +/** + * Check if a given object implements the PatchObjectConfigContentRequestAllOfOneOf interface. + */ +export function instanceOfPatchObjectConfigContentRequestAllOfOneOf(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "groupRef" in value; + isInstance = isInstance && "action" in value; + isInstance = isInstance && "changes" in value; + + return isInstance; +} + +export function PatchObjectConfigContentRequestAllOfOneOfFromJSON(json: any): PatchObjectConfigContentRequestAllOfOneOf { + return PatchObjectConfigContentRequestAllOfOneOfFromJSONTyped(json, false); +} + +export function PatchObjectConfigContentRequestAllOfOneOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchObjectConfigContentRequestAllOfOneOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'groupRef': json['groupRef'], + 'action': json['action'], + 'changes': ((json['changes'] as Array).map(JSONPatchOperationFromJSON)), + }; +} + +export function PatchObjectConfigContentRequestAllOfOneOfToJSON(value?: PatchObjectConfigContentRequestAllOfOneOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'groupRef': value.groupRef, + 'action': value.action, + 'changes': ((value.changes as Array).map(JSONPatchOperationToJSON)), + }; +} + diff --git a/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOfOneOf1.ts b/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOfOneOf1.ts new file mode 100644 index 000000000..fab9f763e --- /dev/null +++ b/generated-sources/api/src/models/PatchObjectConfigContentRequestAllOfOneOf1.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +import type { JSONPatchOperation } from './JSONPatchOperation'; +import { + JSONPatchOperationFromJSON, + JSONPatchOperationFromJSONTyped, + JSONPatchOperationToJSON, +} from './JSONPatchOperation'; + +/** + * + * @export + * @interface PatchObjectConfigContentRequestAllOfOneOf1 + */ +export interface PatchObjectConfigContentRequestAllOfOneOf1 { + /** + * The installation ID. + * Either groupRef or installationId must be provided. + * @type {string} + * @memberof PatchObjectConfigContentRequestAllOfOneOf1 + */ + installationId: string; + /** + * The action type for the object config (read, subscribe, or write). + * @type {string} + * @memberof PatchObjectConfigContentRequestAllOfOneOf1 + */ + action: PatchObjectConfigContentRequestAllOfOneOf1ActionEnum; + /** + * Array of JSON Patch operations to apply. + * @type {Array} + * @memberof PatchObjectConfigContentRequestAllOfOneOf1 + */ + changes: Array; +} + + +/** + * @export + */ +export const PatchObjectConfigContentRequestAllOfOneOf1ActionEnum = { + Read: 'read', + Subscribe: 'subscribe', + Write: 'write' +} as const; +export type PatchObjectConfigContentRequestAllOfOneOf1ActionEnum = typeof PatchObjectConfigContentRequestAllOfOneOf1ActionEnum[keyof typeof PatchObjectConfigContentRequestAllOfOneOf1ActionEnum]; + + +/** + * Check if a given object implements the PatchObjectConfigContentRequestAllOfOneOf1 interface. + */ +export function instanceOfPatchObjectConfigContentRequestAllOfOneOf1(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "installationId" in value; + isInstance = isInstance && "action" in value; + isInstance = isInstance && "changes" in value; + + return isInstance; +} + +export function PatchObjectConfigContentRequestAllOfOneOf1FromJSON(json: any): PatchObjectConfigContentRequestAllOfOneOf1 { + return PatchObjectConfigContentRequestAllOfOneOf1FromJSONTyped(json, false); +} + +export function PatchObjectConfigContentRequestAllOfOneOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchObjectConfigContentRequestAllOfOneOf1 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'installationId': json['installationId'], + 'action': json['action'], + 'changes': ((json['changes'] as Array).map(JSONPatchOperationFromJSON)), + }; +} + +export function PatchObjectConfigContentRequestAllOfOneOf1ToJSON(value?: PatchObjectConfigContentRequestAllOfOneOf1 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'installationId': value.installationId, + 'action': value.action, + 'changes': ((value.changes as Array).map(JSONPatchOperationToJSON)), + }; +} + diff --git a/generated-sources/api/src/models/ProviderInfo.ts b/generated-sources/api/src/models/ProviderInfo.ts index f2317ca9b..caf7fb0ec 100644 --- a/generated-sources/api/src/models/ProviderInfo.ts +++ b/generated-sources/api/src/models/ProviderInfo.ts @@ -106,10 +106,10 @@ export interface ProviderInfo { baseURL: string; /** * - * @type {any} + * @type {string} * @memberof ProviderInfo */ - defaultModule: any | null; + defaultModule: string; /** * * @type {Oauth2Opts} diff --git a/generated-sources/api/src/models/UpdateInstallationRequest.ts b/generated-sources/api/src/models/UpdateInstallationRequest.ts index 11c1395fe..3b465ce39 100644 --- a/generated-sources/api/src/models/UpdateInstallationRequest.ts +++ b/generated-sources/api/src/models/UpdateInstallationRequest.ts @@ -30,13 +30,14 @@ export interface UpdateInstallationRequest { * Array of field paths specifying which fields to update. Allowed values include: * - connectionId * - config.createdBy - * - config.content.read.objects. - * - config.content.write.objects. + * - config.content.read.objects.OBJECT_NAME + * - config.content.write.objects.OBJECT_NAME * - config.content.write.objects - * - config.content.subscribe.objects. + * - config.content.subscribe.objects.OBJECT_NAME + * - config.content.subscribe.objects * - config.content.proxy.enabled * - * `` means you can specify any object name. + * `OBJECT_NAME` means you can specify any object name. * @type {Array} * @memberof UpdateInstallationRequest */ diff --git a/generated-sources/api/src/models/UpdateInstallationRequestInstallation.ts b/generated-sources/api/src/models/UpdateInstallationRequestInstallation.ts index b47403fe7..5ae502314 100644 --- a/generated-sources/api/src/models/UpdateInstallationRequestInstallation.ts +++ b/generated-sources/api/src/models/UpdateInstallationRequestInstallation.ts @@ -21,7 +21,7 @@ import { } from './UpdateInstallationRequestInstallationConfig'; /** - * The installation fields to update. (Only include the fields you'd like to update.) + * The installation fields to update. (You only need to include the fields you'd like to update, which are specified in the update masks. The rest will be ignored.) * @export * @interface UpdateInstallationRequestInstallation */ diff --git a/generated-sources/api/src/models/UpdateTargetRequest.ts b/generated-sources/api/src/models/UpdateTargetRequest.ts deleted file mode 100644 index d656e4cc7..000000000 --- a/generated-sources/api/src/models/UpdateTargetRequest.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -import type { UpdateTargetRequestTarget } from './UpdateTargetRequestTarget'; -import { - UpdateTargetRequestTargetFromJSON, - UpdateTargetRequestTargetFromJSONTyped, - UpdateTargetRequestTargetToJSON, -} from './UpdateTargetRequestTarget'; - -/** - * - * @export - * @interface UpdateTargetRequest - */ -export interface UpdateTargetRequest { - /** - * Array of field paths specifying which fields to update. Allowed values include: - * - label - * - metadata.url - * - metadata.headers - * @type {Array} - * @memberof UpdateTargetRequest - */ - updateMask: Array; - /** - * - * @type {UpdateTargetRequestTarget} - * @memberof UpdateTargetRequest - */ - target: UpdateTargetRequestTarget; -} - -/** - * Check if a given object implements the UpdateTargetRequest interface. - */ -export function instanceOfUpdateTargetRequest(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "updateMask" in value; - isInstance = isInstance && "target" in value; - - return isInstance; -} - -export function UpdateTargetRequestFromJSON(json: any): UpdateTargetRequest { - return UpdateTargetRequestFromJSONTyped(json, false); -} - -export function UpdateTargetRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateTargetRequest { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'updateMask': json['updateMask'], - 'target': UpdateTargetRequestTargetFromJSON(json['target']), - }; -} - -export function UpdateTargetRequestToJSON(value?: UpdateTargetRequest | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'updateMask': value.updateMask, - 'target': UpdateTargetRequestTargetToJSON(value.target), - }; -} - diff --git a/generated-sources/api/src/models/UpdateTargetRequestTarget.ts b/generated-sources/api/src/models/UpdateTargetRequestTarget.ts deleted file mode 100644 index 19fc54042..000000000 --- a/generated-sources/api/src/models/UpdateTargetRequestTarget.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Ampersand public API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; -import type { CreateTargetRequestMetadata } from './CreateTargetRequestMetadata'; -import { - CreateTargetRequestMetadataFromJSON, - CreateTargetRequestMetadataFromJSONTyped, - CreateTargetRequestMetadataToJSON, -} from './CreateTargetRequestMetadata'; - -/** - * - * @export - * @interface UpdateTargetRequestTarget - */ -export interface UpdateTargetRequestTarget { - /** - * A human-readable label for the notification target. - * @type {string} - * @memberof UpdateTargetRequestTarget - */ - label?: string; - /** - * The type of notification target. - * @type {string} - * @memberof UpdateTargetRequestTarget - */ - type?: string; - /** - * - * @type {CreateTargetRequestMetadata} - * @memberof UpdateTargetRequestTarget - */ - metadata?: CreateTargetRequestMetadata; - /** - * Secrets for the target. - * @type {object} - * @memberof UpdateTargetRequestTarget - */ - secrets?: object; -} - -/** - * Check if a given object implements the UpdateTargetRequestTarget interface. - */ -export function instanceOfUpdateTargetRequestTarget(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function UpdateTargetRequestTargetFromJSON(json: any): UpdateTargetRequestTarget { - return UpdateTargetRequestTargetFromJSONTyped(json, false); -} - -export function UpdateTargetRequestTargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateTargetRequestTarget { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'label': !exists(json, 'label') ? undefined : json['label'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'metadata': !exists(json, 'metadata') ? undefined : CreateTargetRequestMetadataFromJSON(json['metadata']), - 'secrets': !exists(json, 'secrets') ? undefined : json['secrets'], - }; -} - -export function UpdateTargetRequestTargetToJSON(value?: UpdateTargetRequestTarget | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'label': value.label, - 'type': value.type, - 'metadata': CreateTargetRequestMetadataToJSON(value.metadata), - 'secrets': value.secrets, - }; -} - diff --git a/generated-sources/api/src/models/UpdateTopicRequest.ts b/generated-sources/api/src/models/UpdateTopicRequest.ts index 4d520116e..665554816 100644 --- a/generated-sources/api/src/models/UpdateTopicRequest.ts +++ b/generated-sources/api/src/models/UpdateTopicRequest.ts @@ -20,11 +20,11 @@ import { exists, mapValues } from '../runtime'; */ export interface UpdateTopicRequest { /** - * A human-readable label for the topic. + * A human-readable name for the topic. * @type {string} * @memberof UpdateTopicRequest */ - label: string; + name: string; } /** @@ -32,7 +32,7 @@ export interface UpdateTopicRequest { */ export function instanceOfUpdateTopicRequest(value: object): boolean { let isInstance = true; - isInstance = isInstance && "label" in value; + isInstance = isInstance && "name" in value; return isInstance; } @@ -47,7 +47,7 @@ export function UpdateTopicRequestFromJSONTyped(json: any, ignoreDiscriminator: } return { - 'label': json['label'], + 'name': json['name'], }; } @@ -60,7 +60,7 @@ export function UpdateTopicRequestToJSON(value?: UpdateTopicRequest | null): any } return { - 'label': value.label, + 'name': value.name, }; } diff --git a/generated-sources/api/src/models/UpsertMetadataRequest.ts b/generated-sources/api/src/models/UpsertMetadataRequest.ts index 8cec7cbca..f371d0173 100644 --- a/generated-sources/api/src/models/UpsertMetadataRequest.ts +++ b/generated-sources/api/src/models/UpsertMetadataRequest.ts @@ -26,6 +26,12 @@ import { * @interface UpsertMetadataRequest */ export interface UpsertMetadataRequest { + /** + * The ID that your app uses to identify the group of users for this request. + * @type {string} + * @memberof UpsertMetadataRequest + */ + groupRef: string; /** * Maps object names to field definitions * @type {{ [key: string]: Array; }} @@ -39,6 +45,7 @@ export interface UpsertMetadataRequest { */ export function instanceOfUpsertMetadataRequest(value: object): boolean { let isInstance = true; + isInstance = isInstance && "groupRef" in value; isInstance = isInstance && "fields" in value; return isInstance; @@ -54,6 +61,7 @@ export function UpsertMetadataRequestFromJSONTyped(json: any, ignoreDiscriminato } return { + 'groupRef': json['groupRef'], 'fields': json['fields'], }; } @@ -67,6 +75,7 @@ export function UpsertMetadataRequestToJSON(value?: UpsertMetadataRequest | null } return { + 'groupRef': value.groupRef, 'fields': value.fields, }; } diff --git a/generated-sources/api/src/models/WatchSchema.ts b/generated-sources/api/src/models/WatchSchema.ts new file mode 100644 index 000000000..ded48ebd9 --- /dev/null +++ b/generated-sources/api/src/models/WatchSchema.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +import type { WatchSchemaAllObjects } from './WatchSchemaAllObjects'; +import { + WatchSchemaAllObjectsFromJSON, + WatchSchemaAllObjectsFromJSONTyped, + WatchSchemaAllObjectsToJSON, +} from './WatchSchemaAllObjects'; + +/** + * Configuration for monitoring provider schema changes. + * @export + * @interface WatchSchema + */ +export interface WatchSchema { + /** + * The destination to send schema change notifications to. + * @type {string} + * @memberof WatchSchema + */ + destination: string; + /** + * Cron schedule for checking schema changes. Minimum frequency is once per hour. Defaults to once a day. + * @type {string} + * @memberof WatchSchema + */ + schedule?: string; + /** + * + * @type {WatchSchemaAllObjects} + * @memberof WatchSchema + */ + allObjects: WatchSchemaAllObjects; +} + +/** + * Check if a given object implements the WatchSchema interface. + */ +export function instanceOfWatchSchema(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "destination" in value; + isInstance = isInstance && "allObjects" in value; + + return isInstance; +} + +export function WatchSchemaFromJSON(json: any): WatchSchema { + return WatchSchemaFromJSONTyped(json, false); +} + +export function WatchSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchSchema { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'destination': json['destination'], + 'schedule': !exists(json, 'schedule') ? undefined : json['schedule'], + 'allObjects': WatchSchemaAllObjectsFromJSON(json['allObjects']), + }; +} + +export function WatchSchemaToJSON(value?: WatchSchema | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'destination': value.destination, + 'schedule': value.schedule, + 'allObjects': WatchSchemaAllObjectsToJSON(value.allObjects), + }; +} + diff --git a/generated-sources/api/src/models/WatchSchemaAllObjects.ts b/generated-sources/api/src/models/WatchSchemaAllObjects.ts new file mode 100644 index 000000000..a20ee1f2b --- /dev/null +++ b/generated-sources/api/src/models/WatchSchemaAllObjects.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Ampersand public API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.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 { exists, mapValues } from '../runtime'; +import type { FieldChangedEvent } from './FieldChangedEvent'; +import { + FieldChangedEventFromJSON, + FieldChangedEventFromJSONTyped, + FieldChangedEventToJSON, +} from './FieldChangedEvent'; +import type { FieldCreatedEvent } from './FieldCreatedEvent'; +import { + FieldCreatedEventFromJSON, + FieldCreatedEventFromJSONTyped, + FieldCreatedEventToJSON, +} from './FieldCreatedEvent'; +import type { FieldDeletedEvent } from './FieldDeletedEvent'; +import { + FieldDeletedEventFromJSON, + FieldDeletedEventFromJSONTyped, + FieldDeletedEventToJSON, +} from './FieldDeletedEvent'; + +/** + * Schema change event configuration for all objects in the integration. + * @export + * @interface WatchSchemaAllObjects + */ +export interface WatchSchemaAllObjects { + /** + * + * @type {FieldCreatedEvent} + * @memberof WatchSchemaAllObjects + */ + fieldCreated?: FieldCreatedEvent; + /** + * + * @type {FieldDeletedEvent} + * @memberof WatchSchemaAllObjects + */ + fieldDeleted?: FieldDeletedEvent; + /** + * + * @type {FieldChangedEvent} + * @memberof WatchSchemaAllObjects + */ + fieldChanged?: FieldChangedEvent; +} + +/** + * Check if a given object implements the WatchSchemaAllObjects interface. + */ +export function instanceOfWatchSchemaAllObjects(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function WatchSchemaAllObjectsFromJSON(json: any): WatchSchemaAllObjects { + return WatchSchemaAllObjectsFromJSONTyped(json, false); +} + +export function WatchSchemaAllObjectsFromJSONTyped(json: any, ignoreDiscriminator: boolean): WatchSchemaAllObjects { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'fieldCreated': !exists(json, 'fieldCreated') ? undefined : FieldCreatedEventFromJSON(json['fieldCreated']), + 'fieldDeleted': !exists(json, 'fieldDeleted') ? undefined : FieldDeletedEventFromJSON(json['fieldDeleted']), + 'fieldChanged': !exists(json, 'fieldChanged') ? undefined : FieldChangedEventFromJSON(json['fieldChanged']), + }; +} + +export function WatchSchemaAllObjectsToJSON(value?: WatchSchemaAllObjects | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'fieldCreated': FieldCreatedEventToJSON(value.fieldCreated), + 'fieldDeleted': FieldDeletedEventToJSON(value.fieldDeleted), + 'fieldChanged': FieldChangedEventToJSON(value.fieldChanged), + }; +} + diff --git a/generated-sources/api/src/models/index.ts b/generated-sources/api/src/models/index.ts index 64d3fa329..c9a396211 100644 --- a/generated-sources/api/src/models/index.ts +++ b/generated-sources/api/src/models/index.ts @@ -65,11 +65,8 @@ export * from './CreateOrgRequest'; export * from './CreateProjectRequest'; export * from './CreateProviderAppRequest'; export * from './CreateRevisionRequest'; -export * from './CreateTargetRequest'; -export * from './CreateTargetRequestMetadata'; export * from './CreateTopicDestinationRouteRequest'; export * from './CreateTopicRequest'; -export * from './CreateTopicTargetRouteRequest'; export * from './CustomAuthHeader'; export * from './CustomAuthInput'; export * from './CustomAuthOpts'; @@ -83,7 +80,10 @@ export * from './DestinationMetadata'; export * from './DestinationSecrets'; export * from './DynamicMappingsInputEntry'; export * from './DynamicMappingsInputMappedValue'; +export * from './FieldChangedEvent'; +export * from './FieldCreatedEvent'; export * from './FieldDefinition'; +export * from './FieldDeletedEvent'; export * from './FieldMetadata'; export * from './FieldSetting'; export * from './FieldSettingDefault'; @@ -116,6 +116,7 @@ export * from './IntegrationSubscribeObject'; export * from './IntegrationWrite'; export * from './IntegrationWriteObject'; export * from './Invite'; +export * from './JSONPatchOperation'; export * from './JWTKey'; export * from './JWTKeyResponse'; export * from './ListOperations200Response'; @@ -128,9 +129,6 @@ export * from './MetadataItemInput'; export * from './MetadataItemPostAuthentication'; export * from './ModuleInfo'; export * from './NotificationEventTopicRoute'; -export * from './NotificationTarget'; -export * from './NotificationTargetMetadata'; -export * from './NotificationTopicTargetRoute'; export * from './NumericFieldOptions'; export * from './Oauth2AuthorizationCode'; export * from './Oauth2AuthorizationCodeAccessToken'; @@ -149,6 +147,10 @@ export * from './PatchApiKeyRequest'; export * from './PatchApiKeyRequestApiKey'; export * from './PatchJWTKeyRequest'; export * from './PatchJWTKeyRequestJwtKey'; +export * from './PatchObjectConfigContentRequest'; +export * from './PatchObjectConfigContentRequestAllOf'; +export * from './PatchObjectConfigContentRequestAllOfOneOf'; +export * from './PatchObjectConfigContentRequestAllOfOneOf1'; export * from './Problem'; export * from './Project'; export * from './ProjectEntitlements'; @@ -190,8 +192,6 @@ export * from './UpdateProjectRequest'; export * from './UpdateProjectRequestProject'; export * from './UpdateProviderAppRequest'; export * from './UpdateProviderAppRequestProviderApp'; -export * from './UpdateTargetRequest'; -export * from './UpdateTargetRequestTarget'; export * from './UpdateTopicRequest'; export * from './UpsertMetadataRequest'; export * from './UpsertMetadataResponse'; @@ -200,6 +200,8 @@ export * from './ValueDefaultBoolean'; export * from './ValueDefaultInteger'; export * from './ValueDefaultString'; export * from './ValueDefaults'; +export * from './WatchSchema'; +export * from './WatchSchemaAllObjects'; export * from './WriteConfig'; export * from './WriteConfigAllOf'; export * from './WriteConfigObject';