@aws-amplify/analytics 7.0.1-console-preview.4208d73.0 → 7.0.1-console-preview.431c340.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.
Files changed (67) hide show
  1. package/kinesis/package.json +7 -0
  2. package/lib/errors/AnalyticsError.d.ts +2 -2
  3. package/lib/providers/kinesis/apis/index.d.ts +1 -0
  4. package/lib/providers/kinesis/apis/index.js +7 -0
  5. package/lib/providers/kinesis/apis/record.d.ts +2 -0
  6. package/lib/providers/kinesis/apis/record.js +9 -0
  7. package/lib/providers/kinesis/index.d.ts +1 -0
  8. package/lib/providers/kinesis/index.js +6 -0
  9. package/lib/providers/kinesis/types/index.d.ts +1 -0
  10. package/lib/providers/kinesis/types/index.js +6 -0
  11. package/lib/providers/kinesis/types/inputs.d.ts +1 -0
  12. package/lib/providers/kinesis/types/inputs.js +4 -0
  13. package/lib/providers/pinpoint/apis/identifyUser.d.ts +7 -5
  14. package/lib/providers/pinpoint/apis/identifyUser.js +14 -9
  15. package/lib/providers/pinpoint/types/index.d.ts +1 -0
  16. package/lib/providers/pinpoint/types/inputs.d.ts +3 -14
  17. package/lib/providers/pinpoint/types/options.d.ts +5 -0
  18. package/lib/providers/pinpoint/types/options.js +4 -0
  19. package/lib/tsconfig.tsbuildinfo +1 -1
  20. package/lib/types/analytics.d.ts +1 -1
  21. package/lib/types/index.d.ts +3 -1
  22. package/lib/types/index.js +0 -2
  23. package/lib/types/inputs.d.ts +21 -0
  24. package/lib/types/inputs.js +4 -0
  25. package/lib/types/options.d.ts +4 -0
  26. package/lib/types/options.js +4 -0
  27. package/lib-esm/errors/AnalyticsError.d.ts +2 -2
  28. package/lib-esm/errors/AnalyticsError.js +1 -1
  29. package/lib-esm/providers/kinesis/apis/index.d.ts +1 -0
  30. package/lib-esm/providers/kinesis/apis/index.js +3 -0
  31. package/lib-esm/providers/kinesis/apis/record.d.ts +2 -0
  32. package/lib-esm/providers/kinesis/apis/record.js +5 -0
  33. package/lib-esm/providers/kinesis/index.d.ts +1 -0
  34. package/lib-esm/providers/kinesis/index.js +3 -0
  35. package/lib-esm/providers/kinesis/types/index.d.ts +1 -0
  36. package/lib-esm/providers/kinesis/types/index.js +3 -0
  37. package/lib-esm/providers/kinesis/types/inputs.d.ts +1 -0
  38. package/lib-esm/providers/kinesis/types/inputs.js +3 -0
  39. package/lib-esm/providers/pinpoint/apis/identifyUser.d.ts +7 -5
  40. package/lib-esm/providers/pinpoint/apis/identifyUser.js +14 -9
  41. package/lib-esm/providers/pinpoint/types/index.d.ts +1 -0
  42. package/lib-esm/providers/pinpoint/types/inputs.d.ts +3 -14
  43. package/lib-esm/providers/pinpoint/types/options.d.ts +5 -0
  44. package/lib-esm/providers/pinpoint/types/options.js +3 -0
  45. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  46. package/lib-esm/types/analytics.d.ts +1 -1
  47. package/lib-esm/types/index.d.ts +3 -1
  48. package/lib-esm/types/index.js +1 -1
  49. package/lib-esm/types/inputs.d.ts +21 -0
  50. package/lib-esm/types/inputs.js +3 -0
  51. package/lib-esm/types/options.d.ts +4 -0
  52. package/lib-esm/types/options.js +3 -0
  53. package/package.json +16 -6
  54. package/src/errors/AnalyticsError.ts +5 -2
  55. package/src/providers/kinesis/apis/index.ts +4 -0
  56. package/src/providers/kinesis/apis/record.ts +8 -0
  57. package/src/providers/kinesis/index.ts +4 -0
  58. package/src/providers/kinesis/types/index.ts +4 -0
  59. package/src/providers/kinesis/types/inputs.ts +4 -0
  60. package/src/providers/pinpoint/apis/identifyUser.ts +13 -8
  61. package/src/providers/pinpoint/types/index.ts +1 -0
  62. package/src/providers/pinpoint/types/inputs.ts +3 -15
  63. package/src/providers/pinpoint/types/options.ts +12 -0
  64. package/src/types/analytics.ts +1 -1
  65. package/src/types/index.ts +15 -1
  66. package/src/types/inputs.ts +29 -0
  67. package/src/types/options.ts +7 -0
@@ -3,3 +3,4 @@
3
3
 
4
4
  export { UpdateEndpointException } from './errors';
5
5
  export { RecordInput, IdentifyUserInput } from './inputs';
6
+ export { IdentifyUserOptions } from './options';
@@ -1,8 +1,9 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { UserProfile } from '@aws-amplify/core';
5
4
  import { PinpointAnalyticsEvent } from '@aws-amplify/core/internals/providers/pinpoint';
5
+ import { IdentifyUserOptions } from '.';
6
+ import { AnalyticsIdentifyUserInput } from '../../../types';
6
7
 
7
8
  /**
8
9
  * Input type for Pinpoint record API.
@@ -14,17 +15,4 @@ export type RecordInput = {
14
15
  event: PinpointAnalyticsEvent;
15
16
  };
16
17
 
17
- /**
18
- * Input type for Pinpoint identifyUser API.
19
- */
20
- export type IdentifyUserInput = {
21
- /**
22
- * A User ID associated to the current device.
23
- */
24
- userId: string;
25
-
26
- /**
27
- * Additional information about the user and their device.
28
- */
29
- userProfile: UserProfile;
30
- };
18
+ export type IdentifyUserInput = AnalyticsIdentifyUserInput<IdentifyUserOptions>;
@@ -0,0 +1,12 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { PinpointServiceOptions } from '@aws-amplify/core/internals/providers/pinpoint';
5
+
6
+ /**
7
+ * Options specific to Pinpoint identityUser.
8
+ */
9
+ export type IdentifyUserOptions = Pick<
10
+ PinpointServiceOptions,
11
+ 'userAttributes'
12
+ >;
@@ -13,7 +13,7 @@ export interface EventMetrics {
13
13
  [key: string]: number;
14
14
  }
15
15
 
16
- export interface pageViewTrackOpts {
16
+ export interface PageViewTrackOpts {
17
17
  enable: boolean;
18
18
  type?: string;
19
19
  eventName?: string;
@@ -1,4 +1,18 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- export * from './analytics';
4
+ export {
5
+ AutoTrackAttributes,
6
+ AutoTrackEventOpts,
7
+ AutoTrackPageViewOpts,
8
+ AutoTrackSessionOpts,
9
+ EventAttributes,
10
+ EventMetrics,
11
+ EventTrackOpts,
12
+ PageViewTrackOpts,
13
+ SessionTrackOpts,
14
+ } from './analytics';
15
+
16
+ export { AnalyticsServiceOptions } from './options';
17
+
18
+ export { AnalyticsIdentifyUserInput } from './inputs';
@@ -0,0 +1,29 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { UserProfile } from '@aws-amplify/core';
5
+ import { AnalyticsServiceOptions } from '.';
6
+
7
+ /**
8
+ * Constructs an `identifyUser` input.
9
+ */
10
+ export type AnalyticsIdentifyUserInput<
11
+ ServiceOptions extends AnalyticsServiceOptions = AnalyticsServiceOptions
12
+ > = {
13
+ /**
14
+ * A User ID associated to the current device.
15
+ */
16
+ userId: string;
17
+
18
+ /**
19
+ * Additional information about the user and their device.
20
+ */
21
+ userProfile: UserProfile;
22
+
23
+ /**
24
+ * Options to be passed to the API.
25
+ */
26
+ options?: {
27
+ serviceOptions?: ServiceOptions;
28
+ };
29
+ };
@@ -0,0 +1,7 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ /**
5
+ * Base type for service options.
6
+ */
7
+ export type AnalyticsServiceOptions = any;