Skip to content

Commit 70c90a1

Browse files
build(core): release 2.79.0 (#928)
ci(release) : update package version number
1 parent 4def7b1 commit 70c90a1

File tree

7 files changed

+124
-170
lines changed

7 files changed

+124
-170
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to the Branch Web SDK will be documented here.
33
The Branch Web SDK adheres to [Semantic Versioning](http://semver.org/).
44

55
## [VERSION] - unreleased
6+
## [2.79.0] - 2023-08-22
7+
- fix(SDK-2006): remove v1/logout call inside logout
8+
- fix(SDK-2006): remove v1/profile call inside setIdentity
9+
610
## [2.78.0] - 2023-08-08
711
- feat(SDK-2049): send referring link data to pageview
812
- fix(SDK-2016): Send raw identity to v1/open besides identity_id

dist/build.js

Lines changed: 13 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ goog.json.Serializer.prototype.serializeObject_ = function(a, b) {
10721072
b.push("}");
10731073
};
10741074
// Input 2
1075-
var config = {app_service_endpoint:"https://app.link", link_service_endpoint:"https://bnc.lt", api_endpoint:"https://api2.branch.io", version:"2.78.0"};
1075+
var config = {app_service_endpoint:"https://app.link", link_service_endpoint:"https://bnc.lt", api_endpoint:"https://api2.branch.io", version:"2.79.0"};
10761076
// Input 3
10771077
var safejson = {parse:function(a) {
10781078
a = String(a);
@@ -1157,7 +1157,7 @@ utils.cleanApplicationAndSessionStorage = function(a) {
11571157
};
11581158
utils.httpMethod = {POST:"POST", GET:"GET"};
11591159
utils.messages = {missingParam:"API request $1 missing parameter $2", invalidType:"API request $1, parameter $2 is not $3", nonInit:"Branch SDK not initialized", initPending:"Branch SDK initialization pending and a Branch method was called outside of the queue order", initFailed:"Branch SDK initialization failed, so further methods cannot be called", existingInit:"Branch SDK already initialized", missingAppId:"Missing Branch app ID", callBranchInitFirst:"Branch.init must be called first", timeout:"Request timed out",
1160-
blockedByClient:"Request blocked by client, probably adblock", missingUrl:"Required argument: URL, is missing", trackingDisabled:"Requested operation cannot be completed since tracking is disabled", deepviewNotCalled:"Cannot call Deepview CTA, please call branch.deepview() first"};
1160+
blockedByClient:"Request blocked by client, probably adblock", missingUrl:"Required argument: URL, is missing", trackingDisabled:"Requested operation cannot be completed since tracking is disabled", deepviewNotCalled:"Cannot call Deepview CTA, please call branch.deepview() first", missingIdentity:"setIdentity - required argument identity should have a non-null value"};
11611161
utils.bannerThemes = ["light", "dark"];
11621162
utils.getLocationSearch = function() {
11631163
return utils.isIframeAndFromSameOrigin() ? window.top.location.search : window.location.search;
@@ -1696,16 +1696,12 @@ resources.open = {destination:config.api_endpoint, endpoint:"/v1/open", method:u
16961696
validationTypes.STRING), tracking_disabled:validator(!1, validationTypes.BOOLEAN), current_url:validator(!1, validationTypes.STRING), screen_height:validator(!1, validationTypes.NUMBER), screen_width:validator(!1, validationTypes.NUMBER), model:validator(!1, validationTypes.STRING), os_version:validator(!1, validationTypes.STRING)}};
16971697
resources._r = {destination:config.app_service_endpoint, endpoint:"/_r", method:utils.httpMethod.GET, jsonp:!0, params:{sdk:validator(!0, validationTypes.STRING), _t:validator(!1, validationTypes.STRING), branch_key:validator(!0, validationTypes.STRING)}};
16981698
resources.linkClick = {destination:"", endpoint:"", method:utils.httpMethod.GET, queryPart:{link_url:validator(!0, validationTypes.STRING)}, params:{click:validator(!0, validationTypes.STRING)}};
1699-
resources.logout = {destination:config.api_endpoint, endpoint:"/v1/logout", method:utils.httpMethod.POST, params:defaults({session_id:validator(!0, validationTypes.STRING)})};
1700-
resources.profile = {destination:config.api_endpoint, endpoint:"/v1/profile", method:utils.httpMethod.POST, params:defaults({identity_id:validator(!0, validationTypes.STRING), identity:validator(!0, validationTypes.STRING)})};
17011699
resources.link = {destination:config.api_endpoint, endpoint:"/v1/url", method:utils.httpMethod.POST, ref:"obj", params:defaults({alias:validator(!1, validationTypes.STRING), campaign:validator(!1, validationTypes.STRING), channel:validator(!1, validationTypes.STRING), data:validator(!1, validationTypes.STRING), feature:validator(!1, validationTypes.STRING), identity_id:validator(!0, validationTypes.STRING), stage:validator(!1, validationTypes.STRING), tags:validator(!1, validationTypes.ARRAY), type:validator(!1,
17021700
validationTypes.NUMBER), source:validator(!1, validationTypes.STRING), instrumentation:validator(!1, validationTypes.STRING)})};
17031701
resources.qrCode = {destination:config.api_endpoint, endpoint:"/v1/qr-code", method:utils.httpMethod.POST, ref:"obj", params:defaults({alias:validator(!1, validationTypes.STRING), campaign:validator(!1, validationTypes.STRING), channel:validator(!1, validationTypes.STRING), data:validator(!1, validationTypes.STRING), qr_code_settings:validator(!1, validationTypes.STRING), feature:validator(!1, validationTypes.STRING), identity_id:validator(!0, validationTypes.STRING), stage:validator(!1, validationTypes.STRING),
17041702
tags:validator(!1, validationTypes.ARRAY), type:validator(!1, validationTypes.NUMBER), source:validator(!1, validationTypes.STRING)})};
17051703
resources.deepview = {destination:config.api_endpoint, endpoint:"/v1/deepview", jsonp:!0, method:utils.httpMethod.POST, params:defaults({campaign:validator(!1, validationTypes.STRING), _t:validator(!1, validationTypes.STRING), channel:validator(!1, validationTypes.STRING), data:validator(!0, validationTypes.STRING), feature:validator(!1, validationTypes.STRING), link_click_id:validator(!1, validationTypes.STRING), open_app:validator(!1, validationTypes.BOOLEAN), append_deeplink_path:validator(!1,
17061704
validationTypes.BOOLEAN), stage:validator(!1, validationTypes.STRING), tags:validator(!1, validationTypes.ARRAY), deepview_type:validator(!0, validationTypes.STRING), source:validator(!0, validationTypes.STRING)})};
1707-
resources.event = {destination:config.api_endpoint, endpoint:"/v1/event", method:utils.httpMethod.POST, params:defaults({event:validator(!0, validationTypes.STRING), metadata:validator(!0, validationTypes.OBJECT), initial_referrer:validator(!1, validationTypes.STRING), tracking_disabled:validator(!1, validationTypes.BOOLEAN)})};
1708-
resources.commerceEvent = {destination:config.api_endpoint, endpoint:"/v1/event", method:utils.httpMethod.POST, params:defaults({event:validator(!0, validationTypes.STRING), metadata:validator(!1, validationTypes.OBJECT), initial_referrer:validator(!1, validationTypes.STRING), commerce_data:validator(!0, validationTypes.OBJECT)})};
17091705
resources.logStandardEvent = {destination:config.api_endpoint, endpoint:"/v2/event/standard", method:utils.httpMethod.POST, params:{name:validator(!0, validationTypes.STRING), user_data:validator(!0, validationTypes.STRING), custom_data:validator(!1, validationTypes.STRING), event_data:validator(!1, validationTypes.STRING), content_items:validator(!1, validationTypes.STRING), customer_event_alias:validator(!1, validationTypes.STRING)}};
17101706
resources.logCustomEvent = {destination:config.api_endpoint, endpoint:"/v2/event/custom", method:utils.httpMethod.POST, params:{name:validator(!0, validationTypes.STRING), user_data:validator(!0, validationTypes.STRING), custom_data:validator(!1, validationTypes.STRING), event_data:validator(!1, validationTypes.STRING), content_items:validator(!1, validationTypes.STRING), customer_event_alias:validator(!1, validationTypes.STRING)}};
17111707
resources.pageview = {destination:config.api_endpoint, endpoint:"/v1/pageview", method:utils.httpMethod.POST, params:defaults({event:validator(!0, validationTypes.STRING), metadata:validator(!1, validationTypes.OBJECT), initial_referrer:validator(!1, validationTypes.STRING), tracking_disabled:validator(!1, validationTypes.BOOLEAN), branch_view_id:validator(!1, validationTypes.STRING), no_journeys:validator(!1, validationTypes.BOOLEAN), user_language:validator(!1, validationTypes.STRING), open_app:validator(!1,
@@ -1893,7 +1889,6 @@ Server.prototype.getUrl = function(a, b) {
18931889
return {error:k.message};
18941890
}
18951891
}
1896-
"/v1/event" === a.endpoint && (g.metadata = safejson.stringify(g.metadata || {}), g.hasOwnProperty("commerce_data") && (g.commerce_data = safejson.stringify(g.commerce_data || {})));
18971892
("/v1/pageview" === a.endpoint || "/v1/dismiss" === a.endpoint) && g.metadata && (g.metadata = safejson.stringify(g.metadata || {}));
18981893
"/v1/open" === a.endpoint && (g.options = safejson.stringify(g.options || {}));
18991894
return {data:this.serializeObject(g, ""), url:d.replace(/^\//, "")};
@@ -2977,32 +2972,19 @@ Branch.prototype.first = wrap(callback_params.CALLBACK_ERR_DATA, function(a) {
29772972
a(null, utils.whiteListSessionData(session.get(this._storage, !0)));
29782973
});
29792974
Branch.prototype.setIdentity = wrap(callback_params.CALLBACK_ERR_DATA, function(a, b) {
2980-
var c = this;
2981-
this._api(resources.profile, {identity:b}, function(d, e) {
2982-
d && a(d);
2983-
e = e || {};
2984-
c.identity_id = e.identity_id ? e.identity_id.toString() : null;
2985-
c.sessionLink = e.link;
2986-
c.identity = b;
2987-
e.developer_identity = b;
2988-
e.referring_data_parsed = e.referring_data ? safejson.parse(e.referring_data) : null;
2989-
session.patch(c._storage, {identity:b, identity_id:c.identity_id}, !0);
2990-
a(null, e);
2991-
});
2975+
if (b) {
2976+
var c = {identity_id:this.identity_id, session_id:this.session_id, link:this.sessionLink, developer_identity:b};
2977+
this.identity = b;
2978+
session.patch(this._storage, {identity:b}, !0);
2979+
a(null, c);
2980+
} else {
2981+
a(Error(utils.message(utils.messages.missingIdentity)));
2982+
}
29922983
});
29932984
Branch.prototype.logout = wrap(callback_params.CALLBACK_ERR, function(a) {
2994-
var b = this;
2995-
this._api(resources.logout, {}, function(c, d) {
2996-
c && a(c);
2997-
d = d || {};
2998-
d = {data_parsed:null, data:null, referring_link:null, click_id:null, link_click_id:null, identity:null, session_id:d.session_id, identity_id:d.identity_id, link:d.link, device_fingerprint_id:b.device_fingerprint_id || null};
2999-
b.sessionLink = d.link;
3000-
b.session_id = d.session_id;
3001-
b.identity_id = d.identity_id;
3002-
b.identity = null;
3003-
session.patch(b._storage, d, !0, !0);
3004-
a(null);
3005-
});
2985+
this.identity = null;
2986+
session.patch(this._storage, {identity:null}, !0, !0);
2987+
a(null);
30062988
});
30072989
Branch.prototype.getBrowserFingerprintId = wrap(callback_params.CALLBACK_ERR_DATA, function(a) {
30082990
var b = session.get(this._storage, !0) || {};
@@ -3059,9 +3041,6 @@ Branch.prototype.link = wrap(callback_params.CALLBACK_ERR_DATA, function(a, b) {
30593041
a(null, f && f.url);
30603042
});
30613043
});
3062-
Branch.prototype.sendSMS = function() {
3063-
console.warn("SMS feature has been deprecated. This is no-op.");
3064-
};
30653044
Branch.prototype.qrCode = wrap(callback_params.CALLBACK_ERR_DATA, function(a, b, c, d) {
30663045
utils.cleanLinkData(b).qr_code_settings = safejson.stringify(utils.convertObjectValuesToString(c || {}));
30673046
this._api(resources.qrCode, utils.cleanLinkData(b), function(e, f) {
@@ -3116,27 +3095,6 @@ Branch.prototype.deepviewCta = wrap(callback_params.CALLBACK_ERR, function(a) {
31163095
this._deepviewCta();
31173096
a();
31183097
});
3119-
Branch.prototype.referrals = function() {
3120-
console.warn("Credits feature has been deprecated. This is no-op.");
3121-
};
3122-
Branch.prototype.getCode = function() {
3123-
console.warn("Credits feature has been deprecated. This is no-op.");
3124-
};
3125-
Branch.prototype.validateCode = function() {
3126-
console.warn("Credits feature has been deprecated. This is no-op.");
3127-
};
3128-
Branch.prototype.applyCode = function() {
3129-
console.warn("Credits feature has been deprecated. This is no-op.");
3130-
};
3131-
Branch.prototype.credits = function() {
3132-
console.warn("Credits feature has been deprecated. This is no-op.");
3133-
};
3134-
Branch.prototype.creditHistory = function() {
3135-
console.warn("Credits feature has been deprecated. This is no-op.");
3136-
};
3137-
Branch.prototype.redeem = function() {
3138-
console.warn("Credits feature has been deprecated. This is no-op.");
3139-
};
31403098
Branch.prototype.addListener = function(a, b) {
31413099
"function" === typeof a && void 0 === b && (b = a, a = null);
31423100
b && this._listeners.push({listener:b, event:a || null});
@@ -3201,9 +3159,6 @@ Branch.prototype.closeBanner = wrap(0, function(a) {
32013159
});
32023160
a();
32033161
});
3204-
Branch.prototype.autoAppIndex = function() {
3205-
console.warn("autoAppIndex feature has been deprecated. This is no-op.");
3206-
};
32073162
Branch.prototype.trackCommerceEvent = wrap(callback_params.CALLBACK_ERR, function(a, b, c, d) {
32083163
var e = this;
32093164
e.renderQueue(function() {

0 commit comments

Comments
 (0)