@loomhq/record-sdk 3.1.1-draft → 3.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/README.md CHANGED
@@ -1,3 +1,147 @@
1
1
  # @loomhq/record-sdk
2
2
 
3
+ ## 3.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bb42d5cf15: The parameters required for `setup()` have changed!
8
+
9
+ ```typescript
10
+ export interface StandardSDK {
11
+ mode: 'standard';
12
+ publicAppId: string;
13
+ environment?: Environment;
14
+ config?: SDKConfig;
15
+ }
16
+
17
+ export interface CustomSDK {
18
+ mode: 'custom';
19
+ jws: string;
20
+ environment?: Environment;
21
+ config?: SDKConfig;
22
+ }
23
+
24
+ export interface FirstPartyMode {
25
+ config?: SDKConfig;
26
+ environment?: Environment;
27
+ jws: string;
28
+ mode: 'first-party';
29
+ publicAppId: string;
30
+ siteId: string;
31
+ }
32
+
33
+ export type SetupArgs = StandardSDK | CustomSDK | FirstPartyMode;
34
+ ```
35
+
36
+ `setup` can infer whether to use "custom" or "standard" modes.
37
+
38
+ **Introducing:** `createInstance`, a setup method that supports "First-party-mode" for the `@loomhq/record-sdk`.
39
+
40
+ There are now three operating modes of the SDK:
41
+
42
+ - Standard
43
+ - Custom
44
+ - First Party
45
+
46
+ For the sake of simplicity, the engineer needs to explicitly say which mode they want to use.
47
+
48
+ ```typscript
49
+ // Example
50
+ const publicAppId: '<my public key>';
51
+
52
+ const instance = await create({
53
+ mode: 'standard',
54
+ publicAppId,
55
+ });
56
+ ```
57
+
58
+ ## What's first-party mode?
59
+
60
+ "First Party" mode is for our integration with Atlassian. This is not relevant externally to the company, so won't be documented on our developer docs.
61
+
62
+ See an overview of the exchange:
63
+
64
+ ```mermaid
65
+ sequenceDiagram
66
+ actor B as Browser
67
+ participant B2 as IFrame
68
+ participant A as Atlassian-lith
69
+ participant E as Loom API
70
+ participant D as Cache
71
+
72
+ B ->> A: I need a token for the SDK
73
+
74
+ A ->> E: proxy request to Loom API
75
+
76
+ note over E: Validate request from [Atlassian]
77
+
78
+ E ->> D: Record nonce
79
+
80
+ note over E: Verify customer is known
81
+ note over E: Create a JWS
82
+
83
+
84
+ E ->> A: Here is a JWS token
85
+
86
+ A ->> B: Here's your token
87
+
88
+ note over B: Configure the SDK
89
+ B ->> B2: Load
90
+ B2 ->> E: Please load the SDK background (Here's a JWS)
91
+
92
+ note over E: Validate the JWS
93
+
94
+ E->>+D: Validate the nonce
95
+
96
+ note over E: Mint the session
97
+
98
+ E ->> B2: Here's a peripheral session cookie
99
+
100
+ B2 ->> B: Store these partitioned cookies please
101
+
102
+ note over B: Cool, I can now do stuff with [Third party]
103
+ ```
104
+
105
+ Q: Why is this happening?
106
+ A: We're giving Atlassian a level of trust that we wouldn't give to a third-party
107
+
108
+ **Explained:** Atlassian will request a minted token from Loom's internal API for any Atlassian-mastered Loom account. To mitigate risk we're doing a handful of things. These two items are important:
109
+
110
+ - Using Atlassian's SLAuth and User-context schemes on the internal API, to verify the request is valid and comes from Atlassian
111
+ - Minted tokens can only be redeemed for a "peripheral session cookie" (They can only view embeds and record with the SDK)
112
+
113
+ You can think of "first-party" mode as an intermediary step before all accounts are Atlassian-mastered and we replace Loom auth with Atlassian identity.
114
+
115
+ ### Patch Changes
116
+
117
+ - 142ef8c30e: Implement foundations for onboarding
118
+ - 6a7f688ad8: navigate to share page edit tab when users are logged in
119
+ - 75c95a7853: Add in product name and entry point name into the recording start event
120
+ - cf9cde4bb3: Add types export to record-sdk package
121
+ - 7e223459ff: Add internal alpha banner for Hello domain
122
+ - cf01845b27: bump Lens v11.9.0 to add small loader
123
+ - 3df205aeb9: Be explicit about the different modes the recorder can be in.
124
+
125
+ Changes:
126
+
127
+ - Deprecate `setApiKey` action
128
+ - Deprecate `setJws` action
129
+ - Introduce `setMode` action
130
+
131
+ The recorder can be in one of four modes:
132
+
133
+ - PendingSDK _(The recorder has been initialized)_
134
+ - CustomSDK
135
+ - StandardSDK
136
+ - First-Party
137
+
138
+ @loomhq/record-sdk@3.11 and bellow will continue to use setApiKey and setJws. When these actions are used, sdk-background will transform these actions to be as though setMode was used.
139
+
140
+ - 7e8de46708: add pre record menu analytics for the sdk
141
+ - 211ebf0d1d: Add in product identifier and entry point
142
+ - ef1c6c934a: Add changeset
143
+ - 6adf796331: Bump Lens to v11.11.0 to add custom height modals
144
+ - ad079d01c6: Fixes bug where SDK could not start recording when microphone is disabled
145
+
146
+
3
147
  See our [docs site](https://dev.loom.com) for a detailed guide on how to use the sdk!