@aws-amplify/notifications 2.0.1-console-preview.5f040a2.0 → 2.0.1-console-preview.23dc225.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 (190) hide show
  1. package/lib/common/AWSPinpointProviderCommon/index.d.ts +0 -1
  2. package/lib/common/AWSPinpointProviderCommon/index.js +14 -19
  3. package/lib/common/AWSPinpointProviderCommon/index.js.map +1 -1
  4. package/lib/common/eventListeners/index.d.ts +2 -2
  5. package/lib/common/eventListeners/index.js +3 -1
  6. package/lib/common/eventListeners/index.js.map +1 -1
  7. package/lib/common/eventListeners/types.d.ts +3 -0
  8. package/lib/common/index.d.ts +1 -1
  9. package/lib/inAppMessaging/errors/validation.d.ts +2 -1
  10. package/lib/inAppMessaging/errors/validation.js +5 -0
  11. package/lib/inAppMessaging/errors/validation.js.map +1 -1
  12. package/lib/inAppMessaging/index.d.ts +1 -1
  13. package/lib/inAppMessaging/index.js +8 -0
  14. package/lib/inAppMessaging/index.js.map +1 -1
  15. package/lib/inAppMessaging/providers/index.d.ts +1 -1
  16. package/lib/inAppMessaging/providers/index.js +8 -0
  17. package/lib/inAppMessaging/providers/index.js.map +1 -1
  18. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +26 -0
  19. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +69 -0
  20. package/lib/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +1 -0
  21. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +1 -4
  22. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js +5 -5
  23. package/lib/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -1
  24. package/lib/inAppMessaging/providers/pinpoint/apis/index.d.ts +8 -0
  25. package/lib/inAppMessaging/providers/pinpoint/apis/index.js +16 -0
  26. package/lib/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -1
  27. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +12 -0
  28. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +61 -0
  29. package/lib/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +1 -0
  30. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +16 -0
  31. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +27 -0
  32. package/lib/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +1 -0
  33. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +18 -0
  34. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +27 -0
  35. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +1 -0
  36. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +18 -0
  37. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +27 -0
  38. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +1 -0
  39. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +18 -0
  40. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +27 -0
  41. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +1 -0
  42. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +18 -0
  43. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +27 -0
  44. package/lib/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +1 -0
  45. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +32 -0
  46. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +66 -0
  47. package/lib/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +1 -0
  48. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +1 -3
  49. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js +20 -18
  50. package/lib/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +1 -1
  51. package/lib/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
  52. package/lib/inAppMessaging/providers/pinpoint/index.js +8 -0
  53. package/lib/inAppMessaging/providers/pinpoint/index.js.map +1 -1
  54. package/lib/inAppMessaging/providers/pinpoint/types/index.d.ts +2 -1
  55. package/lib/inAppMessaging/providers/pinpoint/types/index.js +2 -0
  56. package/lib/inAppMessaging/providers/pinpoint/types/index.js.map +1 -1
  57. package/lib/inAppMessaging/providers/pinpoint/types/inputs.d.ts +33 -2
  58. package/lib/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
  59. package/lib/inAppMessaging/providers/pinpoint/types/outputs.js +5 -0
  60. package/lib/inAppMessaging/providers/pinpoint/types/outputs.js.map +1 -0
  61. package/lib/inAppMessaging/providers/pinpoint/types/types.d.ts +4 -1
  62. package/lib/inAppMessaging/providers/pinpoint/types/types.js +6 -6
  63. package/lib/inAppMessaging/providers/pinpoint/types/types.js.map +1 -1
  64. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +17 -0
  65. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js +260 -0
  66. package/lib/inAppMessaging/providers/pinpoint/utils/helpers.js.map +1 -0
  67. package/lib/inAppMessaging/providers/pinpoint/utils/index.d.ts +1 -0
  68. package/lib/inAppMessaging/providers/pinpoint/utils/index.js +4 -0
  69. package/lib/inAppMessaging/providers/pinpoint/utils/index.js.map +1 -1
  70. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +6 -0
  71. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +247 -0
  72. package/lib/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +1 -0
  73. package/lib/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +1 -6
  74. package/lib/inAppMessaging/types/index.d.ts +1 -1
  75. package/lib/inAppMessaging/utils/index.d.ts +1 -0
  76. package/lib/inAppMessaging/utils/index.js +9 -0
  77. package/lib/inAppMessaging/utils/index.js.map +1 -0
  78. package/lib/inAppMessaging/utils/statusHelpers.d.ts +13 -0
  79. package/lib/inAppMessaging/utils/statusHelpers.js +25 -0
  80. package/lib/inAppMessaging/utils/statusHelpers.js.map +1 -0
  81. package/lib-esm/common/AWSPinpointProviderCommon/index.d.ts +0 -1
  82. package/lib-esm/common/AWSPinpointProviderCommon/index.js +15 -20
  83. package/lib-esm/common/AWSPinpointProviderCommon/index.js.map +1 -1
  84. package/lib-esm/common/eventListeners/index.d.ts +2 -2
  85. package/lib-esm/common/eventListeners/index.js +3 -1
  86. package/lib-esm/common/eventListeners/index.js.map +1 -1
  87. package/lib-esm/common/eventListeners/types.d.ts +3 -0
  88. package/lib-esm/common/index.d.ts +1 -1
  89. package/lib-esm/inAppMessaging/errors/validation.d.ts +2 -1
  90. package/lib-esm/inAppMessaging/errors/validation.js +5 -0
  91. package/lib-esm/inAppMessaging/errors/validation.js.map +1 -1
  92. package/lib-esm/inAppMessaging/index.d.ts +1 -1
  93. package/lib-esm/inAppMessaging/index.js +1 -1
  94. package/lib-esm/inAppMessaging/index.js.map +1 -1
  95. package/lib-esm/inAppMessaging/providers/index.d.ts +1 -1
  96. package/lib-esm/inAppMessaging/providers/index.js +1 -1
  97. package/lib-esm/inAppMessaging/providers/index.js.map +1 -1
  98. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.d.ts +26 -0
  99. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js +66 -0
  100. package/lib-esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.js.map +1 -0
  101. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.d.ts +1 -4
  102. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js +5 -5
  103. package/lib-esm/inAppMessaging/providers/pinpoint/apis/identifyUser.js.map +1 -1
  104. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.d.ts +8 -0
  105. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js +8 -0
  106. package/lib-esm/inAppMessaging/providers/pinpoint/apis/index.js.map +1 -1
  107. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.d.ts +12 -0
  108. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js +57 -0
  109. package/lib-esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.js.map +1 -0
  110. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.d.ts +16 -0
  111. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js +24 -0
  112. package/lib-esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.js.map +1 -0
  113. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.d.ts +18 -0
  114. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js +24 -0
  115. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.js.map +1 -0
  116. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.d.ts +18 -0
  117. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js +24 -0
  118. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.js.map +1 -0
  119. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.d.ts +18 -0
  120. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js +24 -0
  121. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.js.map +1 -0
  122. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.d.ts +18 -0
  123. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js +24 -0
  124. package/lib-esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.js.map +1 -0
  125. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.d.ts +32 -0
  126. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js +63 -0
  127. package/lib-esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.js.map +1 -0
  128. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.d.ts +1 -3
  129. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js +20 -18
  130. package/lib-esm/inAppMessaging/providers/pinpoint/apis/syncMessages.js.map +1 -1
  131. package/lib-esm/inAppMessaging/providers/pinpoint/index.d.ts +1 -1
  132. package/lib-esm/inAppMessaging/providers/pinpoint/index.js +1 -1
  133. package/lib-esm/inAppMessaging/providers/pinpoint/index.js.map +1 -1
  134. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.d.ts +2 -1
  135. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js +1 -0
  136. package/lib-esm/inAppMessaging/providers/pinpoint/types/index.js.map +1 -1
  137. package/lib-esm/inAppMessaging/providers/pinpoint/types/inputs.d.ts +33 -2
  138. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.d.ts +17 -0
  139. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js +3 -0
  140. package/lib-esm/inAppMessaging/providers/pinpoint/types/outputs.js.map +1 -0
  141. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.d.ts +4 -1
  142. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js +6 -6
  143. package/lib-esm/inAppMessaging/providers/pinpoint/types/types.js.map +1 -1
  144. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.d.ts +17 -0
  145. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js +258 -0
  146. package/lib-esm/inAppMessaging/providers/pinpoint/utils/helpers.js.map +1 -0
  147. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.d.ts +1 -0
  148. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js +1 -0
  149. package/lib-esm/inAppMessaging/providers/pinpoint/utils/index.js.map +1 -1
  150. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.d.ts +6 -0
  151. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js +242 -0
  152. package/lib-esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.js.map +1 -0
  153. package/lib-esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.d.ts +1 -6
  154. package/lib-esm/inAppMessaging/types/index.d.ts +1 -1
  155. package/lib-esm/inAppMessaging/utils/index.d.ts +1 -0
  156. package/lib-esm/inAppMessaging/utils/index.js +4 -0
  157. package/lib-esm/inAppMessaging/utils/index.js.map +1 -0
  158. package/lib-esm/inAppMessaging/utils/statusHelpers.d.ts +13 -0
  159. package/lib-esm/inAppMessaging/utils/statusHelpers.js +22 -0
  160. package/lib-esm/inAppMessaging/utils/statusHelpers.js.map +1 -0
  161. package/package.json +5 -6
  162. package/src/common/AWSPinpointProviderCommon/index.ts +9 -14
  163. package/src/common/eventListeners/index.ts +5 -3
  164. package/src/common/eventListeners/types.ts +4 -0
  165. package/src/common/index.ts +5 -1
  166. package/src/inAppMessaging/errors/validation.ts +6 -0
  167. package/src/inAppMessaging/index.ts +12 -1
  168. package/src/inAppMessaging/providers/index.ts +12 -1
  169. package/src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts +63 -0
  170. package/src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts +3 -4
  171. package/src/inAppMessaging/providers/pinpoint/apis/index.ts +8 -0
  172. package/src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts +64 -0
  173. package/src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts +28 -0
  174. package/src/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.ts +29 -0
  175. package/src/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.ts +29 -0
  176. package/src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts +29 -0
  177. package/src/inAppMessaging/providers/pinpoint/apis/onMessageReceived.ts +29 -0
  178. package/src/inAppMessaging/providers/pinpoint/apis/setConflictHandler.ts +68 -0
  179. package/src/inAppMessaging/providers/pinpoint/apis/syncMessages.ts +6 -5
  180. package/src/inAppMessaging/providers/pinpoint/index.ts +12 -1
  181. package/src/inAppMessaging/providers/pinpoint/types/index.ts +14 -1
  182. package/src/inAppMessaging/providers/pinpoint/types/inputs.ts +49 -2
  183. package/src/inAppMessaging/providers/pinpoint/types/outputs.ts +24 -0
  184. package/src/inAppMessaging/providers/pinpoint/types/types.ts +9 -1
  185. package/src/inAppMessaging/providers/pinpoint/utils/helpers.ts +325 -0
  186. package/src/inAppMessaging/providers/pinpoint/utils/index.ts +6 -0
  187. package/src/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.ts +196 -0
  188. package/src/inAppMessaging/types/index.ts +7 -1
  189. package/src/inAppMessaging/utils/index.ts +8 -0
  190. package/src/inAppMessaging/utils/statusHelpers.ts +32 -0
@@ -5,7 +5,6 @@ import { PinpointUserInfo } from './types';
5
5
  export default abstract class AWSPinpointProviderCommon implements NotificationsProvider {
6
6
  static category: NotificationsCategory;
7
7
  static providerName: string;
8
- protected clientInfo: any;
9
8
  protected config: Record<string, any>;
10
9
  protected endpointInitialized: boolean;
11
10
  protected initialized: boolean;
@@ -6,11 +6,9 @@ var tslib_1 = require("tslib");
6
6
  var utils_1 = require("@aws-amplify/core/internals/utils");
7
7
  var core_1 = require("@aws-amplify/core");
8
8
  var pinpoint_1 = require("@aws-amplify/core/internals/aws-clients/pinpoint");
9
- var uuid_1 = require("uuid");
10
9
  var AWSPinpointProviderCommon = /** @class */ (function () {
11
10
  function AWSPinpointProviderCommon(logger) {
12
11
  var _this = this;
13
- var _a;
14
12
  this.config = {};
15
13
  this.endpointInitialized = false;
16
14
  this.initialized = false;
@@ -112,7 +110,7 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
112
110
  _c[endpointId] = {
113
111
  Endpoint: {},
114
112
  Events: (_d = {},
115
- _d[uuid_1.v4()] = event,
113
+ _d[utils_1.amplifyUuid()] = event,
116
114
  _d),
117
115
  },
118
116
  _c),
@@ -135,14 +133,14 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
135
133
  if (userId === void 0) { userId = null; }
136
134
  if (userInfo === void 0) { userInfo = null; }
137
135
  return tslib_1.__awaiter(_this, void 0, void 0, function () {
138
- var credentials, credentialsUpdated, _a, appId, endpointId, _b, endpointInfo, region, _c, address, attributes, demographic, location_1, metrics, optOut, _d, appVersion, make, model, platform, version, input, err_4;
136
+ var credentials, credentialsUpdated, _a, appId, endpointId, _b, endpointInfo, region, _c, address, attributes, demographic, location_1, metrics, optOut, input, err_4;
139
137
  var _this = this;
140
- var _e;
141
- return tslib_1.__generator(this, function (_f) {
142
- switch (_f.label) {
138
+ var _d;
139
+ return tslib_1.__generator(this, function (_e) {
140
+ switch (_e.label) {
143
141
  case 0: return [4 /*yield*/, this.getCredentials()];
144
142
  case 1:
145
- credentials = _f.sent();
143
+ credentials = _e.sent();
146
144
  credentialsUpdated = !this.config.credentials ||
147
145
  Object.keys(credentials).some(function (key) { return credentials[key] !== _this.config.credentials[key]; });
148
146
  // If endpoint is already initialized, and nothing else is changing, just early return
@@ -157,26 +155,25 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
157
155
  // Assert required configuration properties to make `updateEndpoint` request are present
158
156
  this.assertNotEmptyConfiguration();
159
157
  _a = this.config, appId = _a.appId, endpointId = _a.endpointId, _b = _a.endpointInfo, endpointInfo = _b === void 0 ? {} : _b, region = _a.region;
160
- _f.label = 2;
158
+ _e.label = 2;
161
159
  case 2:
162
- _f.trys.push([2, 4, , 5]);
160
+ _e.trys.push([2, 4, , 5]);
163
161
  _c = userInfo !== null && userInfo !== void 0 ? userInfo : {}, address = _c.address, attributes = _c.attributes, demographic = _c.demographic, location_1 = _c.location, metrics = _c.metrics, optOut = _c.optOut;
164
- _d = this.clientInfo, appVersion = _d.appVersion, make = _d.make, model = _d.model, platform = _d.platform, version = _d.version;
165
162
  input = {
166
163
  ApplicationId: appId,
167
164
  EndpointId: endpointId,
168
165
  EndpointRequest: {
169
- RequestId: uuid_1.v4(),
166
+ RequestId: utils_1.amplifyUuid(),
170
167
  EffectiveDate: new Date().toISOString(),
171
168
  ChannelType: endpointInfo.channelType,
172
169
  Address: address !== null && address !== void 0 ? address : endpointInfo.address,
173
170
  Attributes: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.attributes), attributes),
174
- Demographic: tslib_1.__assign({ AppVersion: appVersion, Make: make, Model: model, ModelVersion: version, Platform: platform }, this.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.demographic), demographic))),
171
+ Demographic: tslib_1.__assign({ AppVersion: null, Make: null, Model: null, ModelVersion: null, Platform: null }, this.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.demographic), demographic))),
175
172
  Location: this.transferKeyToUpperCase(tslib_1.__assign(tslib_1.__assign({}, endpointInfo.location), location_1)),
176
173
  Metrics: tslib_1.__assign(tslib_1.__assign({}, endpointInfo.metrics), metrics),
177
174
  OptOut: optOut !== null && optOut !== void 0 ? optOut : endpointInfo.optOut,
178
175
  User: {
179
- UserId: (_e = userId !== null && userId !== void 0 ? userId : endpointInfo.userId) !== null && _e !== void 0 ? _e : credentials.identityId,
176
+ UserId: (_d = userId !== null && userId !== void 0 ? userId : endpointInfo.userId) !== null && _d !== void 0 ? _d : credentials.identityId,
180
177
  UserAttributes: attributes !== null && attributes !== void 0 ? attributes : endpointInfo.userAttributes,
181
178
  },
182
179
  },
@@ -184,11 +181,11 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
184
181
  this.logger.debug('updating endpoint');
185
182
  return [4 /*yield*/, pinpoint_1.updateEndpoint({ credentials: credentials, region: region, userAgentValue: this.getUserAgentValue() }, input)];
186
183
  case 3:
187
- _f.sent();
184
+ _e.sent();
188
185
  this.endpointInitialized = true;
189
186
  return [3 /*break*/, 5];
190
187
  case 4:
191
- err_4 = _f.sent();
188
+ err_4 = _e.sent();
192
189
  throw err_4;
193
190
  case 5: return [2 /*return*/];
194
191
  }
@@ -211,7 +208,7 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
211
208
  if (cachedEndpointId) {
212
209
  return [2 /*return*/, cachedEndpointId];
213
210
  }
214
- endpointId = uuid_1.v4();
211
+ endpointId = utils_1.amplifyUuid();
215
212
  ttl = 1000 * 60 * 60 * 24 * 365 * 100;
216
213
  expiration = new Date().getTime() + ttl;
217
214
  core_1.Cache.setItem(cacheKey, endpointId, {
@@ -264,8 +261,6 @@ var AWSPinpointProviderCommon = /** @class */ (function () {
264
261
  }
265
262
  return ret;
266
263
  };
267
- // this.config = { storage: new StorageHelper().getStorage() };
268
- this.clientInfo = (_a = utils_1.ClientDevice.clientInfo()) !== null && _a !== void 0 ? _a : {};
269
264
  this.logger = logger;
270
265
  }
271
266
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/AWSPinpointProviderCommon/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,2DAQ2C;AAC3C,0CAA4D;AAE5D,6EAM0D;AAC1D,6BAAkC;AAUlC;IAYC,mCAAY,MAAM;QAAlB,iBAIC;;QATS,WAAM,GAAwB,EAAE,CAAC;QACjC,wBAAmB,GAAG,KAAK,CAAC;QAC5B,gBAAW,GAAG,KAAK,CAAC;QAqC9B,iBAAY,GAAG,UAAO,MAAc,EAAE,QAAkB;;;;;6BACnD,CAAC,IAAI,CAAC,WAAW,EAAjB,wBAAiB;wBACpB,qBAAM,IAAI,CAAC,IAAI,EAAE,EAAA;;wBAAjB,SAAiB,CAAC;;;;wBAGlB,qBAAM,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAA;;wBAA3C,SAA2C,CAAC;;;;wBAE5C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAG,CAAC,CAAC;wBACjD,M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AAwB,EAAE,CAAC;YAEpC,KAAK,IAAM,GAAG,IAAI,GAAG,EAAE;gBACtB,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBAC5B,IAAM,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBAC3D,GAAG,CAAC,cAAc,CAAC,GAAG,KAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC5D;aACD;YACD,OAAO,GAAG,CAAC;QACZ,CAAC,CAAC;QAhQD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,+CAAW,GAAX;QACC,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAOD;;OAEG;IACH,mDAAe,GAAf;QACC,OAAO,yBAAyB,CAAC,YAAY,CAAC;IAC/C,CAAC;IAED,6CAAS,GAAT,UAAU,MAAW;QAAX,uBAAA,EAAA,WAAW;QACpB,IAAI,CAAC,MAAM,yCAAQ,IAAI,CAAC,MAAM,GAAK,MAAM,CAAE,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,KAAK,CAChB,eAAa,IAAI,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,aAAU,EACrE,IAAI,CAAC,MAAM,CACX,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAtCM,kCAAQ,GAA0B,eAAe,CAAC;IAClD,sCAAY,GAAG,aAAa,CAAC;IAyQrC,gCAAC;CAAA,AA7QD,IA6QC;kBA7Q6B,yBAAyB"}
@@ -1,4 +1,4 @@
1
- import { EventListener, EventType } from './types';
1
+ import { EventListenerRemover, EventType } from './types';
2
2
  export declare const notifyEventListeners: (type: EventType, ...args: any[]) => void;
3
3
  export declare const notifyEventListenersAndAwaitHandlers: (type: EventType, ...args: any[]) => Promise<void[]>;
4
- export declare const addEventListener: <EventHandler extends Function>(type: EventType, handler: EventHandler) => EventListener<EventHandler>;
4
+ export declare const addEventListener: <EventHandler extends Function>(type: EventType, handler: EventHandler) => EventListenerRemover;
@@ -50,6 +50,8 @@ exports.addEventListener = function (type, handler) {
50
50
  },
51
51
  };
52
52
  eventListeners[type].add(listener);
53
- return listener;
53
+ return {
54
+ remove: function () { return listener.remove(); },
55
+ };
54
56
  };
55
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/eventListeners/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAItC,IAAM,cAAc,GAAiD,EAAE,CAAC;AAE3D,QAAA,oBAAoB,GAAG,UAAC,IAAe;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;;IACnE,MAAA,cAAc,CAAC,IAAI,CAAC,0CAAE,OAAO,CAAC,UAAA,QAAQ;QACrC,QAAQ,CAAC,WAAW,OAApB,QAAQ,mBAAgB,IAAI,GAAE;IAC/B,CAAC,EAAE;AACJ,CAAC,CAAC;AAEW,QAAA,oCAAoC,GAAG,UACnD,IAAe;IACf,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;;IAEd,OAAA,OAAO,CAAC,GAAG,CACV,KAAK,CAAC,IAAI,OAAC,cAAc,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,UAAM,QAAQ;;;;;;oBAEvD,qBAAM,QAAQ,CAAC,WAAW,OAApB,QAAQ,mBAAgB,IAAI,IAAC;;oBAAnC,SAAmC,CAAC;;;;oBAEpC,MAAM,KAAG,CAAC;;;;SAEX,CAAC,CACF,CAAA;CAAA,CAAC;AAEU,QAAA,gBAAgB,GAAG,UAC/B,IAAe,EACf,OAAqB;IAErB,iEAAiE;IACjE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAA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AAC,cAAc,CAAC,IAAI,CAAC,EAAE;QAC1B,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,EAA+B,CAAC;KAC9D;IACD,IAAM,QAAQ,GAAG;QAChB,WAAW,EAAE,OAAO;QACpB,MAAM,EAAE;YACP,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;KACD,CAAC;IACF,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,OAAO;QACN,MAAM,EAAE,cAAM,OAAA,QAAQ,CAAC,MAAM,EAAE,EAAjB,CAAiB;KAC/B,CAAC;AACH,CAAC,CAAC"}
@@ -5,3 +5,6 @@ export interface EventListener<EventHandler extends Function> {
5
5
  remove: () => void;
6
6
  }
7
7
  export declare type EventType = InAppMessageInteractionEvent | PushNotificationEvent;
8
+ export declare type EventListenerRemover = {
9
+ remove: () => void;
10
+ };
@@ -1,3 +1,3 @@
1
1
  export { default as AWSPinpointProviderCommon } from './AWSPinpointProviderCommon';
2
2
  export { addEventListener, notifyEventListeners, notifyEventListenersAndAwaitHandlers, } from './eventListeners';
3
- export { EventListener, EventType } from './eventListeners/types';
3
+ export { EventListener, EventType, EventListenerRemover, } from './eventListeners/types';
@@ -3,6 +3,7 @@ export declare enum InAppMessagingValidationErrorCode {
3
3
  NoAppId = "NoAppId",
4
4
  NoCredentials = "NoCredentials",
5
5
  NoRegion = "NoRegion",
6
- NoEndpointId = "NoEndpointId"
6
+ NoEndpointId = "NoEndpointId",
7
+ NotInitialized = "NotInitialized"
7
8
  }
8
9
  export declare const validationErrorMap: AmplifyErrorMap<InAppMessagingValidationErrorCode>;
@@ -9,6 +9,7 @@ var InAppMessagingValidationErrorCode;
9
9
  InAppMessagingValidationErrorCode["NoCredentials"] = "NoCredentials";
10
10
  InAppMessagingValidationErrorCode["NoRegion"] = "NoRegion";
11
11
  InAppMessagingValidationErrorCode["NoEndpointId"] = "NoEndpointId";
12
+ InAppMessagingValidationErrorCode["NotInitialized"] = "NotInitialized";
12
13
  })(InAppMessagingValidationErrorCode = exports.InAppMessagingValidationErrorCode || (exports.InAppMessagingValidationErrorCode = {}));
13
14
  exports.validationErrorMap = (_a = {},
14
15
  _a[InAppMessagingValidationErrorCode.NoAppId] = {
@@ -23,5 +24,9 @@ exports.validationErrorMap = (_a = {},
23
24
  _a[InAppMessagingValidationErrorCode.NoEndpointId] = {
24
25
  message: 'Could not find or create EndpointId.',
25
26
  },
27
+ _a[InAppMessagingValidationErrorCode.NotInitialized] = {
28
+ message: 'In-app messaging has not been initialized.',
29
+ recoverySuggestion: 'Please make sure to first call `initializePushNotifications`.',
30
+ },
26
31
  _a);
27
32
  //# sourceMappingURL=validation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/inAppMessaging/errors/validation.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAItC,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC5C,wDAAmB,CAAA;IACnB,oEAA+B,CAAA;IAC/B,0DAAqB,CAAA;IACrB,kEAA6B,CAAA;AAC9B,CAAC,EALW,iCAAiC,GAAjC,yCAAiC,KAAjC,yCAAiC,QAK5C;AAEY,QAAA,kBAAkB;IAE7B,GAAC,iCAAiC,CAAC,OAAO,IAAG;QAC5C,OAAO,EAAE,yBAAyB;KAClC;IACD,GAAC,iCAAiC,CAAC,aAAa,IAAG;QAClD,OAAO,EAAE,kCAAkC;KAC3C;IACD,GAAC,iCAAiC,CAAC,QAAQ,IAAG;QAC7C,OAAO,EAAE,iBAAiB;KAC1B;IACD,GAAC,iCAAiC,CAAC,YAAY,IAAG;QACjD,OAAO,EAAE,sCAAsC;KAC/C;QACA"}
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/inAppMessaging/errors/validation.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAItC,IAAY,iCAMX;AAND,WAAY,iCAAiC;IAC5C,wDAAmB,CAAA;IACnB,oEAA+B,CAAA;IAC/B,0DAAqB,CAAA;IACrB,kEAA6B,CAAA;IAC7B,sEAAiC,CAAA;AAClC,CAAC,EANW,iCAAiC,GAAjC,yCAAiC,KAAjC,yCAAiC,QAM5C;AAEY,QAAA,kBAAkB;IAE7B,GAAC,iCAAiC,CAAC,OAAO,IAAG;QAC5C,OAAO,EAAE,yBAAyB;KAClC;IACD,GAAC,iCAAiC,CAAC,aAAa,IAAG;QAClD,OAAO,EAAE,kCAAkC;KAC3C;IACD,GAAC,iCAAiC,CAAC,QAAQ,IAAG;QAC7C,OAAO,EAAE,iBAAiB;KAC1B;IACD,GAAC,iCAAiC,CAAC,YAAY,IAAG;QACjD,OAAO,EAAE,sCAAsC;KAC/C;IACD,GAAC,iCAAiC,CAAC,cAAc,IAAG;QACnD,OAAO,EAAE,4CAA4C;QACrD,kBAAkB,EACjB,+DAA+D;KAChE;QACA"}
@@ -1 +1 @@
1
- export { identifyUser, syncMessages } from './providers/pinpoint';
1
+ export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, } from './providers/pinpoint';
@@ -5,4 +5,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var pinpoint_1 = require("./providers/pinpoint");
6
6
  exports.identifyUser = pinpoint_1.identifyUser;
7
7
  exports.syncMessages = pinpoint_1.syncMessages;
8
+ exports.dispatchEvent = pinpoint_1.dispatchEvent;
9
+ exports.setConflictHandler = pinpoint_1.setConflictHandler;
10
+ exports.initializeInAppMessaging = pinpoint_1.initializeInAppMessaging;
11
+ exports.onMessageReceived = pinpoint_1.onMessageReceived;
12
+ exports.onMessageDisplayed = pinpoint_1.onMessageDisplayed;
13
+ exports.onMessageDismissed = pinpoint_1.onMessageDismissed;
14
+ exports.onMessageActionTaken = pinpoint_1.onMessageActionTaken;
15
+ exports.notifyMessageInteraction = pinpoint_1.notifyMessageInteraction;
8
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/inAppMessaging/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,iDAAkE;AAAzD,kCAAA,YAAY,CAAA;AAAE,kCAAA,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/inAppMessaging/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,iDAW8B;AAV7B,kCAAA,YAAY,CAAA;AACZ,kCAAA,YAAY,CAAA;AACZ,mCAAA,aAAa,CAAA;AACb,wCAAA,kBAAkB,CAAA;AAClB,8CAAA,wBAAwB,CAAA;AACxB,uCAAA,iBAAiB,CAAA;AACjB,wCAAA,kBAAkB,CAAA;AAClB,wCAAA,kBAAkB,CAAA;AAClB,0CAAA,oBAAoB,CAAA;AACpB,8CAAA,wBAAwB,CAAA"}
@@ -1 +1 @@
1
- export { identifyUser, syncMessages } from './pinpoint/apis';
1
+ export { identifyUser, syncMessages, dispatchEvent, setConflictHandler, initializeInAppMessaging, onMessageReceived, onMessageDisplayed, onMessageDismissed, onMessageActionTaken, notifyMessageInteraction, } from './pinpoint/apis';
@@ -5,4 +5,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var apis_1 = require("./pinpoint/apis");
6
6
  exports.identifyUser = apis_1.identifyUser;
7
7
  exports.syncMessages = apis_1.syncMessages;
8
+ exports.dispatchEvent = apis_1.dispatchEvent;
9
+ exports.setConflictHandler = apis_1.setConflictHandler;
10
+ exports.initializeInAppMessaging = apis_1.initializeInAppMessaging;
11
+ exports.onMessageReceived = apis_1.onMessageReceived;
12
+ exports.onMessageDisplayed = apis_1.onMessageDisplayed;
13
+ exports.onMessageDismissed = apis_1.onMessageDismissed;
14
+ exports.onMessageActionTaken = apis_1.onMessageActionTaken;
15
+ exports.notifyMessageInteraction = apis_1.notifyMessageInteraction;
8
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/inAppMessaging/providers/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,wCAA6D;AAApD,8BAAA,YAAY,CAAA;AAAE,8BAAA,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/inAppMessaging/providers/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,wCAWyB;AAVxB,8BAAA,YAAY,CAAA;AACZ,8BAAA,YAAY,CAAA;AACZ,+BAAA,aAAa,CAAA;AACb,oCAAA,kBAAkB,CAAA;AAClB,0CAAA,wBAAwB,CAAA;AACxB,mCAAA,iBAAiB,CAAA;AACjB,oCAAA,kBAAkB,CAAA;AAClB,oCAAA,kBAAkB,CAAA;AAClB,sCAAA,oBAAoB,CAAA;AACpB,0CAAA,wBAAwB,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { DispatchEventInput } from '../types';
2
+ /**
3
+ * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using
4
+ * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display
5
+ * of the In-App message that meets the criteria.
6
+ *
7
+ * @remark
8
+ * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.
9
+ * To change this behavior, you can use the {@link setConflictHandler} API to provide
10
+ * your own logic for resolving message conflicts.
11
+ *
12
+ * @param DispatchEventInput The input object that holds the event to be dispatched.
13
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
14
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
15
+ * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.
16
+ * @returns A promise that will resolve when the operation is complete.
17
+ * @example
18
+ * ```ts
19
+ * // Sync message before disptaching an event
20
+ * await syncMessages();
21
+ *
22
+ * // Dispatch an event
23
+ * await dispatchEvent({ name: 'test_event' });
24
+ * ```
25
+ */
26
+ export declare function dispatchEvent(input: DispatchEventInput): Promise<void>;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var tslib_1 = require("tslib");
6
+ var utils_1 = require("../utils");
7
+ var flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
8
+ var core_1 = require("@aws-amplify/core");
9
+ var common_1 = require("../../../../common");
10
+ var errors_1 = require("../../../errors");
11
+ var setConflictHandler_1 = require("./setConflictHandler");
12
+ var utils_2 = require("../../../utils");
13
+ /**
14
+ * Triggers an In-App message to be displayed. Use this after your campaigns have been synced to the device using
15
+ * {@link syncMessages}. Based on the messages synced and the event passed to this API, it triggers the display
16
+ * of the In-App message that meets the criteria.
17
+ *
18
+ * @remark
19
+ * If an event would trigger multiple messages, the message closest to expiry will be chosen by default.
20
+ * To change this behavior, you can use the {@link setConflictHandler} API to provide
21
+ * your own logic for resolving message conflicts.
22
+ *
23
+ * @param DispatchEventInput The input object that holds the event to be dispatched.
24
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
25
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
26
+ * @throws service exceptions - Thrown when the underlying Pinpoint service returns an error.
27
+ * @returns A promise that will resolve when the operation is complete.
28
+ * @example
29
+ * ```ts
30
+ * // Sync message before disptaching an event
31
+ * await syncMessages();
32
+ *
33
+ * // Dispatch an event
34
+ * await dispatchEvent({ name: 'test_event' });
35
+ * ```
36
+ */
37
+ function dispatchEvent(input) {
38
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
39
+ var key, cachedMessages, messages, flattenedMessages, error_1;
40
+ return tslib_1.__generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ utils_2.assertIsInitialized();
44
+ _a.label = 1;
45
+ case 1:
46
+ _a.trys.push([1, 4, , 5]);
47
+ key = "" + utils_1.PINPOINT_KEY_PREFIX + utils_1.STORAGE_KEY_SUFFIX;
48
+ return [4 /*yield*/, core_1.defaultStorage.getItem(key)];
49
+ case 2:
50
+ cachedMessages = _a.sent();
51
+ return [4 /*yield*/, utils_1.processInAppMessages(cachedMessages ? JSON.parse(cachedMessages) : [], input)];
52
+ case 3:
53
+ messages = _a.sent();
54
+ flattenedMessages = flatten_1.default(messages);
55
+ if (flattenedMessages.length > 0) {
56
+ common_1.notifyEventListeners('messageReceived', setConflictHandler_1.conflictHandler(flattenedMessages));
57
+ }
58
+ return [3 /*break*/, 5];
59
+ case 4:
60
+ error_1 = _a.sent();
61
+ errors_1.assertServiceError(error_1);
62
+ throw error_1;
63
+ case 5: return [2 /*return*/];
64
+ }
65
+ });
66
+ });
67
+ }
68
+ exports.dispatchEvent = dispatchEvent;
69
+ //# sourceMappingURL=dispatchEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatchEvent.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/dispatchEvent.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,kCAIkB;AAElB,mEAAqC;AACrC,0CAAmD;AACnD,6CAA0D;AAC1D,0CAAqD;AAGrD,2DAA2E;AAC3E,wCAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAsB,aAAa,CAAC,KAAyB;;;;;;oBAC5D,2BAAmB,EAAE,CAAC;;;;oBAEf,GAAG,GAAG,KAAG,2BAAmB,GAAG,0BAAoB,CAAC;oBACnC,qBAAM,qBAAc,CAAC,OAAO,CAAC,GAAG,CAAC,EAAA;;oBAAlD,cAAc,GAAG,SAAiC;oBACvB,qBAAM,4BAAoB,CAC1D,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,EAChD,KAAK,CACL,EAAA;;oBAHK,QAAQ,GAAmB,SAGhC;oBACK,iBAAiB,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;oBAC5C,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;wBACjC,6BAAoB,CACnB,iBAAiB,EACjB,oCAAe,CAAC,iBAAiB,CAAC,CAClC,CAAC;qBACF;;;;oBAED,2BAAkB,CAAC,OAAK,CAAC,CAAC;oBAC1B,MAAM,OAAK,CAAC;;;;;CAEb;AApBD,sCAoBC"}
@@ -5,13 +5,10 @@
5
5
  *
6
6
  * @param {IdentifyUserParameters} params The input object used to construct requests sent to Pinpoint's UpdateEndpoint
7
7
  * API.
8
- *
9
8
  * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
10
9
  * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
11
- * configuration is incorrect.
12
- *
10
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
13
11
  * @returns A promise that will resolve when the operation is complete.
14
- *
15
12
  * @example
16
13
  * ```ts
17
14
  * // Identify a user with Pinpoint
@@ -6,6 +6,7 @@ var tslib_1 = require("tslib");
6
6
  var utils_1 = require("@aws-amplify/core/internals/utils");
7
7
  var pinpoint_1 = require("@aws-amplify/core/internals/providers/pinpoint");
8
8
  var utils_2 = require("../utils");
9
+ var utils_3 = require("../../../utils");
9
10
  /**
10
11
  * Sends information about a user to Pinpoint. Sending user information allows you to associate a user to their user
11
12
  * profile and activities or actions in your application. Activity can be tracked across devices & platforms by using
@@ -13,13 +14,10 @@ var utils_2 = require("../utils");
13
14
  *
14
15
  * @param {IdentifyUserParameters} params The input object used to construct requests sent to Pinpoint's UpdateEndpoint
15
16
  * API.
16
- *
17
17
  * @throws service: {@link UpdateEndpointException} - Thrown when the underlying Pinpoint service returns an error.
18
18
  * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
19
- * configuration is incorrect.
20
- *
19
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
21
20
  * @returns A promise that will resolve when the operation is complete.
22
- *
23
21
  * @example
24
22
  * ```ts
25
23
  * // Identify a user with Pinpoint
@@ -67,7 +65,9 @@ exports.identifyUser = function (_a) {
67
65
  var _e;
68
66
  return tslib_1.__generator(this, function (_f) {
69
67
  switch (_f.label) {
70
- case 0: return [4 /*yield*/, utils_2.resolveCredentials()];
68
+ case 0:
69
+ utils_3.assertIsInitialized();
70
+ return [4 /*yield*/, utils_2.resolveCredentials()];
71
71
  case 1:
72
72
  _b = _f.sent(), credentials = _b.credentials, identityId = _b.identityId;
73
73
  _c = utils_2.resolveConfig(), appId = _c.appId, region = _c.region;
@@ -1 +1 @@
1
- {"version":3,"file":"identifyUser.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,2DAAyE;AACzE,2EAAgF;AAEhF,kCAMkB;AAGlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACU,QAAA,YAAY,GAAG,UAAO,EAIf;QAHnB,kBAAM,EACN,4BAAW,EACX,oBAAO;;;;;;wBAE6B,qBAAM,0BAAkB,EAAE,EAAA;;oBAAxD,KAA8B,SAA0B,EAAtD,WAAW,iBAAA,EAAE,UAAU,gBAAA;oBACzB,KAAoB,qBAAa,EAAE,EAAjC,KAAK,WAAA,EAAE,MAAM,YAAA,CAAqB;oBACpC,WAAsC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,EAAE,EAAjE,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,cAAc,oBAAA,CAAmC;oBAC1E,yBAAc,CAAC;wBACd,OAAO,SAAA;wBACP,WAAW,EAAE,oBAAY;wBACzB,MAAM,QAAA;wBACN,KAAK,OAAA;wBACL,QAAQ,EAAE,gBAAQ;wBAClB,WAAW,aAAA;wBACX,UAAU,YAAA;wBACV,MAAM,QAAA;wBACN,cAAc,gBAAA;wBACd,MAAM,QAAA;wBACN,WAAW,aAAA;wBACX,cAAc,EAAE,wCAAgC,CAC/C,4BAAoB,CAAC,YAAY,CACjC;qBACD,CAAC,CAAC;;;;;CACH,CAAC"}
1
+ {"version":3,"file":"identifyUser.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/identifyUser.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,2DAAyE;AACzE,2EAAgF;AAEhF,kCAMkB;AAElB,wCAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACU,QAAA,YAAY,GAAG,UAAO,EAIf;QAHnB,kBAAM,EACN,4BAAW,EACX,oBAAO;;;;;;;oBAEP,2BAAmB,EAAE,CAAC;oBACc,qBAAM,0BAAkB,EAAE,EAAA;;oBAAxD,KAA8B,SAA0B,EAAtD,WAAW,iBAAA,EAAE,UAAU,gBAAA;oBACzB,KAAoB,qBAAa,EAAE,EAAjC,KAAK,WAAA,EAAE,MAAM,YAAA,CAAqB;oBACpC,WAAsC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,mCAAI,EAAE,EAAjE,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,cAAc,oBAAA,CAAmC;oBAC1E,yBAAc,CAAC;wBACd,OAAO,SAAA;wBACP,WAAW,EAAE,oBAAY;wBACzB,MAAM,QAAA;wBACN,KAAK,OAAA;wBACL,QAAQ,EAAE,gBAAQ;wBAClB,WAAW,aAAA;wBACX,UAAU,YAAA;wBACV,MAAM,QAAA;wBACN,cAAc,gBAAA;wBACd,MAAM,QAAA;wBACN,WAAW,aAAA;wBACX,cAAc,EAAE,wCAAgC,CAC/C,4BAAoB,CAAC,YAAY,CACjC;qBACD,CAAC,CAAC;;;;;CACH,CAAC"}
@@ -1,2 +1,10 @@
1
1
  export { identifyUser } from './identifyUser';
2
2
  export { syncMessages } from './syncMessages';
3
+ export { dispatchEvent } from './dispatchEvent';
4
+ export { setConflictHandler } from './setConflictHandler';
5
+ export { initializeInAppMessaging } from './initializeInAppMessaging';
6
+ export { onMessageReceived } from './onMessageReceived';
7
+ export { onMessageDismissed } from './onMessageDismissed';
8
+ export { onMessageDisplayed } from './onMessageDisplayed';
9
+ export { onMessageActionTaken } from './onMessageActionTaken';
10
+ export { notifyMessageInteraction } from './notifyMessageInteraction';
@@ -6,4 +6,20 @@ var identifyUser_1 = require("./identifyUser");
6
6
  exports.identifyUser = identifyUser_1.identifyUser;
7
7
  var syncMessages_1 = require("./syncMessages");
8
8
  exports.syncMessages = syncMessages_1.syncMessages;
9
+ var dispatchEvent_1 = require("./dispatchEvent");
10
+ exports.dispatchEvent = dispatchEvent_1.dispatchEvent;
11
+ var setConflictHandler_1 = require("./setConflictHandler");
12
+ exports.setConflictHandler = setConflictHandler_1.setConflictHandler;
13
+ var initializeInAppMessaging_1 = require("./initializeInAppMessaging");
14
+ exports.initializeInAppMessaging = initializeInAppMessaging_1.initializeInAppMessaging;
15
+ var onMessageReceived_1 = require("./onMessageReceived");
16
+ exports.onMessageReceived = onMessageReceived_1.onMessageReceived;
17
+ var onMessageDismissed_1 = require("./onMessageDismissed");
18
+ exports.onMessageDismissed = onMessageDismissed_1.onMessageDismissed;
19
+ var onMessageDisplayed_1 = require("./onMessageDisplayed");
20
+ exports.onMessageDisplayed = onMessageDisplayed_1.onMessageDisplayed;
21
+ var onMessageActionTaken_1 = require("./onMessageActionTaken");
22
+ exports.onMessageActionTaken = onMessageActionTaken_1.onMessageActionTaken;
23
+ var notifyMessageInteraction_1 = require("./notifyMessageInteraction");
24
+ exports.notifyMessageInteraction = notifyMessageInteraction_1.notifyMessageInteraction;
9
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,+CAA8C;AAArC,sCAAA,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,+CAA8C;AAArC,sCAAA,YAAY,CAAA;AACrB,iDAAgD;AAAvC,wCAAA,aAAa,CAAA;AACtB,2DAA0D;AAAjD,kDAAA,kBAAkB,CAAA;AAC3B,uEAAsE;AAA7D,8DAAA,wBAAwB,CAAA;AACjC,yDAAwD;AAA/C,gDAAA,iBAAiB,CAAA;AAC1B,2DAA0D;AAAjD,kDAAA,kBAAkB,CAAA;AAC3B,2DAA0D;AAAjD,kDAAA,kBAAkB,CAAA;AAC3B,+DAA8D;AAArD,sDAAA,oBAAoB,CAAA;AAC7B,uEAAsE;AAA7D,8DAAA,wBAAwB,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.
3
+ *
4
+ * @remarks
5
+ * Make sure to call this early in your app at the root entry point after configuring Amplify.
6
+ * @example
7
+ * ```ts
8
+ * Amplify.configure(config);
9
+ * initializeInAppMessaging();
10
+ * ```
11
+ */
12
+ export declare function initializeInAppMessaging(): void;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var tslib_1 = require("tslib");
6
+ var sessionTracker_1 = tslib_1.__importDefault(require("../../../sessionTracker"));
7
+ var common_1 = require("../../../../common");
8
+ var helpers_1 = require("../utils/helpers");
9
+ var types_1 = require("../types");
10
+ var core_1 = require("@aws-amplify/core");
11
+ var dispatchEvent_1 = require("./dispatchEvent");
12
+ var utils_1 = require("../utils");
13
+ var utils_2 = require("../../../utils");
14
+ /**
15
+ * Initialize and set up in-app messaging category. This API needs to be called to enable other InAppMessaging APIs.
16
+ *
17
+ * @remarks
18
+ * Make sure to call this early in your app at the root entry point after configuring Amplify.
19
+ * @example
20
+ * ```ts
21
+ * Amplify.configure(config);
22
+ * initializeInAppMessaging();
23
+ * ```
24
+ */
25
+ function initializeInAppMessaging() {
26
+ if (utils_2.isInitialized()) {
27
+ return;
28
+ }
29
+ // set up the session tracker and start it
30
+ var sessionTracker = new sessionTracker_1.default(utils_1.sessionStateChangeHandler);
31
+ sessionTracker.start();
32
+ // wire up default Pinpoint message event handling
33
+ common_1.addEventListener('messageDisplayed', function (message) {
34
+ console.log('Recording message displayed event');
35
+ helpers_1.recordAnalyticsEvent(types_1.PinpointMessageEvent.MESSAGE_DISPLAYED, message);
36
+ utils_1.incrementMessageCounts(message.id);
37
+ });
38
+ common_1.addEventListener('messageDismissed', function (message) {
39
+ helpers_1.recordAnalyticsEvent(types_1.PinpointMessageEvent.MESSAGE_DISMISSED, message);
40
+ });
41
+ common_1.addEventListener('messageActionTaken', function (message) {
42
+ helpers_1.recordAnalyticsEvent(types_1.PinpointMessageEvent.MESSAGE_ACTION_TAKEN, message);
43
+ });
44
+ // listen to analytics hub events
45
+ core_1.Hub.listen('analytics', analyticsListener);
46
+ utils_2.initialize();
47
+ }
48
+ exports.initializeInAppMessaging = initializeInAppMessaging;
49
+ function analyticsListener(_a) {
50
+ var payload = _a.payload;
51
+ var event = payload.event, data = payload.data;
52
+ switch (event) {
53
+ case 'record': {
54
+ dispatchEvent_1.dispatchEvent(data);
55
+ break;
56
+ }
57
+ default:
58
+ break;
59
+ }
60
+ }
61
+ //# sourceMappingURL=initializeInAppMessaging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeInAppMessaging.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.ts"],"names":[],"mappings":";AAAA,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ACF,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { NotifyMessageInteractionInput } from '../types/inputs';
2
+ /**
3
+ * Notifies the respective listener of the specified type with the message given.
4
+ *
5
+ * @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.
6
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
7
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
8
+ * @example
9
+ * ```ts
10
+ * onMessageRecieved((message) => {
11
+ * // Show end users the In-App message and notify event listeners
12
+ * notifyMessageInteraction({ type: 'messageDisplayed', message });
13
+ * });
14
+ * ```
15
+ */
16
+ export declare function notifyMessageInteraction({ type, message, }: NotifyMessageInteractionInput): void;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ var common_1 = require("../../../../common");
6
+ var utils_1 = require("../../../utils");
7
+ /**
8
+ * Notifies the respective listener of the specified type with the message given.
9
+ *
10
+ * @param {NotifyMessageInteractionInput} input - The input object that holds the type and message.
11
+ * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library
12
+ * configuration is incorrect, or if In App messaging hasn't been initialized.
13
+ * @example
14
+ * ```ts
15
+ * onMessageRecieved((message) => {
16
+ * // Show end users the In-App message and notify event listeners
17
+ * notifyMessageInteraction({ type: 'messageDisplayed', message });
18
+ * });
19
+ * ```
20
+ */
21
+ function notifyMessageInteraction(_a) {
22
+ var type = _a.type, message = _a.message;
23
+ utils_1.assertIsInitialized();
24
+ common_1.notifyEventListeners(type, message);
25
+ }
26
+ exports.notifyMessageInteraction = notifyMessageInteraction;
27
+ //# sourceMappingURL=notifyMessageInteraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifyMessageInteraction.js","sourceRoot":"","sources":["../../../../../src/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,6CAA0D;AAC1D,wCAAqD;AAGrD;;;;;;;;;;;;;GAaG;AACH,SAAgB,wBAAwB,CAAC,EAGT;QAF/B,cAAI,EACJ,oBAAO;IAEP,2BAAmB,EAAE,CAAC;IACtB,6BAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAND,4DAMC"}