Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions generated-sources/api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
88 changes: 88 additions & 0 deletions generated-sources/api/src/apis/InstallationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type {
CreateInstallationRequest,
InputValidationProblem,
Installation,
PatchObjectConfigContentRequest,
UpdateInstallationRequest,
} from '../models';
import {
Expand All @@ -30,6 +31,8 @@ import {
InputValidationProblemToJSON,
InstallationFromJSON,
InstallationToJSON,
PatchObjectConfigContentRequestFromJSON,
PatchObjectConfigContentRequestToJSON,
UpdateInstallationRequestFromJSON,
UpdateInstallationRequestToJSON,
} from '../models';
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -162,6 +172,25 @@ export interface InstallationApiInterface {
*/
listInstallationsForProject(requestParameters: ListInstallationsForProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Installation>>;

/**
* 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\&#39;s manifest for the specified action type (read, subscribe, or write). Common examples include: &#x60;account&#x60;, &#x60;contact&#x60;, &#x60;lead&#x60;, &#x60;opportunity&#x60; (for Salesforce), &#x60;deal&#x60;, &#x60;company&#x60; (for HubSpot), etc.
* @param {PatchObjectConfigContentRequest} patchObjectConfigContent
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof InstallationApiInterface
*/
patchObjectConfigContentRaw(requestParameters: PatchObjectConfigContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Installation>>;

/**
* 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<Installation>;

/**
* 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
Expand Down Expand Up @@ -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<runtime.ApiResponse<Installation>> {
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<Installation> {
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
Expand Down
10 changes: 8 additions & 2 deletions generated-sources/api/src/apis/IntegrationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -79,6 +79,7 @@ export interface IntegrationApiInterface {
batchUpsertIntegrationsRaw(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Integration>>>;

/**
* 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<Array<Integration>>;
Expand All @@ -100,7 +101,7 @@ export interface IntegrationApiInterface {
createIntegration(requestParameters: CreateIntegrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;

/**
*
* 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.
Expand All @@ -111,6 +112,7 @@ export interface IntegrationApiInterface {
deleteIntegrationRaw(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;

/**
* Delete an integration and all its installations.
* Delete an integration
*/
deleteIntegration(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
Expand Down Expand Up @@ -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<runtime.ApiResponse<Array<Integration>>> {
Expand Down Expand Up @@ -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<Array<Integration>> {
Expand Down Expand Up @@ -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<runtime.ApiResponse<void>> {
Expand Down Expand Up @@ -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<void> {
Expand Down
Loading