@amp-labs/react 1.4.3 → 1.5.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/OperationEventApi.d.ts +28 -0
- package/build/generated-sources/api/src/apis/OperationEventApi.js +30 -0
- package/build/generated-sources/api/src/apis/OrgApi.d.ts +226 -0
- package/build/generated-sources/api/src/apis/OrgApi.js +253 -0
- package/build/generated-sources/api/src/apis/ProjectApi.d.ts +4 -4
- package/build/generated-sources/api/src/apis/ProjectApi.js +3 -2
- package/build/generated-sources/api/src/apis/UserApi.d.ts +70 -0
- package/build/generated-sources/api/src/apis/{AllowedDomainApi.js → UserApi.js} +23 -30
- package/build/generated-sources/api/src/apis/index.d.ts +2 -2
- package/build/generated-sources/api/src/apis/index.js +2 -2
- package/build/generated-sources/api/src/models/AcceptInviteRequest.d.ts +31 -0
- package/build/generated-sources/api/src/models/AcceptInviteRequest.js +50 -0
- package/build/generated-sources/api/src/models/ApiProblem.d.ts +130 -0
- package/build/generated-sources/api/src/models/ApiProblem.js +82 -0
- package/build/generated-sources/api/src/models/AuthType.d.ts +1 -0
- package/build/generated-sources/api/src/models/AuthType.js +2 -1
- package/build/generated-sources/api/src/models/BaseReadConfig.d.ts +4 -4
- package/build/generated-sources/api/src/models/BaseReadConfig.js +3 -3
- package/build/generated-sources/api/src/models/{BaseReadConfigStandardObject.d.ts → BaseReadConfigObject.d.ts} +12 -12
- package/build/generated-sources/api/src/models/{BaseReadConfigStandardObject.js → BaseReadConfigObject.js} +11 -11
- package/build/generated-sources/api/src/models/Builder.d.ts +73 -0
- package/build/generated-sources/api/src/models/Builder.js +68 -0
- package/build/generated-sources/api/src/models/BuilderInfo.d.ts +48 -0
- package/build/generated-sources/api/src/models/BuilderInfo.js +59 -0
- package/build/generated-sources/api/src/models/BuilderInfoOrgRole.d.ts +58 -0
- package/build/generated-sources/api/src/models/BuilderInfoOrgRole.js +67 -0
- package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.d.ts +58 -0
- package/build/generated-sources/api/src/models/BuilderInfoProjectRolesValue.js +67 -0
- package/build/generated-sources/api/src/models/BulkWriteSupport.d.ts +49 -0
- package/build/generated-sources/api/src/models/BulkWriteSupport.js +59 -0
- package/build/generated-sources/api/src/models/CreateDestinationRequest.d.ts +1 -1
- package/build/generated-sources/api/src/models/CreateDestinationRequestMetadata.d.ts +1 -1
- package/build/generated-sources/api/src/models/CreateOrgInviteRequest.d.ts +31 -0
- package/build/generated-sources/api/src/models/CreateOrgInviteRequest.js +50 -0
- package/build/generated-sources/api/src/models/CreateOrgRequest.d.ts +31 -0
- package/build/generated-sources/api/src/models/CreateOrgRequest.js +50 -0
- package/build/generated-sources/api/src/models/CreateProjectRequest.d.ts +6 -0
- package/build/generated-sources/api/src/models/CreateProjectRequest.js +3 -0
- package/build/generated-sources/api/src/models/Destination.d.ts +3 -3
- package/build/generated-sources/api/src/models/Destination.js +3 -3
- package/build/generated-sources/api/src/models/HydratedIntegrationRead.d.ts +1 -1
- package/build/generated-sources/api/src/models/HydratedIntegrationRead.js +2 -2
- package/build/generated-sources/api/src/models/InputValidationIssue.d.ts +89 -0
- package/build/generated-sources/api/src/models/InputValidationIssue.js +75 -0
- package/build/generated-sources/api/src/models/InputValidationProblem.d.ts +68 -0
- package/build/generated-sources/api/src/models/InputValidationProblem.js +63 -0
- package/build/generated-sources/api/src/models/IntegrationRead.d.ts +1 -1
- package/build/generated-sources/api/src/models/IntegrationRead.js +2 -2
- package/build/generated-sources/api/src/models/Invite.d.ts +84 -0
- package/build/generated-sources/api/src/models/Invite.js +83 -0
- package/build/generated-sources/api/src/models/Log.d.ts +4 -3
- package/build/generated-sources/api/src/models/Log.js +3 -2
- package/build/generated-sources/api/src/models/LogMessage.d.ts +43 -0
- package/build/generated-sources/api/src/models/LogMessage.js +55 -0
- package/build/generated-sources/api/src/models/OauthOpts.d.ts +15 -0
- package/build/generated-sources/api/src/models/OauthOpts.js +12 -1
- package/build/generated-sources/api/src/models/Org.d.ts +55 -0
- package/build/generated-sources/api/src/models/Org.js +62 -0
- package/build/generated-sources/api/src/models/Problem.d.ts +63 -0
- package/build/generated-sources/api/src/models/Problem.js +60 -0
- package/build/generated-sources/api/src/models/Project.d.ts +6 -0
- package/build/generated-sources/api/src/models/Project.js +2 -0
- package/build/generated-sources/api/src/models/ProviderInfo.d.ts +12 -0
- package/build/generated-sources/api/src/models/ProviderInfo.js +5 -0
- package/build/generated-sources/api/src/models/Support.d.ts +3 -2
- package/build/generated-sources/api/src/models/Support.js +3 -2
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.d.ts +3 -3
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestination.js +3 -3
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.d.ts +39 -0
- package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.js +52 -0
- package/build/generated-sources/api/src/models/UpdateOrgRequest.d.ts +38 -0
- package/build/generated-sources/api/src/models/UpdateOrgRequest.js +54 -0
- package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.d.ts +31 -0
- package/build/generated-sources/api/src/models/UpdateOrgRequestOrg.js +50 -0
- package/build/generated-sources/api/src/models/index.d.ts +19 -2
- package/build/generated-sources/api/src/models/index.js +19 -2
- package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js +1 -1
- package/build/src/components/Configure/actions/read/onSaveReadCreateInstallation.js +3 -3
- package/build/src/components/Configure/actions/read/onSaveReadUpdateInstallation.js +1 -1
- package/build/src/components/Configure/actions/write/onSaveWriteCreateInstallation.js +2 -2
- package/build/src/components/Configure/content/UpdateInstallation.js +1 -1
- package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js +2 -2
- package/build/src/components/Configure/state/utils.js +3 -3
- package/build/src/components/Configure/utils.d.ts +1 -1
- package/build/src/components/Configure/utils.js +7 -7
- package/build/src/services/ApiService.d.ts +1 -3
- package/build/src/services/ApiService.js +0 -2
- package/build/src/services/version.d.ts +1 -1
- package/build/src/services/version.js +1 -1
- package/package.json +1 -1
- package/build/generated-sources/api/src/apis/AllowedDomainApi.d.ts +0 -79
- package/build/generated-sources/api/src/apis/ProjectMembershipApi.d.ts +0 -126
- package/build/generated-sources/api/src/apis/ProjectMembershipApi.js +0 -154
- package/build/generated-sources/api/src/models/UpsertProjectMembershipRequest.d.ts +0 -37
- package/build/generated-sources/api/src/models/UpsertProjectMembershipRequest.js +0 -53
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { UpdateDestinationRequestDestinationMetadata } from './UpdateDestinationRequestDestinationMetadata';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -24,10 +24,10 @@ export interface UpdateDestinationRequestDestination {
|
|
|
24
24
|
name?: string;
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
-
* @type {
|
|
27
|
+
* @type {UpdateDestinationRequestDestinationMetadata}
|
|
28
28
|
* @memberof UpdateDestinationRequestDestination
|
|
29
29
|
*/
|
|
30
|
-
metadata?:
|
|
30
|
+
metadata?: UpdateDestinationRequestDestinationMetadata;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Check if a given object implements the UpdateDestinationRequestDestination interface.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.UpdateDestinationRequestDestinationToJSON = exports.UpdateDestinationRequestDestinationFromJSONTyped = exports.UpdateDestinationRequestDestinationFromJSON = exports.instanceOfUpdateDestinationRequestDestination = void 0;
|
|
17
17
|
const runtime_1 = require("../runtime");
|
|
18
|
-
const
|
|
18
|
+
const UpdateDestinationRequestDestinationMetadata_1 = require("./UpdateDestinationRequestDestinationMetadata");
|
|
19
19
|
/**
|
|
20
20
|
* Check if a given object implements the UpdateDestinationRequestDestination interface.
|
|
21
21
|
*/
|
|
@@ -34,7 +34,7 @@ function UpdateDestinationRequestDestinationFromJSONTyped(json, ignoreDiscrimina
|
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
36
|
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
37
|
-
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0,
|
|
37
|
+
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, UpdateDestinationRequestDestinationMetadata_1.UpdateDestinationRequestDestinationMetadataFromJSON)(json['metadata']),
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
exports.UpdateDestinationRequestDestinationFromJSONTyped = UpdateDestinationRequestDestinationFromJSONTyped;
|
|
@@ -47,7 +47,7 @@ function UpdateDestinationRequestDestinationToJSON(value) {
|
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
49
49
|
'name': value.name,
|
|
50
|
-
'metadata': (0,
|
|
50
|
+
'metadata': (0, UpdateDestinationRequestDestinationMetadata_1.UpdateDestinationRequestDestinationMetadataToJSON)(value.metadata),
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
exports.UpdateDestinationRequestDestinationToJSON = UpdateDestinationRequestDestinationToJSON;
|
package/build/generated-sources/api/src/models/UpdateDestinationRequestDestinationMetadata.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UpdateDestinationRequestDestinationMetadata
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateDestinationRequestDestinationMetadata {
|
|
18
|
+
/**
|
|
19
|
+
* Webhook URL
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateDestinationRequestDestinationMetadata
|
|
22
|
+
*/
|
|
23
|
+
url?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Additional headers to add when Ampersand sends a webhook message
|
|
26
|
+
* @type {{ [key: string]: string; }}
|
|
27
|
+
* @memberof UpdateDestinationRequestDestinationMetadata
|
|
28
|
+
*/
|
|
29
|
+
headers?: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
} | null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the UpdateDestinationRequestDestinationMetadata interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfUpdateDestinationRequestDestinationMetadata(value: object): boolean;
|
|
37
|
+
export declare function UpdateDestinationRequestDestinationMetadataFromJSON(json: any): UpdateDestinationRequestDestinationMetadata;
|
|
38
|
+
export declare function UpdateDestinationRequestDestinationMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDestinationRequestDestinationMetadata;
|
|
39
|
+
export declare function UpdateDestinationRequestDestinationMetadataToJSON(value?: UpdateDestinationRequestDestinationMetadata | null): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateDestinationRequestDestinationMetadataToJSON = exports.UpdateDestinationRequestDestinationMetadataFromJSONTyped = exports.UpdateDestinationRequestDestinationMetadataFromJSON = exports.instanceOfUpdateDestinationRequestDestinationMetadata = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the UpdateDestinationRequestDestinationMetadata interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfUpdateDestinationRequestDestinationMetadata(value) {
|
|
22
|
+
let isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfUpdateDestinationRequestDestinationMetadata = instanceOfUpdateDestinationRequestDestinationMetadata;
|
|
26
|
+
function UpdateDestinationRequestDestinationMetadataFromJSON(json) {
|
|
27
|
+
return UpdateDestinationRequestDestinationMetadataFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.UpdateDestinationRequestDestinationMetadataFromJSON = UpdateDestinationRequestDestinationMetadataFromJSON;
|
|
30
|
+
function UpdateDestinationRequestDestinationMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'url': !(0, runtime_1.exists)(json, 'url') ? undefined : json['url'],
|
|
36
|
+
'headers': !(0, runtime_1.exists)(json, 'headers') ? undefined : json['headers'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.UpdateDestinationRequestDestinationMetadataFromJSONTyped = UpdateDestinationRequestDestinationMetadataFromJSONTyped;
|
|
40
|
+
function UpdateDestinationRequestDestinationMetadataToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'url': value.url,
|
|
49
|
+
'headers': value.headers,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.UpdateDestinationRequestDestinationMetadataToJSON = UpdateDestinationRequestDestinationMetadataToJSON;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 type { UpdateOrgRequestOrg } from './UpdateOrgRequestOrg';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UpdateOrgRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface UpdateOrgRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<string>}
|
|
22
|
+
* @memberof UpdateOrgRequest
|
|
23
|
+
*/
|
|
24
|
+
updateMask: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {UpdateOrgRequestOrg}
|
|
28
|
+
* @memberof UpdateOrgRequest
|
|
29
|
+
*/
|
|
30
|
+
org: UpdateOrgRequestOrg;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the UpdateOrgRequest interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfUpdateOrgRequest(value: object): boolean;
|
|
36
|
+
export declare function UpdateOrgRequestFromJSON(json: any): UpdateOrgRequest;
|
|
37
|
+
export declare function UpdateOrgRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrgRequest;
|
|
38
|
+
export declare function UpdateOrgRequestToJSON(value?: UpdateOrgRequest | null): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateOrgRequestToJSON = exports.UpdateOrgRequestFromJSONTyped = exports.UpdateOrgRequestFromJSON = exports.instanceOfUpdateOrgRequest = void 0;
|
|
17
|
+
const UpdateOrgRequestOrg_1 = require("./UpdateOrgRequestOrg");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the UpdateOrgRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfUpdateOrgRequest(value) {
|
|
22
|
+
let isInstance = true;
|
|
23
|
+
isInstance = isInstance && "updateMask" in value;
|
|
24
|
+
isInstance = isInstance && "org" in value;
|
|
25
|
+
return isInstance;
|
|
26
|
+
}
|
|
27
|
+
exports.instanceOfUpdateOrgRequest = instanceOfUpdateOrgRequest;
|
|
28
|
+
function UpdateOrgRequestFromJSON(json) {
|
|
29
|
+
return UpdateOrgRequestFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
exports.UpdateOrgRequestFromJSON = UpdateOrgRequestFromJSON;
|
|
32
|
+
function UpdateOrgRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if ((json === undefined) || (json === null)) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'updateMask': json['updateMask'],
|
|
38
|
+
'org': (0, UpdateOrgRequestOrg_1.UpdateOrgRequestOrgFromJSON)(json['org']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.UpdateOrgRequestFromJSONTyped = UpdateOrgRequestFromJSONTyped;
|
|
42
|
+
function UpdateOrgRequestToJSON(value) {
|
|
43
|
+
if (value === undefined) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
if (value === null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'updateMask': value.updateMask,
|
|
51
|
+
'org': (0, UpdateOrgRequestOrg_1.UpdateOrgRequestOrgToJSON)(value.org),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.UpdateOrgRequestToJSON = UpdateOrgRequestToJSON;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UpdateOrgRequestOrg
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateOrgRequestOrg {
|
|
18
|
+
/**
|
|
19
|
+
* The organization label.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateOrgRequestOrg
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UpdateOrgRequestOrg interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUpdateOrgRequestOrg(value: object): boolean;
|
|
29
|
+
export declare function UpdateOrgRequestOrgFromJSON(json: any): UpdateOrgRequestOrg;
|
|
30
|
+
export declare function UpdateOrgRequestOrgFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrgRequestOrg;
|
|
31
|
+
export declare function UpdateOrgRequestOrgToJSON(value?: UpdateOrgRequestOrg | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateOrgRequestOrgToJSON = exports.UpdateOrgRequestOrgFromJSONTyped = exports.UpdateOrgRequestOrgFromJSON = exports.instanceOfUpdateOrgRequestOrg = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the UpdateOrgRequestOrg interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfUpdateOrgRequestOrg(value) {
|
|
22
|
+
let isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfUpdateOrgRequestOrg = instanceOfUpdateOrgRequestOrg;
|
|
26
|
+
function UpdateOrgRequestOrgFromJSON(json) {
|
|
27
|
+
return UpdateOrgRequestOrgFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.UpdateOrgRequestOrgFromJSON = UpdateOrgRequestOrgFromJSON;
|
|
30
|
+
function UpdateOrgRequestOrgFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'label': !(0, runtime_1.exists)(json, 'label') ? undefined : json['label'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.UpdateOrgRequestOrgFromJSONTyped = UpdateOrgRequestOrgFromJSONTyped;
|
|
39
|
+
function UpdateOrgRequestOrgToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'label': value.label,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.UpdateOrgRequestOrgToJSON = UpdateOrgRequestOrgToJSON;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
export * from './AcceptInviteRequest';
|
|
1
2
|
export * from './ApiKey';
|
|
2
3
|
export * from './ApiKeyRequest';
|
|
4
|
+
export * from './ApiProblem';
|
|
3
5
|
export * from './AuthType';
|
|
4
6
|
export * from './BaseConfigContent';
|
|
5
7
|
export * from './BaseProxyConfig';
|
|
6
8
|
export * from './BaseReadConfig';
|
|
7
|
-
export * from './
|
|
9
|
+
export * from './BaseReadConfigObject';
|
|
8
10
|
export * from './BaseWriteConfig';
|
|
9
11
|
export * from './BaseWriteConfigObject';
|
|
10
12
|
export * from './BatchUpsertIntegrationsRequest';
|
|
13
|
+
export * from './Builder';
|
|
14
|
+
export * from './BuilderInfo';
|
|
15
|
+
export * from './BuilderInfoOrgRole';
|
|
16
|
+
export * from './BuilderInfoProjectRolesValue';
|
|
17
|
+
export * from './BulkWriteSupport';
|
|
11
18
|
export * from './Config';
|
|
12
19
|
export * from './ConfigContent';
|
|
13
20
|
export * from './ConfigContentAllOf';
|
|
@@ -21,6 +28,8 @@ export * from './CreateInstallationRequest';
|
|
|
21
28
|
export * from './CreateInstallationRequestConfig';
|
|
22
29
|
export * from './CreateIntegrationRequest';
|
|
23
30
|
export * from './CreateIntegrationRequestLatestRevision';
|
|
31
|
+
export * from './CreateOrgInviteRequest';
|
|
32
|
+
export * from './CreateOrgRequest';
|
|
24
33
|
export * from './CreateProjectRequest';
|
|
25
34
|
export * from './CreateProviderAppRequest';
|
|
26
35
|
export * from './Destination';
|
|
@@ -37,6 +46,8 @@ export * from './HydratedRevision';
|
|
|
37
46
|
export * from './ImportConnectionRequest';
|
|
38
47
|
export * from './ImportInstallationRequest';
|
|
39
48
|
export * from './ImportInstallationRequestConfig';
|
|
49
|
+
export * from './InputValidationIssue';
|
|
50
|
+
export * from './InputValidationProblem';
|
|
40
51
|
export * from './Installation';
|
|
41
52
|
export * from './Integration';
|
|
42
53
|
export * from './Integration1';
|
|
@@ -48,14 +59,18 @@ export * from './IntegrationProxy';
|
|
|
48
59
|
export * from './IntegrationRead';
|
|
49
60
|
export * from './IntegrationWrite';
|
|
50
61
|
export * from './IntegrationWriteObject';
|
|
62
|
+
export * from './Invite';
|
|
51
63
|
export * from './Log';
|
|
64
|
+
export * from './LogMessage';
|
|
52
65
|
export * from './OauthConnectRequest';
|
|
53
66
|
export * from './OauthOpts';
|
|
54
67
|
export * from './Operation';
|
|
55
68
|
export * from './OperationEvent';
|
|
56
69
|
export * from './OptionalFieldsAutoOption';
|
|
70
|
+
export * from './Org';
|
|
57
71
|
export * from './PatchApiKeyRequest';
|
|
58
72
|
export * from './PatchApiKeyRequestApiKey';
|
|
73
|
+
export * from './Problem';
|
|
59
74
|
export * from './Project';
|
|
60
75
|
export * from './ProjectMembership';
|
|
61
76
|
export * from './ProviderApp';
|
|
@@ -66,12 +81,14 @@ export * from './Support';
|
|
|
66
81
|
export * from './TokenMetadataFields';
|
|
67
82
|
export * from './UpdateDestinationRequest';
|
|
68
83
|
export * from './UpdateDestinationRequestDestination';
|
|
84
|
+
export * from './UpdateDestinationRequestDestinationMetadata';
|
|
69
85
|
export * from './UpdateInstallationConfigContent';
|
|
70
86
|
export * from './UpdateInstallationRequest';
|
|
71
87
|
export * from './UpdateInstallationRequestInstallation';
|
|
72
88
|
export * from './UpdateInstallationRequestInstallationConfig';
|
|
89
|
+
export * from './UpdateOrgRequest';
|
|
90
|
+
export * from './UpdateOrgRequestOrg';
|
|
73
91
|
export * from './UpdateProjectRequest';
|
|
74
92
|
export * from './UpdateProjectRequestProject';
|
|
75
93
|
export * from './UpdateProviderAppRequest';
|
|
76
94
|
export * from './UpdateProviderAppRequestProviderApp';
|
|
77
|
-
export * from './UpsertProjectMembershipRequest';
|
|
@@ -16,16 +16,23 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AcceptInviteRequest"), exports);
|
|
19
20
|
__exportStar(require("./ApiKey"), exports);
|
|
20
21
|
__exportStar(require("./ApiKeyRequest"), exports);
|
|
22
|
+
__exportStar(require("./ApiProblem"), exports);
|
|
21
23
|
__exportStar(require("./AuthType"), exports);
|
|
22
24
|
__exportStar(require("./BaseConfigContent"), exports);
|
|
23
25
|
__exportStar(require("./BaseProxyConfig"), exports);
|
|
24
26
|
__exportStar(require("./BaseReadConfig"), exports);
|
|
25
|
-
__exportStar(require("./
|
|
27
|
+
__exportStar(require("./BaseReadConfigObject"), exports);
|
|
26
28
|
__exportStar(require("./BaseWriteConfig"), exports);
|
|
27
29
|
__exportStar(require("./BaseWriteConfigObject"), exports);
|
|
28
30
|
__exportStar(require("./BatchUpsertIntegrationsRequest"), exports);
|
|
31
|
+
__exportStar(require("./Builder"), exports);
|
|
32
|
+
__exportStar(require("./BuilderInfo"), exports);
|
|
33
|
+
__exportStar(require("./BuilderInfoOrgRole"), exports);
|
|
34
|
+
__exportStar(require("./BuilderInfoProjectRolesValue"), exports);
|
|
35
|
+
__exportStar(require("./BulkWriteSupport"), exports);
|
|
29
36
|
__exportStar(require("./Config"), exports);
|
|
30
37
|
__exportStar(require("./ConfigContent"), exports);
|
|
31
38
|
__exportStar(require("./ConfigContentAllOf"), exports);
|
|
@@ -39,6 +46,8 @@ __exportStar(require("./CreateInstallationRequest"), exports);
|
|
|
39
46
|
__exportStar(require("./CreateInstallationRequestConfig"), exports);
|
|
40
47
|
__exportStar(require("./CreateIntegrationRequest"), exports);
|
|
41
48
|
__exportStar(require("./CreateIntegrationRequestLatestRevision"), exports);
|
|
49
|
+
__exportStar(require("./CreateOrgInviteRequest"), exports);
|
|
50
|
+
__exportStar(require("./CreateOrgRequest"), exports);
|
|
42
51
|
__exportStar(require("./CreateProjectRequest"), exports);
|
|
43
52
|
__exportStar(require("./CreateProviderAppRequest"), exports);
|
|
44
53
|
__exportStar(require("./Destination"), exports);
|
|
@@ -55,6 +64,8 @@ __exportStar(require("./HydratedRevision"), exports);
|
|
|
55
64
|
__exportStar(require("./ImportConnectionRequest"), exports);
|
|
56
65
|
__exportStar(require("./ImportInstallationRequest"), exports);
|
|
57
66
|
__exportStar(require("./ImportInstallationRequestConfig"), exports);
|
|
67
|
+
__exportStar(require("./InputValidationIssue"), exports);
|
|
68
|
+
__exportStar(require("./InputValidationProblem"), exports);
|
|
58
69
|
__exportStar(require("./Installation"), exports);
|
|
59
70
|
__exportStar(require("./Integration"), exports);
|
|
60
71
|
__exportStar(require("./Integration1"), exports);
|
|
@@ -66,14 +77,18 @@ __exportStar(require("./IntegrationProxy"), exports);
|
|
|
66
77
|
__exportStar(require("./IntegrationRead"), exports);
|
|
67
78
|
__exportStar(require("./IntegrationWrite"), exports);
|
|
68
79
|
__exportStar(require("./IntegrationWriteObject"), exports);
|
|
80
|
+
__exportStar(require("./Invite"), exports);
|
|
69
81
|
__exportStar(require("./Log"), exports);
|
|
82
|
+
__exportStar(require("./LogMessage"), exports);
|
|
70
83
|
__exportStar(require("./OauthConnectRequest"), exports);
|
|
71
84
|
__exportStar(require("./OauthOpts"), exports);
|
|
72
85
|
__exportStar(require("./Operation"), exports);
|
|
73
86
|
__exportStar(require("./OperationEvent"), exports);
|
|
74
87
|
__exportStar(require("./OptionalFieldsAutoOption"), exports);
|
|
88
|
+
__exportStar(require("./Org"), exports);
|
|
75
89
|
__exportStar(require("./PatchApiKeyRequest"), exports);
|
|
76
90
|
__exportStar(require("./PatchApiKeyRequestApiKey"), exports);
|
|
91
|
+
__exportStar(require("./Problem"), exports);
|
|
77
92
|
__exportStar(require("./Project"), exports);
|
|
78
93
|
__exportStar(require("./ProjectMembership"), exports);
|
|
79
94
|
__exportStar(require("./ProviderApp"), exports);
|
|
@@ -84,12 +99,14 @@ __exportStar(require("./Support"), exports);
|
|
|
84
99
|
__exportStar(require("./TokenMetadataFields"), exports);
|
|
85
100
|
__exportStar(require("./UpdateDestinationRequest"), exports);
|
|
86
101
|
__exportStar(require("./UpdateDestinationRequestDestination"), exports);
|
|
102
|
+
__exportStar(require("./UpdateDestinationRequestDestinationMetadata"), exports);
|
|
87
103
|
__exportStar(require("./UpdateInstallationConfigContent"), exports);
|
|
88
104
|
__exportStar(require("./UpdateInstallationRequest"), exports);
|
|
89
105
|
__exportStar(require("./UpdateInstallationRequestInstallation"), exports);
|
|
90
106
|
__exportStar(require("./UpdateInstallationRequestInstallationConfig"), exports);
|
|
107
|
+
__exportStar(require("./UpdateOrgRequest"), exports);
|
|
108
|
+
__exportStar(require("./UpdateOrgRequestOrg"), exports);
|
|
91
109
|
__exportStar(require("./UpdateProjectRequest"), exports);
|
|
92
110
|
__exportStar(require("./UpdateProjectRequestProject"), exports);
|
|
93
111
|
__exportStar(require("./UpdateProviderAppRequest"), exports);
|
|
94
112
|
__exportStar(require("./UpdateProviderAppRequestProviderApp"), exports);
|
|
95
|
-
__exportStar(require("./UpsertProjectMembershipRequest"), exports);
|
package/build/src/components/Configure/actions/mutateAndSetState/updateInstallationAndSetState.js
CHANGED
|
@@ -10,7 +10,7 @@ function updateInstallationAndSetState({ updateConfig, projectId, integrationId,
|
|
|
10
10
|
installationUpdate: {
|
|
11
11
|
// update mask will recurse to the object path and replace the object at the object path
|
|
12
12
|
// this example will replace the object at the object (i.e. accounts)
|
|
13
|
-
updateMask: [`config.content.read.
|
|
13
|
+
updateMask: [`config.content.read.objects.${selectedObjectName}`],
|
|
14
14
|
installation: {
|
|
15
15
|
config: updateConfig,
|
|
16
16
|
},
|
|
@@ -12,8 +12,8 @@ const isProxyEnabled_1 = require("../proxy/isProxyEnabled");
|
|
|
12
12
|
*/
|
|
13
13
|
const getObjectFromHydratedRevision = (hydratedRevision, objectName) => {
|
|
14
14
|
const readAction = hydratedRevision.content.read;
|
|
15
|
-
const
|
|
16
|
-
return
|
|
15
|
+
const objects = readAction === null || readAction === void 0 ? void 0 : readAction.objects;
|
|
16
|
+
return objects === null || objects === void 0 ? void 0 : objects.find((obj) => obj.objectName === objectName);
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* given a configureState, objectName, hyrdatedRevision, and consumerRef
|
|
@@ -45,7 +45,7 @@ const generateCreateReadConfigFromConfigureState = (configureState, objectName,
|
|
|
45
45
|
content: {
|
|
46
46
|
provider: hydratedRevision.content.provider,
|
|
47
47
|
read: {
|
|
48
|
-
|
|
48
|
+
objects: {
|
|
49
49
|
[objectName]: {
|
|
50
50
|
objectName,
|
|
51
51
|
schedule: obj.schedule,
|
|
@@ -27,7 +27,7 @@ const generateUpdateReadConfigFromConfigureState = (configureState, objectName,
|
|
|
27
27
|
const updateConfigObject = {
|
|
28
28
|
content: {
|
|
29
29
|
read: {
|
|
30
|
-
|
|
30
|
+
objects: {
|
|
31
31
|
[objectName]: {
|
|
32
32
|
objectName,
|
|
33
33
|
// these two fields are copied from previous config, otherwise they will override null
|
|
@@ -42,10 +42,10 @@ const generateCreateWriteConfigFromConfigureState = (configureState, hydratedRev
|
|
|
42
42
|
createdBy: `consumer:${consumerRef}`,
|
|
43
43
|
content: {
|
|
44
44
|
provider: hydratedRevision.content.provider,
|
|
45
|
-
// hack: need empty read.
|
|
45
|
+
// hack: need empty read.objects to be initialized for update read
|
|
46
46
|
// https://linear.app/ampersand/issue/ENG-780/bug-write-createupdate-installation-without-read
|
|
47
47
|
read: {
|
|
48
|
-
|
|
48
|
+
objects: {},
|
|
49
49
|
},
|
|
50
50
|
write: {
|
|
51
51
|
objects: configWriteObjects,
|
|
@@ -41,7 +41,7 @@ function UpdateInstallation({ installation, integrationObj }) {
|
|
|
41
41
|
}, [installation, resetState]);
|
|
42
42
|
const hydratedObject = (0, react_1.useMemo)(() => {
|
|
43
43
|
var _a, _b, _c;
|
|
44
|
-
const hydrated = (_c = (_b = (_a = hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.
|
|
44
|
+
const hydrated = (_c = (_b = (_a = hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.find((obj) => (obj === null || obj === void 0 ? void 0 : obj.objectName) === selectedObjectName);
|
|
45
45
|
return hydrated;
|
|
46
46
|
}, [hydratedRevision, selectedObjectName]);
|
|
47
47
|
const onSaveRead = () => {
|
package/build/src/components/Configure/layout/ConditionalProxyLayout/ConditionalProxyLayout.js
CHANGED
|
@@ -36,7 +36,7 @@ function ConditionalProxyLayout({ children }) {
|
|
|
36
36
|
const provider = (_a = hydratedRevision === null || hydratedRevision === void 0 ? void 0 : hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.provider;
|
|
37
37
|
const isProxyOnly = getIsProxyOnly(hydratedRevision);
|
|
38
38
|
(0, react_1.useEffect)(() => {
|
|
39
|
-
if (hydratedRevision && isProxyOnly && !installation && selectedConnection && apiKey && (integrationObj === null || integrationObj === void 0 ? void 0 : integrationObj.id)) {
|
|
39
|
+
if (!isLoading && hydratedRevision && isProxyOnly && !installation && selectedConnection && apiKey && (integrationObj === null || integrationObj === void 0 ? void 0 : integrationObj.id)) {
|
|
40
40
|
setCreateInstallLoading(true);
|
|
41
41
|
(0, onCreateInstallationProxyOnly_1.onCreateInstallationProxyOnly)({
|
|
42
42
|
apiKey,
|
|
@@ -55,7 +55,7 @@ function ConditionalProxyLayout({ children }) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
}, [hydratedRevision, isProxyOnly, installation,
|
|
58
|
-
selectedConnection, apiKey, projectId, integrationObj === null || integrationObj === void 0 ? void 0 : integrationObj.id, groupRef, consumerRef, setInstallation]);
|
|
58
|
+
selectedConnection, apiKey, projectId, integrationObj === null || integrationObj === void 0 ? void 0 : integrationObj.id, groupRef, consumerRef, setInstallation, isLoading]);
|
|
59
59
|
if (!integrationObj)
|
|
60
60
|
return (0, jsx_runtime_1.jsx)(ErrorTextBox_1.ErrorTextBox, { message: "We can't load the integration" });
|
|
61
61
|
if (isLoading)
|
|
@@ -17,15 +17,15 @@ const generateConfigurationStateRead = (readAction, objectName, config) => {
|
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
// refactor this section to be immutable at hydrated revision level
|
|
20
|
-
const object = (0, utils_1.
|
|
20
|
+
const object = (0, utils_1.getObjectFromAction)(readAction, objectName);
|
|
21
21
|
const requiredFields = object && (0, utils_1.getRequiredFieldsFromObject)(object);
|
|
22
22
|
const optionalFields = object && (0, utils_1.getOptionalFieldsFromObject)(object);
|
|
23
23
|
const requiredMapFields = object && (0, utils_1.getRequiredMapFieldsFromObject)(object);
|
|
24
24
|
/// //////////////////////////////////////////////////////////////////////
|
|
25
25
|
const allFields = (object === null || object === void 0 ? void 0 : object.allFields) || [];
|
|
26
26
|
const content = config === null || config === void 0 ? void 0 : config.content;
|
|
27
|
-
const readSelectedFields = ((_c = (_b = (_a = content === null || content === void 0 ? void 0 : content.read) === null || _a === void 0 ? void 0 : _a.
|
|
28
|
-
const selectedFieldMappings = ((_f = (_e = (_d = content === null || content === void 0 ? void 0 : content.read) === null || _d === void 0 ? void 0 : _d.
|
|
27
|
+
const readSelectedFields = ((_c = (_b = (_a = content === null || content === void 0 ? void 0 : content.read) === null || _a === void 0 ? void 0 : _a.objects) === null || _b === void 0 ? void 0 : _b[objectName]) === null || _c === void 0 ? void 0 : _c.selectedFields) || {};
|
|
28
|
+
const selectedFieldMappings = ((_f = (_e = (_d = content === null || content === void 0 ? void 0 : content.read) === null || _d === void 0 ? void 0 : _d.objects) === null || _e === void 0 ? void 0 : _e[objectName]) === null || _f === void 0 ? void 0 : _f.selectedFieldMappings) || {};
|
|
29
29
|
const optionalFieldsSaved = Object.assign({}, readSelectedFields);
|
|
30
30
|
const requiredMapFieldsSaved = Object.assign({}, selectedFieldMappings);
|
|
31
31
|
return {
|
|
@@ -14,7 +14,7 @@ export declare function isIntegrationFieldMapping(field: HydratedIntegrationFiel
|
|
|
14
14
|
* @param objectName string (account, contact, etc...)
|
|
15
15
|
* @returns HydratedIntegrationObject | null
|
|
16
16
|
*/
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function getObjectFromAction(action: HydratedIntegrationRead, objectName: string): HydratedIntegrationObject | null;
|
|
18
18
|
export declare function getRequiredFieldsFromObject(object: HydratedIntegrationObject): HydratedIntegrationField[] | null;
|
|
19
19
|
export declare function getRequiredMapFieldsFromObject(object: HydratedIntegrationObject): IntegrationFieldMapping[] | null;
|
|
20
20
|
export declare function getOptionalFieldsFromObject(object: HydratedIntegrationObject): HydratedIntegrationField[] | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateFieldMappings = exports.generateAllNavObjects = exports.generateOtherNavObject = exports.generateReadNavObjects = exports.getFieldKeyValue = exports.getReadObject = exports.getOptionalFieldsFromObject = exports.getRequiredMapFieldsFromObject = exports.getRequiredFieldsFromObject = exports.
|
|
3
|
+
exports.validateFieldMappings = exports.generateAllNavObjects = exports.generateOtherNavObject = exports.generateReadNavObjects = exports.getFieldKeyValue = exports.getReadObject = exports.getOptionalFieldsFromObject = exports.getRequiredMapFieldsFromObject = exports.getRequiredFieldsFromObject = exports.getObjectFromAction = exports.isIntegrationFieldMapping = void 0;
|
|
4
4
|
const ErrorContextProvider_1 = require("../../context/ErrorContextProvider");
|
|
5
5
|
const constant_1 = require("./nav/ObjectManagementNav/constant");
|
|
6
6
|
/**
|
|
@@ -13,18 +13,18 @@ function isIntegrationFieldMapping(field) {
|
|
|
13
13
|
return field.mapToName !== undefined;
|
|
14
14
|
}
|
|
15
15
|
exports.isIntegrationFieldMapping = isIntegrationFieldMapping;
|
|
16
|
-
// 1. get
|
|
16
|
+
// 1. get object
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
19
|
* @param action HydratedIntegrationAction
|
|
20
20
|
* @param objectName string (account, contact, etc...)
|
|
21
21
|
* @returns HydratedIntegrationObject | null
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function getObjectFromAction(action, objectName) {
|
|
24
24
|
var _a;
|
|
25
|
-
return ((_a = action === null || action === void 0 ? void 0 : action.
|
|
25
|
+
return ((_a = action === null || action === void 0 ? void 0 : action.objects) === null || _a === void 0 ? void 0 : _a.find((object) => object.objectName === objectName)) || null;
|
|
26
26
|
}
|
|
27
|
-
exports.
|
|
27
|
+
exports.getObjectFromAction = getObjectFromAction;
|
|
28
28
|
// 2a. get required fields
|
|
29
29
|
function getRequiredFieldsFromObject(object) {
|
|
30
30
|
var _a;
|
|
@@ -44,7 +44,7 @@ function getOptionalFieldsFromObject(object) {
|
|
|
44
44
|
return ((_a = object === null || object === void 0 ? void 0 : object.optionalFields) === null || _a === void 0 ? void 0 : _a.filter((rf) => !isIntegrationFieldMapping(rf) && !!rf.fieldName)) || null;
|
|
45
45
|
}
|
|
46
46
|
exports.getOptionalFieldsFromObject = getOptionalFieldsFromObject;
|
|
47
|
-
const getReadObject = (config, objectName) => { var _a, _b, _c; return (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.
|
|
47
|
+
const getReadObject = (config, objectName) => { var _a, _b, _c; return (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c[objectName]; };
|
|
48
48
|
exports.getReadObject = getReadObject;
|
|
49
49
|
// aux. get field value based on type guard
|
|
50
50
|
function getFieldKeyValue(field) {
|
|
@@ -63,7 +63,7 @@ exports.getFieldKeyValue = getFieldKeyValue;
|
|
|
63
63
|
const generateReadNavObjects = (config, hydratedRevision) => {
|
|
64
64
|
var _a, _b, _c;
|
|
65
65
|
const navObjects = [];
|
|
66
|
-
(_c = (_b = (_a = hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.
|
|
66
|
+
(_c = (_b = (_a = hydratedRevision.content) === null || _a === void 0 ? void 0 : _a.read) === null || _b === void 0 ? void 0 : _b.objects) === null || _c === void 0 ? void 0 : _c.forEach((object) => {
|
|
67
67
|
navObjects.push({
|
|
68
68
|
name: object === null || object === void 0 ? void 0 : object.objectName,
|
|
69
69
|
// if no config, object is not completed
|