@amp-labs/react 1.14.2 → 1.15.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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Config } from '../../generated-sources/api/src';
2
2
  import { default as default_2 } from 'react';
3
+ import { IntegrationFieldMapping } from '../../generated-sources/api/src';
3
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
4
5
 
5
6
  export declare const AmpersandContext: default_2.Context<null>;
@@ -35,14 +36,38 @@ declare interface ConnectProviderProps {
35
36
  onSuccess?: (connectionID: string) => void;
36
37
  }
37
38
 
38
- export declare function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, onUninstallSuccess, }: InstallIntegrationProps): JSX_2.Element;
39
+ declare type FieldMappingsType = {
40
+ [key: string]: Array<IntegrationFieldMapping>;
41
+ };
42
+
43
+ export declare function InstallIntegration({ integration, consumerRef, consumerName, groupRef, groupName, onInstallSuccess, onUpdateSuccess, onUninstallSuccess, fieldMapping, }: InstallIntegrationProps): JSX_2.Element;
39
44
 
40
45
  declare interface InstallIntegrationProps {
46
+ /**
47
+ * The name of the integration from amp.yaml
48
+ */
41
49
  integration: string;
50
+ /**
51
+ * The ID that your app uses to identify this end user.
52
+ */
42
53
  consumerRef: string;
54
+ /**
55
+ * The display name that your app uses for this end user.
56
+ */
43
57
  consumerName?: string;
58
+ /**
59
+ * The ID that your app uses to identify the user's company, org, or team.
60
+ */
44
61
  groupRef: string;
62
+ /**
63
+ * The display name that your app uses for this company, org or team.
64
+ */
45
65
  groupName?: string;
66
+ /**
67
+ * Dynamic field mappings that need to be filled out by a consumer.
68
+ * @experimental
69
+ */
70
+ fieldMapping?: FieldMappingsType;
46
71
  onInstallSuccess?: (installationId: string, config: Config) => void;
47
72
  onUpdateSuccess?: (installationId: string, config: Config) => void;
48
73
  onUninstallSuccess?: (installationId: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amp-labs/react",
3
- "version": "1.14.2",
3
+ "version": "1.15.0",
4
4
  "description": "Ampersand React library.",
5
5
  "author": {
6
6
  "name": "Ampersand Labs",