@alwaysmeticulous/sdk-bundles-api 2.217.0 → 2.218.1

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.
@@ -10,6 +10,7 @@ export type MeticulousPublicApi = MeticulousPublicApiCommon & ({
10
10
  });
11
11
  export interface MeticulousPublicApiCommon {
12
12
  isRunningAsTest?: boolean;
13
+ context: MeticulousPublicContextApi;
13
14
  }
14
15
  export interface MeticulousPublicReplayApi {
15
16
  /**
@@ -76,6 +77,7 @@ export interface MeticulousPublicRecordApi {
76
77
  * Record the id of the logged in user (e.g. a user id from a database for the application Meticulous
77
78
  * is testing). This is associated with the session and can make it easier to find sessions for a
78
79
  * specific user.
80
+ * @deprecated Use the same method in window.Meticulous.context instead.
79
81
  */
80
82
  recordUserId(userId: string): {
81
83
  success: boolean;
@@ -83,6 +85,41 @@ export interface MeticulousPublicRecordApi {
83
85
  /**
84
86
  * Record the email address of the logged in user. This is associated with the session
85
87
  * and can make it easier to find sessions for a specific user.
88
+ * @deprecated Use the same method in window.Meticulous.context instead.
89
+ */
90
+ recordUserEmail(emailAddress: string): {
91
+ success: boolean;
92
+ };
93
+ }
94
+ export interface MeticulousPublicContextApi {
95
+ /**
96
+ * Call this method to record the value of a feature flag. If this method is called multiple times
97
+ * with the same label, the value will be overwritten.
98
+ */
99
+ recordFeatureFlag(label: string, value: string | boolean): {
100
+ success: boolean;
101
+ };
102
+ /**
103
+ * Call this method to record some custom context about the session. For instance, you could use
104
+ * this to capture whether a user is opted into beta features, or what colour scheme they have
105
+ * selected in your app. If this method is called multiple times with the same label, the value
106
+ * will be overwritten.
107
+ */
108
+ recordCustomContext(label: string, value: string | boolean): {
109
+ success: boolean;
110
+ };
111
+ /**
112
+ * Record the id of the logged in user (e.g. a user id from a database for the application Meticulous
113
+ * is testing). This is associated with the session and can make it easier to find sessions for a
114
+ * specific user. If this method is called multiple times, the value will be overwritten.
115
+ */
116
+ recordUserId(userId: string): {
117
+ success: boolean;
118
+ };
119
+ /**
120
+ * Record the email address of the logged in user. This is associated with the session
121
+ * and can make it easier to find sessions for a specific user. If this method is called
122
+ * multiple times, the value will be overwritten.
86
123
  */
87
124
  recordUserEmail(emailAddress: string): {
88
125
  success: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/sdk-bundles-api",
3
- "version": "2.217.0",
3
+ "version": "2.218.1",
4
4
  "description": "Meticulous common types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "depcheck": "depcheck --ignore-patterns=dist"
20
20
  },
21
21
  "dependencies": {
22
- "@alwaysmeticulous/api": "^2.217.0"
22
+ "@alwaysmeticulous/api": "^2.218.1"
23
23
  },
24
24
  "author": {
25
25
  "name": "The Meticulous Team",
@@ -38,5 +38,5 @@
38
38
  "bugs": {
39
39
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
40
40
  },
41
- "gitHead": "59ed023e008f2ca41ece40339690e775702861b4"
41
+ "gitHead": "96a25d0fdd70d83e486a6d441ef32aa43c734765"
42
42
  }