@quintype/components 2.32.0 → 2.33.0-AT-member-metadata.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/dist/cjs/index.js +102 -25
- package/dist/es/components/access-type.js +102 -25
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -5209,6 +5209,70 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5209
5209
|
};
|
|
5210
5210
|
}());
|
|
5211
5211
|
|
|
5212
|
+
_defineProperty(_assertThisInitialized(_this), "getSubscriberMetadata", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
5213
|
+
var metadata;
|
|
5214
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
5215
|
+
while (1) {
|
|
5216
|
+
switch (_context12.prev = _context12.next) {
|
|
5217
|
+
case 0:
|
|
5218
|
+
if (global.AccessType) {
|
|
5219
|
+
_context12.next = 2;
|
|
5220
|
+
break;
|
|
5221
|
+
}
|
|
5222
|
+
|
|
5223
|
+
return _context12.abrupt("return", {});
|
|
5224
|
+
|
|
5225
|
+
case 2:
|
|
5226
|
+
_context12.next = 4;
|
|
5227
|
+
return awaitHelper(global.AccessType.getSubscriberMetadata());
|
|
5228
|
+
|
|
5229
|
+
case 4:
|
|
5230
|
+
metadata = _context12.sent;
|
|
5231
|
+
return _context12.abrupt("return", metadata);
|
|
5232
|
+
|
|
5233
|
+
case 6:
|
|
5234
|
+
case "end":
|
|
5235
|
+
return _context12.stop();
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
}, _callee12);
|
|
5239
|
+
})));
|
|
5240
|
+
|
|
5241
|
+
_defineProperty(_assertThisInitialized(_this), "setSubscriberMetadata", /*#__PURE__*/function () {
|
|
5242
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(subscriberMetadata) {
|
|
5243
|
+
var response;
|
|
5244
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
5245
|
+
while (1) {
|
|
5246
|
+
switch (_context13.prev = _context13.next) {
|
|
5247
|
+
case 0:
|
|
5248
|
+
if (!(!global.AccessType || !subscriberMetadata)) {
|
|
5249
|
+
_context13.next = 2;
|
|
5250
|
+
break;
|
|
5251
|
+
}
|
|
5252
|
+
|
|
5253
|
+
return _context13.abrupt("return", {});
|
|
5254
|
+
|
|
5255
|
+
case 2:
|
|
5256
|
+
_context13.next = 4;
|
|
5257
|
+
return awaitHelper(global.AccessType.setSubscriberMetadata(subscriberMetadata));
|
|
5258
|
+
|
|
5259
|
+
case 4:
|
|
5260
|
+
response = _context13.sent;
|
|
5261
|
+
return _context13.abrupt("return", response);
|
|
5262
|
+
|
|
5263
|
+
case 6:
|
|
5264
|
+
case "end":
|
|
5265
|
+
return _context13.stop();
|
|
5266
|
+
}
|
|
5267
|
+
}
|
|
5268
|
+
}, _callee13);
|
|
5269
|
+
}));
|
|
5270
|
+
|
|
5271
|
+
return function (_x9) {
|
|
5272
|
+
return _ref15.apply(this, arguments);
|
|
5273
|
+
};
|
|
5274
|
+
}());
|
|
5275
|
+
|
|
5212
5276
|
_this.prodHost = props.prodHost || "https://www.accesstype.com";
|
|
5213
5277
|
_this.stagingHost = props.stagingHost || "https://staging.accesstype.com";
|
|
5214
5278
|
return _this;
|
|
@@ -5221,29 +5285,29 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5221
5285
|
}
|
|
5222
5286
|
}, {
|
|
5223
5287
|
key: "makePaymentObject",
|
|
5224
|
-
value: function makePaymentObject(
|
|
5225
|
-
var
|
|
5226
|
-
selectedPlan =
|
|
5227
|
-
|
|
5228
|
-
couponCode =
|
|
5229
|
-
|
|
5230
|
-
recipientSubscriber =
|
|
5231
|
-
|
|
5232
|
-
planType =
|
|
5233
|
-
|
|
5234
|
-
storyId =
|
|
5235
|
-
|
|
5236
|
-
storyHeadline =
|
|
5237
|
-
|
|
5238
|
-
storySlug =
|
|
5239
|
-
|
|
5240
|
-
paymentType =
|
|
5241
|
-
|
|
5242
|
-
successUrl =
|
|
5243
|
-
|
|
5244
|
-
returnUrl =
|
|
5245
|
-
|
|
5246
|
-
cancelUrl =
|
|
5288
|
+
value: function makePaymentObject(_ref16) {
|
|
5289
|
+
var _ref16$selectedPlan = _ref16.selectedPlan,
|
|
5290
|
+
selectedPlan = _ref16$selectedPlan === void 0 ? {} : _ref16$selectedPlan,
|
|
5291
|
+
_ref16$couponCode = _ref16.couponCode,
|
|
5292
|
+
couponCode = _ref16$couponCode === void 0 ? "" : _ref16$couponCode,
|
|
5293
|
+
_ref16$recipientSubsc = _ref16.recipientSubscriber,
|
|
5294
|
+
recipientSubscriber = _ref16$recipientSubsc === void 0 ? {} : _ref16$recipientSubsc,
|
|
5295
|
+
_ref16$planType = _ref16.planType,
|
|
5296
|
+
planType = _ref16$planType === void 0 ? "" : _ref16$planType,
|
|
5297
|
+
_ref16$storyId = _ref16.storyId,
|
|
5298
|
+
storyId = _ref16$storyId === void 0 ? "" : _ref16$storyId,
|
|
5299
|
+
_ref16$storyHeadline = _ref16.storyHeadline,
|
|
5300
|
+
storyHeadline = _ref16$storyHeadline === void 0 ? "" : _ref16$storyHeadline,
|
|
5301
|
+
_ref16$storySlug = _ref16.storySlug,
|
|
5302
|
+
storySlug = _ref16$storySlug === void 0 ? "" : _ref16$storySlug,
|
|
5303
|
+
_ref16$paymentType = _ref16.paymentType,
|
|
5304
|
+
paymentType = _ref16$paymentType === void 0 ? "" : _ref16$paymentType,
|
|
5305
|
+
_ref16$successUrl = _ref16.successUrl,
|
|
5306
|
+
successUrl = _ref16$successUrl === void 0 ? "" : _ref16$successUrl,
|
|
5307
|
+
_ref16$returnUrl = _ref16.returnUrl,
|
|
5308
|
+
returnUrl = _ref16$returnUrl === void 0 ? "" : _ref16$returnUrl,
|
|
5309
|
+
_ref16$cancelUrl = _ref16.cancelUrl,
|
|
5310
|
+
cancelUrl = _ref16$cancelUrl === void 0 ? "" : _ref16$cancelUrl;
|
|
5247
5311
|
var id = selectedPlan.id,
|
|
5248
5312
|
title = selectedPlan.title,
|
|
5249
5313
|
description = selectedPlan.description,
|
|
@@ -5334,7 +5398,9 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5334
5398
|
accessIsLoading: this.props.accessIsLoading,
|
|
5335
5399
|
getAssetPlans: this.props.getAssetPlans,
|
|
5336
5400
|
validateCoupon: this.validateCoupon,
|
|
5337
|
-
cancelSubscription: this.cancelSubscription
|
|
5401
|
+
cancelSubscription: this.cancelSubscription,
|
|
5402
|
+
getSubscriberMetadata: this.getSubscriberMetadata,
|
|
5403
|
+
setSubscriberMetadata: this.setSubscriberMetadata
|
|
5338
5404
|
});
|
|
5339
5405
|
}
|
|
5340
5406
|
}]);
|
|
@@ -5409,6 +5475,14 @@ var mapDispatchToProps$7 = function mapDispatchToProps(dispatch) {
|
|
|
5409
5475
|
* initOmisePayment| selectedPlan(object), planType(string) | Initialize the Omise payment
|
|
5410
5476
|
* initAdyenPayment| selectedPlan(object), planType(string), AdyenModal(React Component), locale(string) | Initialize Adyen Payment
|
|
5411
5477
|
* getAssetPlans| storyId(string) | Get Asset Subscription Plans
|
|
5478
|
+
* getSubscriberMetadata| Get the Subscriber Metadata
|
|
5479
|
+
* setSubscriberMetadata| subscriberMetadata(object), subscriberMetadata={"address": {
|
|
5480
|
+
"line1": "221B Bakers Street",
|
|
5481
|
+
"line2": "Near Watson Library",
|
|
5482
|
+
"city": "London",
|
|
5483
|
+
"state": "",
|
|
5484
|
+
},
|
|
5485
|
+
"phone_number": "007"}} | Update the Subscriber Metadata
|
|
5412
5486
|
* validateCoupon| selectedPlan(object), couponCode (string) | Validate coupon with plan
|
|
5413
5487
|
* cancelSubscription| subscriptionId(number) | Cancel a subscription
|
|
5414
5488
|
* getSubscriptionForUser | -NA- | Gets the subscriptions of the current logged in user
|
|
@@ -5456,7 +5530,7 @@ var mapDispatchToProps$7 = function mapDispatchToProps(dispatch) {
|
|
|
5456
5530
|
* stagingHost="https://staging.accesstype.com"
|
|
5457
5531
|
* accessTypeBkIntegrationId={accessTypeBkIntegrationId}
|
|
5458
5532
|
* >
|
|
5459
|
-
* {({ initAccessType, checkAccess, accessUpdated, accessIsLoading, validateCoupon, initRazorPayPayment, initStripePayment, initPaypalPayment, getSubscriptionForUser }) => (
|
|
5533
|
+
* {({ initAccessType, checkAccess, accessUpdated, accessIsLoading, validateCoupon, initRazorPayPayment, initStripePayment, initPaypalPayment, getSubscriptionForUser, getSubscriberMetadata, setSubscriberMetadata }) => (
|
|
5460
5534
|
* <div>
|
|
5461
5535
|
* <PaymentCheckoutLayout
|
|
5462
5536
|
* accessIsLoading={accessIsLoading}
|
|
@@ -5467,6 +5541,9 @@ var mapDispatchToProps$7 = function mapDispatchToProps(dispatch) {
|
|
|
5467
5541
|
* initStripePayment={initStripePayment}
|
|
5468
5542
|
* initPaypalPayment={initPaypalPayment}
|
|
5469
5543
|
* getSubscriptionForUser={getSubscriptionForUser}
|
|
5544
|
+
* getgetSubscriberMetadata={getgetSubscriberMetadata}
|
|
5545
|
+
* setSubscriberMetadata={setSubscriberMetadata}
|
|
5546
|
+
*
|
|
5470
5547
|
* {...this.props}
|
|
5471
5548
|
* />
|
|
5472
5549
|
* </div>
|
|
@@ -762,6 +762,70 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
762
762
|
};
|
|
763
763
|
}());
|
|
764
764
|
|
|
765
|
+
_defineProperty(_assertThisInitialized(_this), "getSubscriberMetadata", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
766
|
+
var metadata;
|
|
767
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
768
|
+
while (1) {
|
|
769
|
+
switch (_context12.prev = _context12.next) {
|
|
770
|
+
case 0:
|
|
771
|
+
if (global.AccessType) {
|
|
772
|
+
_context12.next = 2;
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
return _context12.abrupt("return", {});
|
|
777
|
+
|
|
778
|
+
case 2:
|
|
779
|
+
_context12.next = 4;
|
|
780
|
+
return awaitHelper(global.AccessType.getSubscriberMetadata());
|
|
781
|
+
|
|
782
|
+
case 4:
|
|
783
|
+
metadata = _context12.sent;
|
|
784
|
+
return _context12.abrupt("return", metadata);
|
|
785
|
+
|
|
786
|
+
case 6:
|
|
787
|
+
case "end":
|
|
788
|
+
return _context12.stop();
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}, _callee12);
|
|
792
|
+
})));
|
|
793
|
+
|
|
794
|
+
_defineProperty(_assertThisInitialized(_this), "setSubscriberMetadata", /*#__PURE__*/function () {
|
|
795
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(subscriberMetadata) {
|
|
796
|
+
var response;
|
|
797
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
798
|
+
while (1) {
|
|
799
|
+
switch (_context13.prev = _context13.next) {
|
|
800
|
+
case 0:
|
|
801
|
+
if (!(!global.AccessType || !subscriberMetadata)) {
|
|
802
|
+
_context13.next = 2;
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
return _context13.abrupt("return", {});
|
|
807
|
+
|
|
808
|
+
case 2:
|
|
809
|
+
_context13.next = 4;
|
|
810
|
+
return awaitHelper(global.AccessType.setSubscriberMetadata(subscriberMetadata));
|
|
811
|
+
|
|
812
|
+
case 4:
|
|
813
|
+
response = _context13.sent;
|
|
814
|
+
return _context13.abrupt("return", response);
|
|
815
|
+
|
|
816
|
+
case 6:
|
|
817
|
+
case "end":
|
|
818
|
+
return _context13.stop();
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}, _callee13);
|
|
822
|
+
}));
|
|
823
|
+
|
|
824
|
+
return function (_x9) {
|
|
825
|
+
return _ref15.apply(this, arguments);
|
|
826
|
+
};
|
|
827
|
+
}());
|
|
828
|
+
|
|
765
829
|
_this.prodHost = props.prodHost || "https://www.accesstype.com";
|
|
766
830
|
_this.stagingHost = props.stagingHost || "https://staging.accesstype.com";
|
|
767
831
|
return _this;
|
|
@@ -774,29 +838,29 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
774
838
|
}
|
|
775
839
|
}, {
|
|
776
840
|
key: "makePaymentObject",
|
|
777
|
-
value: function makePaymentObject(
|
|
778
|
-
var
|
|
779
|
-
selectedPlan =
|
|
780
|
-
|
|
781
|
-
couponCode =
|
|
782
|
-
|
|
783
|
-
recipientSubscriber =
|
|
784
|
-
|
|
785
|
-
planType =
|
|
786
|
-
|
|
787
|
-
storyId =
|
|
788
|
-
|
|
789
|
-
storyHeadline =
|
|
790
|
-
|
|
791
|
-
storySlug =
|
|
792
|
-
|
|
793
|
-
paymentType =
|
|
794
|
-
|
|
795
|
-
successUrl =
|
|
796
|
-
|
|
797
|
-
returnUrl =
|
|
798
|
-
|
|
799
|
-
cancelUrl =
|
|
841
|
+
value: function makePaymentObject(_ref16) {
|
|
842
|
+
var _ref16$selectedPlan = _ref16.selectedPlan,
|
|
843
|
+
selectedPlan = _ref16$selectedPlan === void 0 ? {} : _ref16$selectedPlan,
|
|
844
|
+
_ref16$couponCode = _ref16.couponCode,
|
|
845
|
+
couponCode = _ref16$couponCode === void 0 ? "" : _ref16$couponCode,
|
|
846
|
+
_ref16$recipientSubsc = _ref16.recipientSubscriber,
|
|
847
|
+
recipientSubscriber = _ref16$recipientSubsc === void 0 ? {} : _ref16$recipientSubsc,
|
|
848
|
+
_ref16$planType = _ref16.planType,
|
|
849
|
+
planType = _ref16$planType === void 0 ? "" : _ref16$planType,
|
|
850
|
+
_ref16$storyId = _ref16.storyId,
|
|
851
|
+
storyId = _ref16$storyId === void 0 ? "" : _ref16$storyId,
|
|
852
|
+
_ref16$storyHeadline = _ref16.storyHeadline,
|
|
853
|
+
storyHeadline = _ref16$storyHeadline === void 0 ? "" : _ref16$storyHeadline,
|
|
854
|
+
_ref16$storySlug = _ref16.storySlug,
|
|
855
|
+
storySlug = _ref16$storySlug === void 0 ? "" : _ref16$storySlug,
|
|
856
|
+
_ref16$paymentType = _ref16.paymentType,
|
|
857
|
+
paymentType = _ref16$paymentType === void 0 ? "" : _ref16$paymentType,
|
|
858
|
+
_ref16$successUrl = _ref16.successUrl,
|
|
859
|
+
successUrl = _ref16$successUrl === void 0 ? "" : _ref16$successUrl,
|
|
860
|
+
_ref16$returnUrl = _ref16.returnUrl,
|
|
861
|
+
returnUrl = _ref16$returnUrl === void 0 ? "" : _ref16$returnUrl,
|
|
862
|
+
_ref16$cancelUrl = _ref16.cancelUrl,
|
|
863
|
+
cancelUrl = _ref16$cancelUrl === void 0 ? "" : _ref16$cancelUrl;
|
|
800
864
|
var id = selectedPlan.id,
|
|
801
865
|
title = selectedPlan.title,
|
|
802
866
|
description = selectedPlan.description,
|
|
@@ -887,7 +951,9 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
887
951
|
accessIsLoading: this.props.accessIsLoading,
|
|
888
952
|
getAssetPlans: this.props.getAssetPlans,
|
|
889
953
|
validateCoupon: this.validateCoupon,
|
|
890
|
-
cancelSubscription: this.cancelSubscription
|
|
954
|
+
cancelSubscription: this.cancelSubscription,
|
|
955
|
+
getSubscriberMetadata: this.getSubscriberMetadata,
|
|
956
|
+
setSubscriberMetadata: this.setSubscriberMetadata
|
|
891
957
|
});
|
|
892
958
|
}
|
|
893
959
|
}]);
|
|
@@ -962,6 +1028,14 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
|
962
1028
|
* initOmisePayment| selectedPlan(object), planType(string) | Initialize the Omise payment
|
|
963
1029
|
* initAdyenPayment| selectedPlan(object), planType(string), AdyenModal(React Component), locale(string) | Initialize Adyen Payment
|
|
964
1030
|
* getAssetPlans| storyId(string) | Get Asset Subscription Plans
|
|
1031
|
+
* getSubscriberMetadata| Get the Subscriber Metadata
|
|
1032
|
+
* setSubscriberMetadata| subscriberMetadata(object), subscriberMetadata={"address": {
|
|
1033
|
+
"line1": "221B Bakers Street",
|
|
1034
|
+
"line2": "Near Watson Library",
|
|
1035
|
+
"city": "London",
|
|
1036
|
+
"state": "",
|
|
1037
|
+
},
|
|
1038
|
+
"phone_number": "007"}} | Update the Subscriber Metadata
|
|
965
1039
|
* validateCoupon| selectedPlan(object), couponCode (string) | Validate coupon with plan
|
|
966
1040
|
* cancelSubscription| subscriptionId(number) | Cancel a subscription
|
|
967
1041
|
* getSubscriptionForUser | -NA- | Gets the subscriptions of the current logged in user
|
|
@@ -1009,7 +1083,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
|
1009
1083
|
* stagingHost="https://staging.accesstype.com"
|
|
1010
1084
|
* accessTypeBkIntegrationId={accessTypeBkIntegrationId}
|
|
1011
1085
|
* >
|
|
1012
|
-
* {({ initAccessType, checkAccess, accessUpdated, accessIsLoading, validateCoupon, initRazorPayPayment, initStripePayment, initPaypalPayment, getSubscriptionForUser }) => (
|
|
1086
|
+
* {({ initAccessType, checkAccess, accessUpdated, accessIsLoading, validateCoupon, initRazorPayPayment, initStripePayment, initPaypalPayment, getSubscriptionForUser, getSubscriberMetadata, setSubscriberMetadata }) => (
|
|
1013
1087
|
* <div>
|
|
1014
1088
|
* <PaymentCheckoutLayout
|
|
1015
1089
|
* accessIsLoading={accessIsLoading}
|
|
@@ -1020,6 +1094,9 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
|
1020
1094
|
* initStripePayment={initStripePayment}
|
|
1021
1095
|
* initPaypalPayment={initPaypalPayment}
|
|
1022
1096
|
* getSubscriptionForUser={getSubscriptionForUser}
|
|
1097
|
+
* getgetSubscriberMetadata={getgetSubscriberMetadata}
|
|
1098
|
+
* setSubscriberMetadata={setSubscriberMetadata}
|
|
1099
|
+
*
|
|
1023
1100
|
* {...this.props}
|
|
1024
1101
|
* />
|
|
1025
1102
|
* </div>
|