@loomhq/record-sdk 3.2.0 → 3.2.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.
- package/README.md +10 -100
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/is-supported.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/is-supported.js +1 -1
- package/dist/record-sdk.d.ts +22 -19
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,125 +1,38 @@
|
|
|
1
1
|
# @loomhq/record-sdk
|
|
2
2
|
|
|
3
|
+
See our [docs site](https://dev.loom.com) for a detailed guide on how to use the sdk!
|
|
4
|
+
|
|
3
5
|
## 3.2.0
|
|
4
6
|
|
|
5
7
|
### Minor Changes
|
|
6
8
|
|
|
7
|
-
- bb42d5cf15:
|
|
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`.
|
|
9
|
+
- bb42d5cf15: **Introducing:** `createInstance`, a new setup method for `@loomhq/record-sdk`
|
|
39
10
|
|
|
40
11
|
There are now three operating modes of the SDK:
|
|
41
12
|
|
|
42
13
|
- Standard
|
|
43
14
|
- Custom
|
|
44
|
-
- First Party
|
|
15
|
+
- First Party (assumes customer is always authenticated)
|
|
45
16
|
|
|
46
|
-
For the sake of simplicity, the
|
|
17
|
+
For the sake of simplicity, the developer needs to explicitly say which mode they're using
|
|
47
18
|
|
|
48
|
-
```
|
|
19
|
+
```typescript
|
|
49
20
|
// Example
|
|
50
21
|
const publicAppId: '<my public key>';
|
|
51
22
|
|
|
52
|
-
const instance = await
|
|
23
|
+
const instance = await createInstance({
|
|
53
24
|
mode: 'standard',
|
|
54
25
|
publicAppId,
|
|
55
26
|
});
|
|
56
27
|
```
|
|
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
28
|
### Patch Changes
|
|
116
29
|
|
|
117
30
|
- 142ef8c30e: Implement foundations for onboarding
|
|
118
|
-
- 6a7f688ad8:
|
|
31
|
+
- 6a7f688ad8: Navigate to share page edit tab when users are logged in
|
|
119
32
|
- 75c95a7853: Add in product name and entry point name into the recording start event
|
|
120
33
|
- cf9cde4bb3: Add types export to record-sdk package
|
|
121
34
|
- 7e223459ff: Add internal alpha banner for Hello domain
|
|
122
|
-
- cf01845b27:
|
|
35
|
+
- cf01845b27: Bump Lens v11.9.0 to add small loader
|
|
123
36
|
- 3df205aeb9: Be explicit about the different modes the recorder can be in.
|
|
124
37
|
|
|
125
38
|
Changes:
|
|
@@ -135,13 +48,10 @@
|
|
|
135
48
|
- StandardSDK
|
|
136
49
|
- First-Party
|
|
137
50
|
|
|
138
|
-
@loomhq/record-sdk@3.11 and
|
|
51
|
+
@loomhq/record-sdk@3.11 and below 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
52
|
|
|
140
53
|
- 7e8de46708: add pre record menu analytics for the sdk
|
|
141
54
|
- 211ebf0d1d: Add in product identifier and entry point
|
|
142
55
|
- ef1c6c934a: Add changeset
|
|
143
56
|
- 6adf796331: Bump Lens to v11.11.0 to add custom height modals
|
|
144
57
|
- ad079d01c6: Fixes bug where SDK could not start recording when microphone is disabled
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
See our [docs site](https://dev.loom.com) for a detailed guide on how to use the sdk!
|