@amp-labs/react 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/generated-sources/api/src/apis/AllowedDomainApi.d.ts +79 -0
- package/build/generated-sources/api/src/apis/AllowedDomainApi.js +101 -0
- package/build/generated-sources/api/src/apis/ConnectionApi.d.ts +82 -0
- package/build/generated-sources/api/src/apis/ConnectionApi.js +107 -0
- package/build/generated-sources/api/src/apis/ConsumerApi.d.ts +52 -0
- package/build/generated-sources/api/src/apis/ConsumerApi.js +75 -0
- package/build/generated-sources/api/src/apis/DestinationApi.d.ts +102 -0
- package/build/generated-sources/api/src/apis/DestinationApi.js +126 -0
- package/build/generated-sources/api/src/apis/GroupApi.d.ts +52 -0
- package/build/generated-sources/api/src/apis/GroupApi.js +75 -0
- package/build/generated-sources/api/src/apis/InstallationApi.d.ts +196 -0
- package/build/generated-sources/api/src/apis/InstallationApi.js +235 -0
- package/build/generated-sources/api/src/apis/IntegrationApi.d.ts +128 -0
- package/build/generated-sources/api/src/apis/IntegrationApi.js +151 -0
- package/build/generated-sources/api/src/apis/OAuthApi.d.ts +76 -0
- package/build/generated-sources/api/src/apis/OAuthApi.js +102 -0
- package/build/generated-sources/api/src/apis/OperationApi.d.ts +80 -0
- package/build/generated-sources/api/src/apis/OperationApi.js +104 -0
- package/build/generated-sources/api/src/apis/OperationLogApi.d.ts +55 -0
- package/build/generated-sources/api/src/apis/OperationLogApi.js +76 -0
- package/build/generated-sources/api/src/apis/ProjectApi.d.ts +124 -0
- package/build/generated-sources/api/src/apis/ProjectApi.js +148 -0
- package/build/generated-sources/api/src/apis/ProjectMembershipApi.d.ts +126 -0
- package/build/generated-sources/api/src/apis/ProjectMembershipApi.js +154 -0
- package/build/generated-sources/api/src/apis/ProviderAppApi.d.ts +130 -0
- package/build/generated-sources/api/src/apis/ProviderAppApi.js +158 -0
- package/build/generated-sources/api/src/apis/RevisionApi.d.ts +87 -0
- package/build/generated-sources/api/src/apis/RevisionApi.js +113 -0
- package/build/generated-sources/api/src/apis/UploadURLApi.d.ts +46 -0
- package/build/generated-sources/api/src/apis/UploadURLApi.js +68 -0
- package/build/generated-sources/api/src/apis/index.d.ts +15 -1
- package/build/generated-sources/api/src/apis/index.js +15 -1
- package/build/generated-sources/api/src/models/BaseConfigContent.d.ts +7 -0
- package/build/generated-sources/api/src/models/BaseConfigContent.js +3 -0
- package/build/generated-sources/api/src/models/BaseProxyConfig.d.ts +31 -0
- package/build/generated-sources/api/src/models/BaseProxyConfig.js +50 -0
- package/build/generated-sources/api/src/models/ConfigContent.d.ts +7 -0
- package/build/generated-sources/api/src/models/ConfigContent.js +3 -0
- package/build/generated-sources/api/src/models/Destination.d.ts +44 -0
- package/build/generated-sources/api/src/models/Destination.js +57 -0
- package/build/generated-sources/api/src/models/DestinationMetadata.d.ts +39 -0
- package/build/generated-sources/api/src/models/{CreateDestinationRequestMetadata.js → DestinationMetadata.js} +11 -11
- package/build/generated-sources/api/src/models/HydratedIntegration.d.ts +7 -0
- package/build/generated-sources/api/src/models/HydratedIntegration.js +3 -0
- package/build/generated-sources/api/src/models/HydratedIntegrationProxy.d.ts +31 -0
- package/build/generated-sources/api/src/models/HydratedIntegrationProxy.js +50 -0
- package/build/generated-sources/api/src/models/ImportConnectionRequest.d.ts +1 -1
- package/build/generated-sources/api/src/models/Integration1.d.ts +7 -0
- package/build/generated-sources/api/src/models/Integration1.js +3 -0
- package/build/generated-sources/api/src/models/IntegrationProxy.d.ts +31 -0
- package/build/generated-sources/api/src/models/IntegrationProxy.js +50 -0
- package/build/generated-sources/api/src/models/OauthConnectRequest.d.ts +6 -6
- package/build/generated-sources/api/src/models/OauthConnectRequest.js +1 -2
- package/build/generated-sources/api/src/models/Operation.d.ts +26 -9
- package/build/generated-sources/api/src/models/Operation.js +14 -7
- package/build/generated-sources/api/src/models/OperationLog.d.ts +43 -0
- package/build/generated-sources/api/src/models/OperationLog.js +56 -0
- package/build/generated-sources/api/src/models/ProviderApp.d.ts +6 -0
- package/build/generated-sources/api/src/models/ProviderApp.js +2 -0
- package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.d.ts +7 -0
- package/build/generated-sources/api/src/models/UpdateInstallationConfigContent.js +3 -0
- package/build/generated-sources/api/src/models/index.d.ts +6 -3
- package/build/generated-sources/api/src/models/index.js +6 -3
- package/build/src/assets/SuccessIcon.d.ts +1 -0
- package/build/src/assets/SuccessIcon.js +8 -0
- package/build/src/assets/TrashIcon.js +3 -1
- package/build/src/components/Configure/InstallIntegration.d.ts +4 -1
- package/build/src/components/Configure/InstallIntegration.js +11 -23
- package/build/src/components/Configure/actions/createInstallationReducer.d.ts +15 -0
- package/build/src/components/Configure/actions/createInstallationReducer.js +30 -0
- package/build/src/components/Configure/actions/onSaveReadCreateInstallation.d.ts +3 -0
- package/build/src/components/Configure/actions/{onSaveCreate.js → onSaveReadCreateInstallation.js} +13 -25
- package/build/src/components/Configure/actions/onSaveReadUpdateInstallation.d.ts +3 -0
- package/build/src/components/Configure/actions/{onSaveUpdate.js → onSaveReadUpdateInstallation.js} +13 -8
- package/build/src/components/Configure/actions/proxy/createInstallationProxyOnly.d.ts +8 -0
- package/build/src/components/Configure/actions/proxy/createInstallationProxyOnly.js +44 -0
- package/build/src/components/Configure/actions/write/generateConfigWriteObjects.d.ts +26 -0
- package/build/src/components/Configure/actions/write/generateConfigWriteObjects.js +41 -0
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.d.ts +3 -0
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.js +72 -0
- package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.d.ts +3 -0
- package/build/src/components/Configure/actions/write/onSaveWriteUpdateInstallation.js +60 -0
- package/build/src/components/Configure/{ConfigureInstallationBase.d.ts → content/ConfigureInstallationBase.d.ts} +2 -1
- package/build/src/components/Configure/content/ConfigureInstallationBase.js +36 -0
- package/build/src/components/Configure/content/CreateInstallation.js +83 -0
- package/build/src/components/Configure/content/InstallationContent.d.ts +1 -0
- package/build/src/components/Configure/content/InstallationContent.js +20 -0
- package/build/src/components/Configure/{UninstallContent.js → content/UninstallContent.js} +10 -9
- package/build/src/components/Configure/{UpdateInstallation.d.ts → content/UpdateInstallation.d.ts} +1 -1
- package/build/src/components/Configure/{UpdateInstallation.js → content/UpdateInstallation.js} +42 -28
- package/build/src/components/Configure/{fields → content/fields}/FieldMappings/FieldMapping.d.ts +1 -1
- package/build/src/components/Configure/{fields → content/fields}/FieldMappings/FieldMapping.js +4 -7
- package/build/src/components/Configure/{fields → content/fields}/FieldMappings/RequiredFieldMappings.js +10 -11
- package/build/src/components/Configure/{fields → content/fields}/FieldMappings/setFieldMapping.d.ts +1 -1
- package/build/src/components/Configure/content/fields/FieldMappings/setFieldMapping.js +21 -0
- package/build/src/components/Configure/{fields → content/fields}/OptionalFields/OptionalFields.js +9 -14
- package/build/src/components/Configure/{fields → content/fields}/OptionalFields/setOptionalField.d.ts +1 -1
- package/build/src/components/Configure/content/fields/OptionalFields/setOptionalField.js +27 -0
- package/build/src/components/Configure/content/fields/ReadFields.d.ts +1 -0
- package/build/src/components/Configure/content/fields/ReadFields.js +11 -0
- package/build/src/components/Configure/content/fields/RequiredFields.js +23 -0
- package/build/src/components/Configure/content/fields/WriteFields/WriteFields.d.ts +1 -0
- package/build/src/components/Configure/content/fields/WriteFields/WriteFields.js +22 -0
- package/build/src/components/Configure/content/fields/WriteFields/index.d.ts +2 -0
- package/build/src/components/Configure/content/fields/WriteFields/index.js +5 -0
- package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.d.ts +3 -0
- package/build/src/components/Configure/content/fields/WriteFields/setNonConfigurableWriteField.js +32 -0
- package/build/src/components/Configure/content/useMutateInstallation.d.ts +23 -0
- package/build/src/components/Configure/content/useMutateInstallation.js +47 -0
- package/build/src/components/Configure/content/useSelectedConfigureState.d.ts +72 -0
- package/build/src/components/Configure/content/useSelectedConfigureState.js +24 -0
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.d.ts +11 -0
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js +67 -0
- package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.d.ts +5 -0
- package/build/src/components/Configure/layout/ConditionalProxyLayout/InstalledSuccessBox.js +11 -0
- package/build/src/components/Configure/{ProtectedConnectionLayout.d.ts → layout/ProtectedConnectionLayout.d.ts} +2 -1
- package/build/src/components/Configure/{ProtectedConnectionLayout.js → layout/ProtectedConnectionLayout.js} +13 -13
- package/build/src/components/Configure/{ObjectManagementNav → nav/ObjectManagementNav}/NavObjectItem.d.ts +1 -0
- package/build/src/components/Configure/{ObjectManagementNav → nav/ObjectManagementNav}/NavObjectItem.js +3 -3
- package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.d.ts +7 -0
- package/build/src/components/Configure/nav/ObjectManagementNav/OtherTab.js +11 -0
- package/build/src/components/Configure/{ObjectManagementNav → nav/ObjectManagementNav}/UninstallInstallation.d.ts +1 -1
- package/build/src/components/Configure/{ObjectManagementNav → nav/ObjectManagementNav}/UninstallInstallation.js +2 -2
- package/build/src/components/Configure/nav/ObjectManagementNav/constant.d.ts +1 -0
- package/build/src/components/Configure/nav/ObjectManagementNav/constant.js +4 -0
- package/build/src/components/Configure/{ObjectManagementNav → nav/ObjectManagementNav}/index.d.ts +1 -0
- package/build/src/components/Configure/nav/ObjectManagementNav/index.js +61 -0
- package/build/src/components/Configure/state/ConfigurationStateProvider.d.ts +70 -42
- package/build/src/components/Configure/state/ConfigurationStateProvider.js +39 -17
- package/build/src/components/Configure/state/HydratedRevisionContext.js +11 -9
- package/build/src/components/Configure/state/utils.d.ts +2 -2
- package/build/src/components/Configure/state/utils.js +44 -19
- package/build/src/components/Configure/types.d.ts +22 -6
- package/build/src/components/Configure/utils.d.ts +3 -2
- package/build/src/components/Configure/utils.js +25 -5
- package/build/src/components/Connect/ConnectProvider.d.ts +3 -1
- package/build/src/components/Connect/ConnectProvider.js +6 -12
- package/build/src/components/Connect/ConnectedSuccessBox.d.ts +5 -0
- package/build/src/components/Connect/ConnectedSuccessBox.js +13 -0
- package/build/src/components/Connect/useConnectionHandler.d.ts +10 -0
- package/build/src/components/Connect/useConnectionHandler.js +24 -0
- package/build/src/components/ErrorTextBox.js +11 -0
- package/build/src/components/Oauth/NoSubdomainEntry/LandingContent.d.ts +8 -0
- package/build/src/components/Oauth/{Hubspot/HubspotLandingContent.js → NoSubdomainEntry/LandingContent.js} +5 -4
- package/build/src/components/Oauth/NoSubdomainEntry/NoSubdomainOauthFlow.d.ts +16 -0
- package/build/src/components/Oauth/{Hubspot/HubspotOauthFlow.js → NoSubdomainEntry/NoSubdomainOauthFlow.js} +14 -14
- package/build/src/components/{Connect → Oauth}/OAuthPopup.js +8 -10
- package/build/src/components/Oauth/Salesforce/SalesforceOauthFlow.js +5 -5
- package/build/src/components/Oauth/Salesforce/SubdomainEntry.js +1 -1
- package/build/src/components/Oauth/fetchOAuthCallbackURL.d.ts +1 -1
- package/build/src/components/Oauth/fetchOAuthCallbackURL.js +3 -4
- package/build/src/components/RedirectHandler/RedirectHandler.d.ts +15 -0
- package/build/src/components/RedirectHandler/RedirectHandler.js +31 -0
- package/build/src/components/RedirectHandler/index.d.ts +1 -0
- package/build/src/components/RedirectHandler/index.js +5 -0
- package/build/src/components/SuccessTextBox.d.ts +5 -0
- package/build/src/components/SuccessTextBox.js +10 -0
- package/build/src/{components/AmpersandProvider/AmpersandProvider.js → context/AmpersandContextProvider/AmpersandContextProvider.js} +6 -6
- package/build/src/context/AmpersandContextProvider/index.d.ts +1 -0
- package/build/src/{components/AmpersandProvider → context/AmpersandContextProvider}/index.js +1 -1
- package/build/src/context/{ConnectionsContext.js → ConnectionsContextProvider.js} +11 -10
- package/build/src/context/{InstallIntegrationContext.d.ts → InstallIntegrationContextProvider.d.ts} +7 -2
- package/build/src/context/{InstallIntegrationContext.js → InstallIntegrationContextProvider.js} +29 -14
- package/build/src/context/{IntegrationListContext.js → IntegrationListContextProvider.js} +4 -4
- package/build/src/context/{ProjectContext.js → ProjectContextProvider.js} +4 -4
- package/build/src/hooks/useIsIntegrationInstalled.js +7 -7
- package/build/src/index.d.ts +1 -2
- package/build/src/index.js +1 -2
- package/build/src/public/index.d.ts +7 -0
- package/build/src/{components → public}/index.js +7 -3
- package/build/src/services/ApiService.d.ts +27 -0
- package/build/src/services/ApiService.js +34 -0
- package/build/src/services/api.d.ts +5 -4
- package/build/src/services/api.js +26 -19
- package/package.json +2 -2
- package/build/generated-sources/api/src/apis/DefaultApi.d.ts +0 -930
- package/build/generated-sources/api/src/apis/DefaultApi.js +0 -1019
- package/build/generated-sources/api/src/models/CreateDestinationRequest.d.ts +0 -44
- package/build/generated-sources/api/src/models/CreateDestinationRequest.js +0 -57
- package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.d.ts +0 -39
- package/build/generated-sources/api/src/models/OperationError.d.ts +0 -49
- package/build/generated-sources/api/src/models/OperationError.js +0 -56
- package/build/src/components/AmpersandProvider/index.d.ts +0 -1
- package/build/src/components/CenteredTextBox/CenteredTextBox.d.ts +0 -5
- package/build/src/components/CenteredTextBox/CenteredTextBox.js +0 -8
- package/build/src/components/Configure/ConfigureInstallationBase.js +0 -29
- package/build/src/components/Configure/CreateInstallation.js +0 -70
- package/build/src/components/Configure/ErrorTextBox.js +0 -9
- package/build/src/components/Configure/ObjectManagementNav/index.js +0 -53
- package/build/src/components/Configure/actions/onSaveCreate.d.ts +0 -3
- package/build/src/components/Configure/actions/onSaveUpdate.d.ts +0 -3
- package/build/src/components/Configure/fields/FieldMappings/setFieldMapping.js +0 -18
- package/build/src/components/Configure/fields/OptionalFields/setOptionalField.js +0 -21
- package/build/src/components/Configure/fields/RequiredFields.js +0 -27
- package/build/src/components/Oauth/Hubspot/HubspotLandingContent.d.ts +0 -7
- package/build/src/components/Oauth/Hubspot/HubspotOauthFlow.d.ts +0 -15
- package/build/src/components/index.d.ts +0 -3
- /package/build/src/components/Configure/{CreateInstallation.d.ts → content/CreateInstallation.d.ts} +0 -0
- /package/build/src/components/Configure/{UninstallContent.d.ts → content/UninstallContent.d.ts} +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/FieldHeader.d.ts +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/FieldHeader.js +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/FieldMappings/RequiredFieldMappings.d.ts +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/FieldMappings/index.d.ts +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/FieldMappings/index.js +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/OptionalFields/OptionalFields.d.ts +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/OptionalFields/index.d.ts +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/OptionalFields/index.js +0 -0
- /package/build/src/components/Configure/{fields → content/fields}/RequiredFields.d.ts +0 -0
- /package/build/src/components/{Configure/ErrorTextBox.d.ts → ErrorTextBox.d.ts} +0 -0
- /package/build/src/components/{Connect → Oauth}/OAuthPopup.d.ts +0 -0
- /package/build/src/{components/AmpersandProvider/AmpersandProvider.d.ts → context/AmpersandContextProvider/AmpersandContextProvider.d.ts} +0 -0
- /package/build/src/context/{ApiKeyProvider.d.ts → ApiKeyContextProvider.d.ts} +0 -0
- /package/build/src/context/{ApiKeyProvider.js → ApiKeyContextProvider.js} +0 -0
- /package/build/src/context/{ConnectionsContext.d.ts → ConnectionsContextProvider.d.ts} +0 -0
- /package/build/src/context/{IntegrationListContext.d.ts → IntegrationListContextProvider.d.ts} +0 -0
- /package/build/src/context/{ProjectContext.d.ts → ProjectContextProvider.d.ts} +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Ampersand public API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.InstallationApi = void 0;
|
|
40
|
+
const runtime = __importStar(require("../runtime"));
|
|
41
|
+
const models_1 = require("../models");
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
class InstallationApi extends runtime.BaseAPI {
|
|
46
|
+
/**
|
|
47
|
+
* Create a new installation
|
|
48
|
+
*/
|
|
49
|
+
async createInstallationRaw(requestParameters, initOverrides) {
|
|
50
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
51
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling createInstallation.');
|
|
52
|
+
}
|
|
53
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
54
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling createInstallation.');
|
|
55
|
+
}
|
|
56
|
+
if (requestParameters.installation === null || requestParameters.installation === undefined) {
|
|
57
|
+
throw new runtime.RequiredError('installation', 'Required parameter requestParameters.installation was null or undefined when calling createInstallation.');
|
|
58
|
+
}
|
|
59
|
+
const queryParameters = {};
|
|
60
|
+
const headerParameters = {};
|
|
61
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
62
|
+
const response = await this.request({
|
|
63
|
+
path: `/projects/{projectId}/integrations/{integrationId}/installations`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))),
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: headerParameters,
|
|
66
|
+
query: queryParameters,
|
|
67
|
+
body: (0, models_1.CreateInstallationRequestToJSON)(requestParameters.installation),
|
|
68
|
+
}, initOverrides);
|
|
69
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.InstallationFromJSON)(jsonValue));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a new installation
|
|
73
|
+
*/
|
|
74
|
+
async createInstallation(requestParameters, initOverrides) {
|
|
75
|
+
const response = await this.createInstallationRaw(requestParameters, initOverrides);
|
|
76
|
+
return await response.value();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Delete an installation
|
|
80
|
+
*/
|
|
81
|
+
async deleteInstallationRaw(requestParameters, initOverrides) {
|
|
82
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
83
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling deleteInstallation.');
|
|
84
|
+
}
|
|
85
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
86
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling deleteInstallation.');
|
|
87
|
+
}
|
|
88
|
+
if (requestParameters.installationId === null || requestParameters.installationId === undefined) {
|
|
89
|
+
throw new runtime.RequiredError('installationId', 'Required parameter requestParameters.installationId was null or undefined when calling deleteInstallation.');
|
|
90
|
+
}
|
|
91
|
+
const queryParameters = {};
|
|
92
|
+
const headerParameters = {};
|
|
93
|
+
const response = await this.request({
|
|
94
|
+
path: `/projects/{projectId}/integrations/{integrationId}/installations/{installationId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))).replace(`{${"installationId"}}`, encodeURIComponent(String(requestParameters.installationId))),
|
|
95
|
+
method: 'DELETE',
|
|
96
|
+
headers: headerParameters,
|
|
97
|
+
query: queryParameters,
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
return new runtime.VoidApiResponse(response);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Delete an installation
|
|
103
|
+
*/
|
|
104
|
+
async deleteInstallation(requestParameters, initOverrides) {
|
|
105
|
+
await this.deleteInstallationRaw(requestParameters, initOverrides);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get an installation
|
|
109
|
+
*/
|
|
110
|
+
async getInstallationRaw(requestParameters, initOverrides) {
|
|
111
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
112
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getInstallation.');
|
|
113
|
+
}
|
|
114
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
115
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling getInstallation.');
|
|
116
|
+
}
|
|
117
|
+
if (requestParameters.installationId === null || requestParameters.installationId === undefined) {
|
|
118
|
+
throw new runtime.RequiredError('installationId', 'Required parameter requestParameters.installationId was null or undefined when calling getInstallation.');
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
const response = await this.request({
|
|
123
|
+
path: `/projects/{projectId}/integrations/{integrationId}/installations/{installationId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))).replace(`{${"installationId"}}`, encodeURIComponent(String(requestParameters.installationId))),
|
|
124
|
+
method: 'GET',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
}, initOverrides);
|
|
128
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.InstallationFromJSON)(jsonValue));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get an installation
|
|
132
|
+
*/
|
|
133
|
+
async getInstallation(requestParameters, initOverrides) {
|
|
134
|
+
const response = await this.getInstallationRaw(requestParameters, initOverrides);
|
|
135
|
+
return await response.value();
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Import an existing installation
|
|
139
|
+
*/
|
|
140
|
+
async importInstallationRaw(requestParameters, initOverrides) {
|
|
141
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
142
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling importInstallation.');
|
|
143
|
+
}
|
|
144
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
145
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling importInstallation.');
|
|
146
|
+
}
|
|
147
|
+
if (requestParameters.installation === null || requestParameters.installation === undefined) {
|
|
148
|
+
throw new runtime.RequiredError('installation', 'Required parameter requestParameters.installation was null or undefined when calling importInstallation.');
|
|
149
|
+
}
|
|
150
|
+
const queryParameters = {};
|
|
151
|
+
const headerParameters = {};
|
|
152
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
153
|
+
const response = await this.request({
|
|
154
|
+
path: `/projects/{projectId}/integrations/{integrationId}/installations:import`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))),
|
|
155
|
+
method: 'POST',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters,
|
|
158
|
+
body: (0, models_1.ImportInstallationRequestToJSON)(requestParameters.installation),
|
|
159
|
+
}, initOverrides);
|
|
160
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.InstallationFromJSON)(jsonValue));
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Import an existing installation
|
|
164
|
+
*/
|
|
165
|
+
async importInstallation(requestParameters, initOverrides) {
|
|
166
|
+
const response = await this.importInstallationRaw(requestParameters, initOverrides);
|
|
167
|
+
return await response.value();
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* List installations
|
|
171
|
+
*/
|
|
172
|
+
async listInstallationsRaw(requestParameters, initOverrides) {
|
|
173
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
174
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling listInstallations.');
|
|
175
|
+
}
|
|
176
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
177
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling listInstallations.');
|
|
178
|
+
}
|
|
179
|
+
const queryParameters = {};
|
|
180
|
+
if (requestParameters.groupRef !== undefined) {
|
|
181
|
+
queryParameters['groupRef'] = requestParameters.groupRef;
|
|
182
|
+
}
|
|
183
|
+
const headerParameters = {};
|
|
184
|
+
const response = await this.request({
|
|
185
|
+
path: `/projects/{projectId}/integrations/{integrationId}/installations`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))),
|
|
186
|
+
method: 'GET',
|
|
187
|
+
headers: headerParameters,
|
|
188
|
+
query: queryParameters,
|
|
189
|
+
}, initOverrides);
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(models_1.InstallationFromJSON));
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* List installations
|
|
194
|
+
*/
|
|
195
|
+
async listInstallations(requestParameters, initOverrides) {
|
|
196
|
+
const response = await this.listInstallationsRaw(requestParameters, initOverrides);
|
|
197
|
+
return await response.value();
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Update an installation
|
|
201
|
+
*/
|
|
202
|
+
async updateInstallationRaw(requestParameters, initOverrides) {
|
|
203
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
204
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateInstallation.');
|
|
205
|
+
}
|
|
206
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
207
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling updateInstallation.');
|
|
208
|
+
}
|
|
209
|
+
if (requestParameters.installationId === null || requestParameters.installationId === undefined) {
|
|
210
|
+
throw new runtime.RequiredError('installationId', 'Required parameter requestParameters.installationId was null or undefined when calling updateInstallation.');
|
|
211
|
+
}
|
|
212
|
+
if (requestParameters.installationUpdate === null || requestParameters.installationUpdate === undefined) {
|
|
213
|
+
throw new runtime.RequiredError('installationUpdate', 'Required parameter requestParameters.installationUpdate was null or undefined when calling updateInstallation.');
|
|
214
|
+
}
|
|
215
|
+
const queryParameters = {};
|
|
216
|
+
const headerParameters = {};
|
|
217
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
218
|
+
const response = await this.request({
|
|
219
|
+
path: `/projects/{projectId}/integrations/{integrationId}/installations/{installationId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))).replace(`{${"installationId"}}`, encodeURIComponent(String(requestParameters.installationId))),
|
|
220
|
+
method: 'PATCH',
|
|
221
|
+
headers: headerParameters,
|
|
222
|
+
query: queryParameters,
|
|
223
|
+
body: (0, models_1.UpdateInstallationRequestToJSON)(requestParameters.installationUpdate),
|
|
224
|
+
}, initOverrides);
|
|
225
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.InstallationFromJSON)(jsonValue));
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Update an installation
|
|
229
|
+
*/
|
|
230
|
+
async updateInstallation(requestParameters, initOverrides) {
|
|
231
|
+
const response = await this.updateInstallationRaw(requestParameters, initOverrides);
|
|
232
|
+
return await response.value();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
exports.InstallationApi = InstallationApi;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ampersand public API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { BatchUpsertIntegrationsRequest, CreateIntegrationRequest, Integration } from '../models';
|
|
14
|
+
export interface BatchUpsertIntegrationsOperationRequest {
|
|
15
|
+
projectId: string;
|
|
16
|
+
batchUpsertIntegrationsRequest?: BatchUpsertIntegrationsRequest;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateIntegrationOperationRequest {
|
|
19
|
+
projectId: string;
|
|
20
|
+
integration: CreateIntegrationRequest;
|
|
21
|
+
}
|
|
22
|
+
export interface DeleteIntegrationRequest {
|
|
23
|
+
projectId: string;
|
|
24
|
+
integrationId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ListIntegrationsRequest {
|
|
27
|
+
projectId: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* IntegrationApi - interface
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
* @interface IntegrationApiInterface
|
|
34
|
+
*/
|
|
35
|
+
export interface IntegrationApiInterface {
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @summary Batch upsert a group of integrations
|
|
39
|
+
* @param {string} projectId
|
|
40
|
+
* @param {BatchUpsertIntegrationsRequest} [batchUpsertIntegrationsRequest]
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
* @memberof IntegrationApiInterface
|
|
44
|
+
*/
|
|
45
|
+
batchUpsertIntegrationsRaw(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Integration>>>;
|
|
46
|
+
/**
|
|
47
|
+
* Batch upsert a group of integrations
|
|
48
|
+
*/
|
|
49
|
+
batchUpsertIntegrations(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Integration>>;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @summary Create a new integration
|
|
53
|
+
* @param {string} projectId
|
|
54
|
+
* @param {CreateIntegrationRequest} integration
|
|
55
|
+
* @param {*} [options] Override http request option.
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
* @memberof IntegrationApiInterface
|
|
58
|
+
*/
|
|
59
|
+
createIntegrationRaw(requestParameters: CreateIntegrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
60
|
+
/**
|
|
61
|
+
* Create a new integration
|
|
62
|
+
*/
|
|
63
|
+
createIntegration(requestParameters: CreateIntegrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @summary Delete an integration
|
|
67
|
+
* @param {string} projectId
|
|
68
|
+
* @param {string} integrationId
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof IntegrationApiInterface
|
|
72
|
+
*/
|
|
73
|
+
deleteIntegrationRaw(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
74
|
+
/**
|
|
75
|
+
* Delete an integration
|
|
76
|
+
*/
|
|
77
|
+
deleteIntegration(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @summary List integrations
|
|
81
|
+
* @param {string} projectId
|
|
82
|
+
* @param {*} [options] Override http request option.
|
|
83
|
+
* @throws {RequiredError}
|
|
84
|
+
* @memberof IntegrationApiInterface
|
|
85
|
+
*/
|
|
86
|
+
listIntegrationsRaw(requestParameters: ListIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Integration>>>;
|
|
87
|
+
/**
|
|
88
|
+
* List integrations
|
|
89
|
+
*/
|
|
90
|
+
listIntegrations(requestParameters: ListIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Integration>>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
export declare class IntegrationApi extends runtime.BaseAPI implements IntegrationApiInterface {
|
|
96
|
+
/**
|
|
97
|
+
* Batch upsert a group of integrations
|
|
98
|
+
*/
|
|
99
|
+
batchUpsertIntegrationsRaw(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Integration>>>;
|
|
100
|
+
/**
|
|
101
|
+
* Batch upsert a group of integrations
|
|
102
|
+
*/
|
|
103
|
+
batchUpsertIntegrations(requestParameters: BatchUpsertIntegrationsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Integration>>;
|
|
104
|
+
/**
|
|
105
|
+
* Create a new integration
|
|
106
|
+
*/
|
|
107
|
+
createIntegrationRaw(requestParameters: CreateIntegrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
108
|
+
/**
|
|
109
|
+
* Create a new integration
|
|
110
|
+
*/
|
|
111
|
+
createIntegration(requestParameters: CreateIntegrationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Delete an integration
|
|
114
|
+
*/
|
|
115
|
+
deleteIntegrationRaw(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
116
|
+
/**
|
|
117
|
+
* Delete an integration
|
|
118
|
+
*/
|
|
119
|
+
deleteIntegration(requestParameters: DeleteIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* List integrations
|
|
122
|
+
*/
|
|
123
|
+
listIntegrationsRaw(requestParameters: ListIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Integration>>>;
|
|
124
|
+
/**
|
|
125
|
+
* List integrations
|
|
126
|
+
*/
|
|
127
|
+
listIntegrations(requestParameters: ListIntegrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Integration>>;
|
|
128
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Ampersand public API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.IntegrationApi = void 0;
|
|
40
|
+
const runtime = __importStar(require("../runtime"));
|
|
41
|
+
const models_1 = require("../models");
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
class IntegrationApi extends runtime.BaseAPI {
|
|
46
|
+
/**
|
|
47
|
+
* Batch upsert a group of integrations
|
|
48
|
+
*/
|
|
49
|
+
async batchUpsertIntegrationsRaw(requestParameters, initOverrides) {
|
|
50
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
51
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling batchUpsertIntegrations.');
|
|
52
|
+
}
|
|
53
|
+
const queryParameters = {};
|
|
54
|
+
const headerParameters = {};
|
|
55
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
56
|
+
const response = await this.request({
|
|
57
|
+
path: `/projects/{projectId}/integrations:batch`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
|
|
58
|
+
method: 'PUT',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
body: (0, models_1.BatchUpsertIntegrationsRequestToJSON)(requestParameters.batchUpsertIntegrationsRequest),
|
|
62
|
+
}, initOverrides);
|
|
63
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(models_1.IntegrationFromJSON));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Batch upsert a group of integrations
|
|
67
|
+
*/
|
|
68
|
+
async batchUpsertIntegrations(requestParameters, initOverrides) {
|
|
69
|
+
const response = await this.batchUpsertIntegrationsRaw(requestParameters, initOverrides);
|
|
70
|
+
return await response.value();
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Create a new integration
|
|
74
|
+
*/
|
|
75
|
+
async createIntegrationRaw(requestParameters, initOverrides) {
|
|
76
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
77
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling createIntegration.');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters.integration === null || requestParameters.integration === undefined) {
|
|
80
|
+
throw new runtime.RequiredError('integration', 'Required parameter requestParameters.integration was null or undefined when calling createIntegration.');
|
|
81
|
+
}
|
|
82
|
+
const queryParameters = {};
|
|
83
|
+
const headerParameters = {};
|
|
84
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
85
|
+
const response = await this.request({
|
|
86
|
+
path: `/projects/{projectId}/integrations`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: headerParameters,
|
|
89
|
+
query: queryParameters,
|
|
90
|
+
body: (0, models_1.CreateIntegrationRequestToJSON)(requestParameters.integration),
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.VoidApiResponse(response);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Create a new integration
|
|
96
|
+
*/
|
|
97
|
+
async createIntegration(requestParameters, initOverrides) {
|
|
98
|
+
await this.createIntegrationRaw(requestParameters, initOverrides);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Delete an integration
|
|
102
|
+
*/
|
|
103
|
+
async deleteIntegrationRaw(requestParameters, initOverrides) {
|
|
104
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
105
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling deleteIntegration.');
|
|
106
|
+
}
|
|
107
|
+
if (requestParameters.integrationId === null || requestParameters.integrationId === undefined) {
|
|
108
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter requestParameters.integrationId was null or undefined when calling deleteIntegration.');
|
|
109
|
+
}
|
|
110
|
+
const queryParameters = {};
|
|
111
|
+
const headerParameters = {};
|
|
112
|
+
const response = await this.request({
|
|
113
|
+
path: `/projects/{projectId}/integrations/{integrationId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"integrationId"}}`, encodeURIComponent(String(requestParameters.integrationId))),
|
|
114
|
+
method: 'DELETE',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
}, initOverrides);
|
|
118
|
+
return new runtime.VoidApiResponse(response);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Delete an integration
|
|
122
|
+
*/
|
|
123
|
+
async deleteIntegration(requestParameters, initOverrides) {
|
|
124
|
+
await this.deleteIntegrationRaw(requestParameters, initOverrides);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* List integrations
|
|
128
|
+
*/
|
|
129
|
+
async listIntegrationsRaw(requestParameters, initOverrides) {
|
|
130
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
131
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling listIntegrations.');
|
|
132
|
+
}
|
|
133
|
+
const queryParameters = {};
|
|
134
|
+
const headerParameters = {};
|
|
135
|
+
const response = await this.request({
|
|
136
|
+
path: `/projects/{projectId}/integrations`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
|
|
137
|
+
method: 'GET',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
}, initOverrides);
|
|
141
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(models_1.IntegrationFromJSON));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* List integrations
|
|
145
|
+
*/
|
|
146
|
+
async listIntegrations(requestParameters, initOverrides) {
|
|
147
|
+
const response = await this.listIntegrationsRaw(requestParameters, initOverrides);
|
|
148
|
+
return await response.value();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.IntegrationApi = IntegrationApi;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ampersand public API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { OauthConnectRequest } from '../models';
|
|
14
|
+
export interface OauthConnectOperationRequest {
|
|
15
|
+
connectOAuthParams: OauthConnectRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* OAuthApi - interface
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface OAuthApiInterface
|
|
22
|
+
*/
|
|
23
|
+
export interface OAuthApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Generate a URL for the browser to render to kick off OAuth flow.
|
|
26
|
+
* @summary Get URL for OAuth flow
|
|
27
|
+
* @param {OauthConnectRequest} connectOAuthParams
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
* @memberof OAuthApiInterface
|
|
31
|
+
*/
|
|
32
|
+
oauthConnectRaw(requestParameters: OauthConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
33
|
+
/**
|
|
34
|
+
* Generate a URL for the browser to render to kick off OAuth flow.
|
|
35
|
+
* Get URL for OAuth flow
|
|
36
|
+
*/
|
|
37
|
+
oauthConnect(requestParameters: OauthConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Options endpoint for CORS preflight request
|
|
40
|
+
* @summary Options endpoint
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
* @memberof OAuthApiInterface
|
|
44
|
+
*/
|
|
45
|
+
oauthConnectCorsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
46
|
+
/**
|
|
47
|
+
* Options endpoint for CORS preflight request
|
|
48
|
+
* Options endpoint
|
|
49
|
+
*/
|
|
50
|
+
oauthConnectCors(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare class OAuthApi extends runtime.BaseAPI implements OAuthApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Generate a URL for the browser to render to kick off OAuth flow.
|
|
58
|
+
* Get URL for OAuth flow
|
|
59
|
+
*/
|
|
60
|
+
oauthConnectRaw(requestParameters: OauthConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
61
|
+
/**
|
|
62
|
+
* Generate a URL for the browser to render to kick off OAuth flow.
|
|
63
|
+
* Get URL for OAuth flow
|
|
64
|
+
*/
|
|
65
|
+
oauthConnect(requestParameters: OauthConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Options endpoint for CORS preflight request
|
|
68
|
+
* Options endpoint
|
|
69
|
+
*/
|
|
70
|
+
oauthConnectCorsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
71
|
+
/**
|
|
72
|
+
* Options endpoint for CORS preflight request
|
|
73
|
+
* Options endpoint
|
|
74
|
+
*/
|
|
75
|
+
oauthConnectCors(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
76
|
+
}
|