@rtsdk/topia 0.1.1 → 0.2.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/index.cjs CHANGED
@@ -39751,21 +39751,20 @@ const {
39751
39751
  */
39752
39752
  class SDKController {
39753
39753
  constructor(topia, credentials = {}) {
39754
- const { assetId, interactiveNonce, visitorId, apiKey } = credentials;
39754
+ const { assetId = null, interactiveNonce = null, visitorId = null, apiKey = null } = credentials;
39755
39755
  this.topia = topia;
39756
39756
  this.credentials = credentials;
39757
39757
  this.requestOptions = {};
39758
39758
  let payload = {};
39759
39759
  const headers = {};
39760
- if (visitorId && assetId && interactiveNonce) {
39761
- payload = {
39762
- interactiveNonce,
39763
- visitorId,
39764
- assetId,
39765
- };
39766
- this.jwt = jwt.sign(payload, topia.interactiveSecret);
39767
- headers.InteractiveJWT = this.jwt;
39768
- }
39760
+ payload = {
39761
+ interactiveNonce,
39762
+ visitorId,
39763
+ assetId,
39764
+ date: new Date(),
39765
+ };
39766
+ this.jwt = jwt.sign(payload, topia.interactiveSecret);
39767
+ headers.InteractiveJWT = this.jwt;
39769
39768
  if (apiKey) {
39770
39769
  headers.Authorization = apiKey;
39771
39770
  }
@@ -40022,7 +40021,7 @@ class DroppedAsset extends Asset {
40022
40021
  * });
40023
40022
  * ```
40024
40023
  */
40025
- updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, portalName, position, }) {
40024
+ updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }) {
40026
40025
  try {
40027
40026
  return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, {
40028
40027
  clickType,
@@ -40030,6 +40029,8 @@ class DroppedAsset extends Asset {
40030
40029
  clickableLinkTitle,
40031
40030
  clickableDisplayTextDescription,
40032
40031
  clickableDisplayTextHeadline,
40032
+ isForceLinkInIframe,
40033
+ isOpenLinkInDrawer,
40033
40034
  portalName,
40034
40035
  position,
40035
40036
  }, "change-click-type");
@@ -40579,7 +40580,7 @@ var _User_assetsMap, _User_scenesMap, _User_worldsMap;
40579
40580
  * ```
40580
40581
  */
40581
40582
  class User extends SDKController {
40582
- constructor(topia, options = { credentials: {} }) {
40583
+ constructor(topia, options = { profileId: null, credentials: {} }) {
40583
40584
  super(topia, options.credentials);
40584
40585
  _User_assetsMap.set(this, void 0);
40585
40586
  _User_scenesMap.set(this, void 0);
@@ -40587,6 +40588,9 @@ class User extends SDKController {
40587
40588
  __classPrivateFieldSet(this, _User_assetsMap, {}, "f");
40588
40589
  __classPrivateFieldSet(this, _User_scenesMap, {}, "f");
40589
40590
  __classPrivateFieldSet(this, _User_worldsMap, {}, "f");
40591
+ this.profileId = options.profileId;
40592
+ this.dataObject = {};
40593
+ this.profile = {};
40590
40594
  }
40591
40595
  get assets() {
40592
40596
  return __classPrivateFieldGet(this, _User_assetsMap, "f");
@@ -40679,6 +40683,85 @@ class User extends SDKController {
40679
40683
  }
40680
40684
  });
40681
40685
  }
40686
+ /**
40687
+ * @summary
40688
+ * Retrieves the data object for a visitor.
40689
+ *
40690
+ * @usage
40691
+ * ```ts
40692
+ * await droppedAsset.fetchUserDataObject();
40693
+ * const { dataObject } = droppedAsset;
40694
+ * ```
40695
+ */
40696
+ fetchUserDataObject() {
40697
+ return __awaiter(this, void 0, void 0, function* () {
40698
+ try {
40699
+ if (!this.profileId)
40700
+ throw "This method requires the use of a profileId";
40701
+ const response = yield this.topiaPublicApi().get(`/user/dataObjects/${this.profileId}/get-data-object`, this.requestOptions);
40702
+ this.dataObject = response.data;
40703
+ }
40704
+ catch (error) {
40705
+ throw this.errorHandler({ error });
40706
+ }
40707
+ });
40708
+ }
40709
+ /**
40710
+ * @summary
40711
+ * Sets the data object for a visitor.
40712
+ *
40713
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40714
+ *
40715
+ * @usage
40716
+ * ```ts
40717
+ * await droppedAsset.setUserDataObject({
40718
+ * "exampleKey": "exampleValue",
40719
+ * });
40720
+ * const { dataObject } = droppedAsset;
40721
+ * ```
40722
+ */
40723
+ setUserDataObject(dataObject, options = {}) {
40724
+ return __awaiter(this, void 0, void 0, function* () {
40725
+ try {
40726
+ if (!this.profileId)
40727
+ throw "This method requires the use of a profileId";
40728
+ const { lock = {} } = options;
40729
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/set-data-object`, { dataObject, lock }, this.requestOptions);
40730
+ this.dataObject = dataObject;
40731
+ }
40732
+ catch (error) {
40733
+ throw this.errorHandler({ error });
40734
+ }
40735
+ });
40736
+ }
40737
+ /**
40738
+ * @summary
40739
+ * Updates the data object for a visitor.
40740
+ *
40741
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40742
+ *
40743
+ * @usage
40744
+ * ```ts
40745
+ * await droppedAsset.updateUserDataObject({
40746
+ * "exampleKey": "exampleValue",
40747
+ * });
40748
+ * const { dataObject } = droppedAsset;
40749
+ * ```
40750
+ */
40751
+ updateUserDataObject(dataObject, options = {}) {
40752
+ return __awaiter(this, void 0, void 0, function* () {
40753
+ try {
40754
+ if (!this.profileId)
40755
+ throw "This method requires the use of a profileId";
40756
+ const { lock = {} } = options;
40757
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/update-data-object`, { dataObject, lock }, this.requestOptions);
40758
+ this.dataObject = dataObject;
40759
+ }
40760
+ catch (error) {
40761
+ throw this.errorHandler({ error });
40762
+ }
40763
+ });
40764
+ }
40682
40765
  }
40683
40766
  _User_assetsMap = new WeakMap(), _User_scenesMap = new WeakMap(), _User_worldsMap = new WeakMap();
40684
40767
 
@@ -40762,6 +40845,79 @@ class Visitor extends User {
40762
40845
  }
40763
40846
  });
40764
40847
  }
40848
+ /**
40849
+ * @summary
40850
+ * Retrieves the data object for a visitor.
40851
+ *
40852
+ * @usage
40853
+ * ```ts
40854
+ * await droppedAsset.fetchVisitorDataObject();
40855
+ * const { dataObject } = droppedAsset;
40856
+ * ```
40857
+ */
40858
+ fetchVisitorDataObject() {
40859
+ return __awaiter(this, void 0, void 0, function* () {
40860
+ try {
40861
+ const response = yield this.topiaPublicApi().get(`/visitor/${this.urlSlug}/visitors/${this.id}/get-data-object`, this.requestOptions);
40862
+ this.dataObject = response.data;
40863
+ }
40864
+ catch (error) {
40865
+ throw this.errorHandler({ error });
40866
+ }
40867
+ });
40868
+ }
40869
+ /**
40870
+ * @summary
40871
+ * Sets the data object for a visitor.
40872
+ *
40873
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40874
+ *
40875
+ * @usage
40876
+ * ```ts
40877
+ * await droppedAsset.setVisitorDataObject({
40878
+ * "exampleKey": "exampleValue",
40879
+ * });
40880
+ * const { dataObject } = droppedAsset;
40881
+ * ```
40882
+ */
40883
+ setVisitorDataObject(dataObject, options = {}) {
40884
+ return __awaiter(this, void 0, void 0, function* () {
40885
+ try {
40886
+ const { lock = {} } = options;
40887
+ yield this.topiaPublicApi().put(`/visitor/${this.urlSlug}/visitors/${this.id}/set-data-object`, { dataObject, lock }, this.requestOptions);
40888
+ this.dataObject = dataObject;
40889
+ }
40890
+ catch (error) {
40891
+ throw this.errorHandler({ error });
40892
+ }
40893
+ });
40894
+ }
40895
+ /**
40896
+ * @summary
40897
+ * Updates the data object for a visitor.
40898
+ *
40899
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40900
+ *
40901
+ * @usage
40902
+ * ```ts
40903
+ * await droppedAsset.updateVisitorDataObject({
40904
+ * "exampleKey": "exampleValue",
40905
+ * });
40906
+ * const { dataObject } = droppedAsset;
40907
+ * ```
40908
+ */
40909
+ updateVisitorDataObject(dataObject, options = {}) {
40910
+ return __awaiter(this, void 0, void 0, function* () {
40911
+ try {
40912
+ const { lock = {} } = options;
40913
+ yield this.topiaPublicApi().put(`/visitor/${this.urlSlug}/visitors/${this.id}/update-data-object`, { dataObject, lock }, this.requestOptions);
40914
+ this.dataObject = dataObject;
40915
+ }
40916
+ catch (error) {
40917
+ throw this.errorHandler({ error });
40918
+ }
40919
+ });
40920
+ }
40765
40921
  }
40766
40922
 
40767
40923
  var _WorldActivity_visitorsMap;
package/dist/index.js CHANGED
@@ -39749,21 +39749,20 @@ const {
39749
39749
  */
39750
39750
  class SDKController {
39751
39751
  constructor(topia, credentials = {}) {
39752
- const { assetId, interactiveNonce, visitorId, apiKey } = credentials;
39752
+ const { assetId = null, interactiveNonce = null, visitorId = null, apiKey = null } = credentials;
39753
39753
  this.topia = topia;
39754
39754
  this.credentials = credentials;
39755
39755
  this.requestOptions = {};
39756
39756
  let payload = {};
39757
39757
  const headers = {};
39758
- if (visitorId && assetId && interactiveNonce) {
39759
- payload = {
39760
- interactiveNonce,
39761
- visitorId,
39762
- assetId,
39763
- };
39764
- this.jwt = jwt.sign(payload, topia.interactiveSecret);
39765
- headers.InteractiveJWT = this.jwt;
39766
- }
39758
+ payload = {
39759
+ interactiveNonce,
39760
+ visitorId,
39761
+ assetId,
39762
+ date: new Date(),
39763
+ };
39764
+ this.jwt = jwt.sign(payload, topia.interactiveSecret);
39765
+ headers.InteractiveJWT = this.jwt;
39767
39766
  if (apiKey) {
39768
39767
  headers.Authorization = apiKey;
39769
39768
  }
@@ -40020,7 +40019,7 @@ class DroppedAsset extends Asset {
40020
40019
  * });
40021
40020
  * ```
40022
40021
  */
40023
- updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, portalName, position, }) {
40022
+ updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }) {
40024
40023
  try {
40025
40024
  return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, {
40026
40025
  clickType,
@@ -40028,6 +40027,8 @@ class DroppedAsset extends Asset {
40028
40027
  clickableLinkTitle,
40029
40028
  clickableDisplayTextDescription,
40030
40029
  clickableDisplayTextHeadline,
40030
+ isForceLinkInIframe,
40031
+ isOpenLinkInDrawer,
40031
40032
  portalName,
40032
40033
  position,
40033
40034
  }, "change-click-type");
@@ -40577,7 +40578,7 @@ var _User_assetsMap, _User_scenesMap, _User_worldsMap;
40577
40578
  * ```
40578
40579
  */
40579
40580
  class User extends SDKController {
40580
- constructor(topia, options = { credentials: {} }) {
40581
+ constructor(topia, options = { profileId: null, credentials: {} }) {
40581
40582
  super(topia, options.credentials);
40582
40583
  _User_assetsMap.set(this, void 0);
40583
40584
  _User_scenesMap.set(this, void 0);
@@ -40585,6 +40586,9 @@ class User extends SDKController {
40585
40586
  __classPrivateFieldSet(this, _User_assetsMap, {}, "f");
40586
40587
  __classPrivateFieldSet(this, _User_scenesMap, {}, "f");
40587
40588
  __classPrivateFieldSet(this, _User_worldsMap, {}, "f");
40589
+ this.profileId = options.profileId;
40590
+ this.dataObject = {};
40591
+ this.profile = {};
40588
40592
  }
40589
40593
  get assets() {
40590
40594
  return __classPrivateFieldGet(this, _User_assetsMap, "f");
@@ -40677,6 +40681,85 @@ class User extends SDKController {
40677
40681
  }
40678
40682
  });
40679
40683
  }
40684
+ /**
40685
+ * @summary
40686
+ * Retrieves the data object for a visitor.
40687
+ *
40688
+ * @usage
40689
+ * ```ts
40690
+ * await droppedAsset.fetchUserDataObject();
40691
+ * const { dataObject } = droppedAsset;
40692
+ * ```
40693
+ */
40694
+ fetchUserDataObject() {
40695
+ return __awaiter(this, void 0, void 0, function* () {
40696
+ try {
40697
+ if (!this.profileId)
40698
+ throw "This method requires the use of a profileId";
40699
+ const response = yield this.topiaPublicApi().get(`/user/dataObjects/${this.profileId}/get-data-object`, this.requestOptions);
40700
+ this.dataObject = response.data;
40701
+ }
40702
+ catch (error) {
40703
+ throw this.errorHandler({ error });
40704
+ }
40705
+ });
40706
+ }
40707
+ /**
40708
+ * @summary
40709
+ * Sets the data object for a visitor.
40710
+ *
40711
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40712
+ *
40713
+ * @usage
40714
+ * ```ts
40715
+ * await droppedAsset.setUserDataObject({
40716
+ * "exampleKey": "exampleValue",
40717
+ * });
40718
+ * const { dataObject } = droppedAsset;
40719
+ * ```
40720
+ */
40721
+ setUserDataObject(dataObject, options = {}) {
40722
+ return __awaiter(this, void 0, void 0, function* () {
40723
+ try {
40724
+ if (!this.profileId)
40725
+ throw "This method requires the use of a profileId";
40726
+ const { lock = {} } = options;
40727
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/set-data-object`, { dataObject, lock }, this.requestOptions);
40728
+ this.dataObject = dataObject;
40729
+ }
40730
+ catch (error) {
40731
+ throw this.errorHandler({ error });
40732
+ }
40733
+ });
40734
+ }
40735
+ /**
40736
+ * @summary
40737
+ * Updates the data object for a visitor.
40738
+ *
40739
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40740
+ *
40741
+ * @usage
40742
+ * ```ts
40743
+ * await droppedAsset.updateUserDataObject({
40744
+ * "exampleKey": "exampleValue",
40745
+ * });
40746
+ * const { dataObject } = droppedAsset;
40747
+ * ```
40748
+ */
40749
+ updateUserDataObject(dataObject, options = {}) {
40750
+ return __awaiter(this, void 0, void 0, function* () {
40751
+ try {
40752
+ if (!this.profileId)
40753
+ throw "This method requires the use of a profileId";
40754
+ const { lock = {} } = options;
40755
+ yield this.topiaPublicApi().put(`/user/dataObjects/${this.profileId}/update-data-object`, { dataObject, lock }, this.requestOptions);
40756
+ this.dataObject = dataObject;
40757
+ }
40758
+ catch (error) {
40759
+ throw this.errorHandler({ error });
40760
+ }
40761
+ });
40762
+ }
40680
40763
  }
40681
40764
  _User_assetsMap = new WeakMap(), _User_scenesMap = new WeakMap(), _User_worldsMap = new WeakMap();
40682
40765
 
@@ -40760,6 +40843,79 @@ class Visitor extends User {
40760
40843
  }
40761
40844
  });
40762
40845
  }
40846
+ /**
40847
+ * @summary
40848
+ * Retrieves the data object for a visitor.
40849
+ *
40850
+ * @usage
40851
+ * ```ts
40852
+ * await droppedAsset.fetchVisitorDataObject();
40853
+ * const { dataObject } = droppedAsset;
40854
+ * ```
40855
+ */
40856
+ fetchVisitorDataObject() {
40857
+ return __awaiter(this, void 0, void 0, function* () {
40858
+ try {
40859
+ const response = yield this.topiaPublicApi().get(`/visitor/${this.urlSlug}/visitors/${this.id}/get-data-object`, this.requestOptions);
40860
+ this.dataObject = response.data;
40861
+ }
40862
+ catch (error) {
40863
+ throw this.errorHandler({ error });
40864
+ }
40865
+ });
40866
+ }
40867
+ /**
40868
+ * @summary
40869
+ * Sets the data object for a visitor.
40870
+ *
40871
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40872
+ *
40873
+ * @usage
40874
+ * ```ts
40875
+ * await droppedAsset.setVisitorDataObject({
40876
+ * "exampleKey": "exampleValue",
40877
+ * });
40878
+ * const { dataObject } = droppedAsset;
40879
+ * ```
40880
+ */
40881
+ setVisitorDataObject(dataObject, options = {}) {
40882
+ return __awaiter(this, void 0, void 0, function* () {
40883
+ try {
40884
+ const { lock = {} } = options;
40885
+ yield this.topiaPublicApi().put(`/visitor/${this.urlSlug}/visitors/${this.id}/set-data-object`, { dataObject, lock }, this.requestOptions);
40886
+ this.dataObject = dataObject;
40887
+ }
40888
+ catch (error) {
40889
+ throw this.errorHandler({ error });
40890
+ }
40891
+ });
40892
+ }
40893
+ /**
40894
+ * @summary
40895
+ * Updates the data object for a visitor.
40896
+ *
40897
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
40898
+ *
40899
+ * @usage
40900
+ * ```ts
40901
+ * await droppedAsset.updateVisitorDataObject({
40902
+ * "exampleKey": "exampleValue",
40903
+ * });
40904
+ * const { dataObject } = droppedAsset;
40905
+ * ```
40906
+ */
40907
+ updateVisitorDataObject(dataObject, options = {}) {
40908
+ return __awaiter(this, void 0, void 0, function* () {
40909
+ try {
40910
+ const { lock = {} } = options;
40911
+ yield this.topiaPublicApi().put(`/visitor/${this.urlSlug}/visitors/${this.id}/update-data-object`, { dataObject, lock }, this.requestOptions);
40912
+ this.dataObject = dataObject;
40913
+ }
40914
+ catch (error) {
40915
+ throw this.errorHandler({ error });
40916
+ }
40917
+ });
40918
+ }
40763
40919
  }
40764
40920
 
40765
40921
  var _WorldActivity_visitorsMap;
@@ -127,7 +127,7 @@ export declare class DroppedAsset extends Asset implements DroppedAssetInterface
127
127
  * });
128
128
  * ```
129
129
  */
130
- updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType>;
130
+ updateClickType({ clickType, clickableLink, clickableLinkTitle, clickableDisplayTextDescription, clickableDisplayTextHeadline, isForceLinkInIframe, isOpenLinkInDrawer, portalName, position, }: UpdateClickTypeInterface): Promise<void | ResponseType>;
131
131
  /**
132
132
  * @summary
133
133
  * Updates text and style of a dropped asset.
@@ -16,6 +16,9 @@ import { ResponseType } from "types";
16
16
  */
17
17
  export declare class User extends SDKController {
18
18
  #private;
19
+ profileId?: string | null;
20
+ dataObject?: object;
21
+ profile?: object;
19
22
  constructor(topia: Topia, options?: UserOptionalInterface);
20
23
  get assets(): {
21
24
  [key: string]: Asset;
@@ -54,5 +57,56 @@ export declare class User extends SDKController {
54
57
  * ```
55
58
  */
56
59
  fetchWorldsByKey(): Promise<void | ResponseType>;
60
+ /**
61
+ * @summary
62
+ * Retrieves the data object for a visitor.
63
+ *
64
+ * @usage
65
+ * ```ts
66
+ * await droppedAsset.fetchUserDataObject();
67
+ * const { dataObject } = droppedAsset;
68
+ * ```
69
+ */
70
+ fetchUserDataObject(): Promise<void | ResponseType>;
71
+ /**
72
+ * @summary
73
+ * Sets the data object for a visitor.
74
+ *
75
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
76
+ *
77
+ * @usage
78
+ * ```ts
79
+ * await droppedAsset.setUserDataObject({
80
+ * "exampleKey": "exampleValue",
81
+ * });
82
+ * const { dataObject } = droppedAsset;
83
+ * ```
84
+ */
85
+ setUserDataObject(dataObject: object, options?: {
86
+ lock?: {
87
+ lockId: string;
88
+ releaseLock?: boolean;
89
+ };
90
+ }): Promise<void | ResponseType>;
91
+ /**
92
+ * @summary
93
+ * Updates the data object for a visitor.
94
+ *
95
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
96
+ *
97
+ * @usage
98
+ * ```ts
99
+ * await droppedAsset.updateUserDataObject({
100
+ * "exampleKey": "exampleValue",
101
+ * });
102
+ * const { dataObject } = droppedAsset;
103
+ * ```
104
+ */
105
+ updateUserDataObject(dataObject: object, options?: {
106
+ lock?: {
107
+ lockId: string;
108
+ releaseLock?: boolean;
109
+ };
110
+ }): Promise<void | ResponseType>;
57
111
  }
58
112
  export default User;
@@ -46,5 +46,56 @@ export declare class Visitor extends User implements VisitorInterface {
46
46
  * Updates each Visitor instance and world.visitors map.
47
47
  */
48
48
  moveVisitor({ shouldTeleportVisitor, x, y }: MoveVisitorInterface): Promise<void | ResponseType>;
49
+ /**
50
+ * @summary
51
+ * Retrieves the data object for a visitor.
52
+ *
53
+ * @usage
54
+ * ```ts
55
+ * await droppedAsset.fetchVisitorDataObject();
56
+ * const { dataObject } = droppedAsset;
57
+ * ```
58
+ */
59
+ fetchVisitorDataObject(): Promise<void | ResponseType>;
60
+ /**
61
+ * @summary
62
+ * Sets the data object for a visitor.
63
+ *
64
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
65
+ *
66
+ * @usage
67
+ * ```ts
68
+ * await droppedAsset.setVisitorDataObject({
69
+ * "exampleKey": "exampleValue",
70
+ * });
71
+ * const { dataObject } = droppedAsset;
72
+ * ```
73
+ */
74
+ setVisitorDataObject(dataObject: object, options?: {
75
+ lock?: {
76
+ lockId: string;
77
+ releaseLock?: boolean;
78
+ };
79
+ }): Promise<void | ResponseType>;
80
+ /**
81
+ * @summary
82
+ * Updates the data object for a visitor.
83
+ *
84
+ * Optionally, a lock can be provided with this request to ensure only one update happens at a time between all updates that share the same lock id
85
+ *
86
+ * @usage
87
+ * ```ts
88
+ * await droppedAsset.updateVisitorDataObject({
89
+ * "exampleKey": "exampleValue",
90
+ * });
91
+ * const { dataObject } = droppedAsset;
92
+ * ```
93
+ */
94
+ updateVisitorDataObject(dataObject: object, options?: {
95
+ lock?: {
96
+ lockId: string;
97
+ releaseLock?: boolean;
98
+ };
99
+ }): Promise<void | ResponseType>;
49
100
  }
50
101
  export default Visitor;
@@ -79,6 +79,8 @@ export interface UpdateClickTypeInterface {
79
79
  clickableLinkTitle: string;
80
80
  clickableDisplayTextDescription: string;
81
81
  clickableDisplayTextHeadline: string;
82
+ isForceLinkInIframe?: boolean;
83
+ isOpenLinkInDrawer?: boolean;
82
84
  portalName: string;
83
85
  position: {
84
86
  x: number;
@@ -1,6 +1,7 @@
1
1
  import { InteractiveCredentials } from "types";
2
2
  export interface UserOptionalInterface {
3
3
  credentials?: InteractiveCredentials | object;
4
+ profileId?: string | null;
4
5
  visitorId?: number | null;
5
6
  urlSlug?: string;
6
7
  }
package/package.json CHANGED
@@ -56,6 +56,5 @@
56
56
  "local-publish": "yarn build && yalc publish --push --no-scripts"
57
57
  },
58
58
  "type": "module",
59
- "types": "dist/types/src/index.d.ts",
60
- "version": "0.1.1"
59
+ "version": "0.2.0"
61
60
  }