@aws-amplify/core 6.0.1-console-preview.b5a42af.0 → 6.0.1-console-preview.9607e4a.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/lib/Platform/types.d.ts +3 -2
- package/lib/Platform/types.js +3 -2
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/clients/types/http.d.ts +1 -1
- package/lib/libraryUtils.d.ts +1 -0
- package/lib/libraryUtils.js +4 -1
- package/lib/providers/kinesis/types/index.d.ts +1 -0
- package/lib/providers/kinesis/types/index.js +19 -0
- package/lib/providers/kinesis/types/kinesis.d.ts +9 -0
- package/lib/providers/kinesis/types/kinesis.js +4 -0
- package/lib/providers/kinesis-firehose/types/index.d.ts +1 -0
- package/lib/providers/kinesis-firehose/types/index.js +4 -0
- package/lib/providers/kinesis-firehose/types/kinesis-firehose.d.ts +9 -0
- package/lib/providers/kinesis-firehose/types/kinesis-firehose.js +4 -0
- package/lib/providers/personalize/types/index.d.ts +1 -0
- package/lib/providers/personalize/types/index.js +4 -0
- package/lib/providers/personalize/types/personalize.d.ts +8 -0
- package/lib/providers/personalize/types/personalize.js +4 -0
- package/lib/providers/pinpoint/apis/flushEvents.d.ts +2 -0
- package/lib/providers/pinpoint/apis/flushEvents.js +21 -0
- package/lib/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib/providers/pinpoint/apis/index.js +3 -1
- package/lib/providers/pinpoint/types/pinpoint.d.ts +1 -1
- package/lib/providers/pinpoint/utils/PinpointEventBuffer.d.ts +1 -0
- package/lib/providers/pinpoint/utils/PinpointEventBuffer.js +3 -0
- package/lib/singleton/Analytics/types.d.ts +4 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/Platform/types.d.ts +3 -2
- package/lib-esm/Platform/types.js +3 -2
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/clients/types/http.d.ts +1 -1
- package/lib-esm/libraryUtils.d.ts +1 -0
- package/lib-esm/libraryUtils.js +2 -0
- package/lib-esm/providers/kinesis/types/index.d.ts +1 -0
- package/lib-esm/providers/kinesis/types/index.js +3 -0
- package/lib-esm/providers/kinesis/types/kinesis.d.ts +9 -0
- package/lib-esm/providers/kinesis/types/kinesis.js +3 -0
- package/lib-esm/providers/kinesis-firehose/types/index.d.ts +1 -0
- package/lib-esm/providers/kinesis-firehose/types/index.js +3 -0
- package/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts +9 -0
- package/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.js +3 -0
- package/lib-esm/providers/personalize/types/index.d.ts +1 -0
- package/lib-esm/providers/personalize/types/index.js +3 -0
- package/lib-esm/providers/personalize/types/personalize.d.ts +8 -0
- package/lib-esm/providers/personalize/types/personalize.js +3 -0
- package/lib-esm/providers/pinpoint/apis/flushEvents.d.ts +2 -0
- package/lib-esm/providers/pinpoint/apis/flushEvents.js +17 -0
- package/lib-esm/providers/pinpoint/apis/index.d.ts +1 -0
- package/lib-esm/providers/pinpoint/apis/index.js +1 -0
- package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +1 -1
- package/lib-esm/providers/pinpoint/utils/PinpointEventBuffer.d.ts +1 -0
- package/lib-esm/providers/pinpoint/utils/PinpointEventBuffer.js +3 -0
- package/lib-esm/singleton/Analytics/types.d.ts +4 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/Hub/index.ts +1 -0
- package/src/Platform/types.ts +3 -2
- package/src/Platform/version.ts +1 -1
- package/src/Signer/DateUtils.ts +1 -1
- package/src/clients/types/http.ts +1 -1
- package/src/libraryUtils.ts +3 -0
- package/src/providers/kinesis/types/index.ts +4 -0
- package/src/providers/kinesis/types/kinesis.ts +12 -0
- package/src/providers/kinesis-firehose/types/index.ts +4 -0
- package/src/providers/kinesis-firehose/types/kinesis-firehose.ts +12 -0
- package/src/providers/personalize/types/index.ts +4 -0
- package/src/providers/personalize/types/personalize.ts +11 -0
- package/src/providers/pinpoint/apis/flushEvents.ts +31 -0
- package/src/providers/pinpoint/apis/index.ts +1 -0
- package/src/providers/pinpoint/types/pinpoint.ts +1 -1
- package/src/providers/pinpoint/utils/PinpointEventBuffer.ts +4 -0
- package/src/singleton/Analytics/types.ts +7 -1
package/lib/Platform/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare enum Category {
|
|
|
31
31
|
}
|
|
32
32
|
export declare enum AnalyticsAction {
|
|
33
33
|
Record = "1",
|
|
34
|
-
|
|
34
|
+
IdentifyUser = "2"
|
|
35
35
|
}
|
|
36
36
|
export declare enum ApiAction {
|
|
37
37
|
GraphQl = "1",
|
|
@@ -53,7 +53,8 @@ export declare enum GeoAction {
|
|
|
53
53
|
None = "0"
|
|
54
54
|
}
|
|
55
55
|
export declare enum InAppMessagingAction {
|
|
56
|
-
|
|
56
|
+
SyncMessages = "1",
|
|
57
|
+
IdentifyUser = "2"
|
|
57
58
|
}
|
|
58
59
|
export declare enum InteractionsAction {
|
|
59
60
|
None = "0"
|
package/lib/Platform/types.js
CHANGED
|
@@ -42,7 +42,7 @@ var Category;
|
|
|
42
42
|
var AnalyticsAction;
|
|
43
43
|
(function (AnalyticsAction) {
|
|
44
44
|
AnalyticsAction["Record"] = "1";
|
|
45
|
-
AnalyticsAction["
|
|
45
|
+
AnalyticsAction["IdentifyUser"] = "2";
|
|
46
46
|
})(AnalyticsAction = exports.AnalyticsAction || (exports.AnalyticsAction = {}));
|
|
47
47
|
var ApiAction;
|
|
48
48
|
(function (ApiAction) {
|
|
@@ -102,7 +102,8 @@ var GeoAction;
|
|
|
102
102
|
})(GeoAction = exports.GeoAction || (exports.GeoAction = {}));
|
|
103
103
|
var InAppMessagingAction;
|
|
104
104
|
(function (InAppMessagingAction) {
|
|
105
|
-
InAppMessagingAction["
|
|
105
|
+
InAppMessagingAction["SyncMessages"] = "1";
|
|
106
|
+
InAppMessagingAction["IdentifyUser"] = "2";
|
|
106
107
|
})(InAppMessagingAction = exports.InAppMessagingAction || (exports.InAppMessagingAction = {}));
|
|
107
108
|
var InteractionsAction;
|
|
108
109
|
(function (InteractionsAction) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.0.1-console-preview.
|
|
1
|
+
export declare const version = "6.0.1-console-preview.9607e4a.0+9607e4a";
|
package/lib/Platform/version.js
CHANGED
|
@@ -17,7 +17,7 @@ export interface HttpRequest extends Request {
|
|
|
17
17
|
*/
|
|
18
18
|
export type ResponseBodyMixin = Pick<Body, 'blob' | 'json' | 'text'>;
|
|
19
19
|
export interface HttpResponse extends Response {
|
|
20
|
-
body: (ResponseBodyMixin & ReadableStream) | ResponseBodyMixin
|
|
20
|
+
body: (ResponseBodyMixin & ReadableStream) | ResponseBodyMixin;
|
|
21
21
|
statusCode: number;
|
|
22
22
|
/**
|
|
23
23
|
* @see {@link HttpRequest.headers}
|
package/lib/libraryUtils.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export { fetchAuthSession } from './singleton/apis/internal/fetchAuthSession';
|
|
|
21
21
|
export { AMPLIFY_SYMBOL } from './Hub';
|
|
22
22
|
export { base64Decoder, base64Encoder } from './utils/convert';
|
|
23
23
|
export { getCrypto } from './utils/globalHelpers';
|
|
24
|
+
export { HubClass } from './Hub';
|
package/lib/libraryUtils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = exports.fetchAuthSession = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.AmplifyErrorCode = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.ServiceWorker = exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.ClientDevice = exports.Logger = exports.ConsoleLogger = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.parseAWSExports = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;
|
|
6
|
-
exports.getCrypto = void 0;
|
|
6
|
+
exports.HubClass = exports.getCrypto = void 0;
|
|
7
7
|
/*
|
|
8
8
|
This file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal
|
|
9
9
|
utils for use throughout the library.
|
|
@@ -85,3 +85,6 @@ Object.defineProperty(exports, "base64Decoder", { enumerable: true, get: functio
|
|
|
85
85
|
Object.defineProperty(exports, "base64Encoder", { enumerable: true, get: function () { return convert_1.base64Encoder; } });
|
|
86
86
|
var globalHelpers_1 = require("./utils/globalHelpers");
|
|
87
87
|
Object.defineProperty(exports, "getCrypto", { enumerable: true, get: function () { return globalHelpers_1.getCrypto; } });
|
|
88
|
+
// Hub
|
|
89
|
+
var Hub_2 = require("./Hub");
|
|
90
|
+
Object.defineProperty(exports, "HubClass", { enumerable: true, get: function () { return Hub_2.HubClass; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './kinesis';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
__exportStar(require("./kinesis"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { KinesisFirehoseProviderConfig } from './kinesis-firehose';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PersonalizeProviderConfig } from './personalize';
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
exports.flushEvents = void 0;
|
|
6
|
+
var getEventBuffer_1 = require("../utils/getEventBuffer");
|
|
7
|
+
var constants_1 = require("../utils/constants");
|
|
8
|
+
var flushEvents = function (appId, region, credentials, identityId, userAgentValue) {
|
|
9
|
+
(0, getEventBuffer_1.getEventBuffer)({
|
|
10
|
+
appId: appId,
|
|
11
|
+
bufferSize: constants_1.BUFFER_SIZE,
|
|
12
|
+
credentials: credentials,
|
|
13
|
+
flushInterval: constants_1.FLUSH_INTERVAL,
|
|
14
|
+
flushSize: constants_1.FLUSH_SIZE,
|
|
15
|
+
identityId: identityId,
|
|
16
|
+
region: region,
|
|
17
|
+
resendLimit: constants_1.RESEND_LIMIT,
|
|
18
|
+
userAgentValue: userAgentValue,
|
|
19
|
+
}).flushAll();
|
|
20
|
+
};
|
|
21
|
+
exports.flushEvents = flushEvents;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.record = exports.updateEndpoint = void 0;
|
|
5
|
+
exports.flushEvents = exports.record = exports.updateEndpoint = void 0;
|
|
6
6
|
var updateEndpoint_1 = require("./updateEndpoint");
|
|
7
7
|
Object.defineProperty(exports, "updateEndpoint", { enumerable: true, get: function () { return updateEndpoint_1.updateEndpoint; } });
|
|
8
8
|
var record_1 = require("./record");
|
|
9
9
|
Object.defineProperty(exports, "record", { enumerable: true, get: function () { return record_1.record; } });
|
|
10
|
+
var flushEvents_1 = require("./flushEvents");
|
|
11
|
+
Object.defineProperty(exports, "flushEvents", { enumerable: true, get: function () { return flushEvents_1.flushEvents; } });
|
|
@@ -3,7 +3,7 @@ import { UserProfile } from '../../../types';
|
|
|
3
3
|
export type SupportedCategory = 'Analytics' | 'InAppMessaging' | 'PushNotification';
|
|
4
4
|
export type SupportedChannelType = 'APNS' | 'APNS_SANDBOX' | 'GCM' | 'IN_APP';
|
|
5
5
|
export type PinpointProviderConfig = {
|
|
6
|
-
Pinpoint
|
|
6
|
+
Pinpoint?: {
|
|
7
7
|
appId: string;
|
|
8
8
|
region: string;
|
|
9
9
|
};
|
|
@@ -113,6 +113,9 @@ var PinpointEventBuffer = /** @class */ (function () {
|
|
|
113
113
|
PinpointEventBuffer.prototype.identityHasChanged = function (identityId) {
|
|
114
114
|
return this._config.identityId !== identityId;
|
|
115
115
|
};
|
|
116
|
+
PinpointEventBuffer.prototype.flushAll = function () {
|
|
117
|
+
this._putEvents(this._buffer.splice(0, this._buffer.length));
|
|
118
|
+
};
|
|
116
119
|
PinpointEventBuffer.prototype._startLoop = function () {
|
|
117
120
|
if (this._interval) {
|
|
118
121
|
clearInterval(this._interval);
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { PinpointProviderConfig } from '../../providers/pinpoint/types';
|
|
2
|
-
|
|
2
|
+
import { KinesisProviderConfig } from '../../providers/kinesis/types';
|
|
3
|
+
import { KinesisFirehoseProviderConfig } from '../../providers/kinesis-firehose/types';
|
|
4
|
+
import { PersonalizeProviderConfig } from '../../providers/personalize/types';
|
|
5
|
+
export type AnalyticsConfig = PinpointProviderConfig & KinesisProviderConfig & KinesisFirehoseProviderConfig & PersonalizeProviderConfig;
|