@seamapi/http 0.7.0 → 0.7.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 CHANGED
@@ -59,27 +59,17 @@ or with the more ergonomic static factory methods.
59
59
  An API key is scoped to a single workspace and should only be used on the server.
60
60
  Obtain one from the Seam Console.
61
61
 
62
- ##### Set the `SEAM_API_KEY` environment variable
63
-
64
62
  ```ts
63
+ // Set the `SEAM_API_KEY` environment variable
65
64
  const seam = new SeamHttp()
66
- ```
67
-
68
- ##### Pass as the first argument to the constructor
69
65
 
70
- ```ts
66
+ // Pass as the first argument to the constructor
71
67
  const seam = new SeamHttp('your-api-key')
72
- ```
73
-
74
- ##### Pass as an option the constructor
75
68
 
76
- ```ts
69
+ // Pass as an option the constructor
77
70
  const seam = new SeamHttp({ apiKey: 'your-api-key' })
78
- ```
79
-
80
- ##### Use the factory method
81
71
 
82
- ```ts
72
+ // Use the factory method
83
73
  const seam = SeamHttp.fromApiKey('your-api-key')
84
74
  ```
85
75
 
@@ -87,15 +77,11 @@ const seam = SeamHttp.fromApiKey('your-api-key')
87
77
 
88
78
  A Client Session Token is scoped to a client session and should only be used on the client.
89
79
 
90
- ##### Pass as an option the constructor
91
-
92
80
  ```ts
81
+ // Pass as an option the constructor
93
82
  const seam = new SeamHttp({ clientSessionToken: 'some-client-session-token' })
94
- ```
95
83
 
96
- ##### Use the factory method
97
-
98
- ```ts
84
+ // Use the factory method
99
85
  const seam = SeamHttp.fromClientSessionToken('some-client-session-token')
100
86
  ```
101
87
 
@@ -123,18 +109,15 @@ Obtain one from the Seam Console.
123
109
  A workspace id must be provided when using this method
124
110
  and all requests will be scoped to that workspace.
125
111
 
126
- ##### Pass as an option the constructor
127
-
128
112
  ```ts
113
+ // Pass as an option the constructor
114
+
129
115
  const seam = new SeamHttp({
130
116
  personalAccessToken: 'your-personal-access-token',
131
117
  workspaceId: 'your-workspace-id',
132
118
  })
133
- ```
134
-
135
- ##### Use the factory method
136
119
 
137
- ```ts
120
+ // Use the factory method
138
121
  const seam = SeamHttp.fromPersonalAccessToken(
139
122
  'some-console-session-token',
140
123
  'your-workspace-id',
@@ -148,18 +131,14 @@ This authentication method is only used by internal Seam applications.
148
131
  A workspace id must be provided when using this method
149
132
  and all requests will be scoped to that workspace.
150
133
 
151
- ##### Pass as an option the constructor
152
-
153
134
  ```ts
135
+ // Pass as an option the constructor
154
136
  const seam = new SeamHttp({
155
137
  consoleSessionToken: 'some-console-session-token',
156
138
  workspaceId: 'your-workspace-id',
157
139
  })
158
- ```
159
140
 
160
- ##### Use the factory method
161
-
162
- ```ts
141
+ // Use the factory method
163
142
  const seam = SeamHttp.fromConsoleSessionToken(
164
143
  'some-console-session-token',
165
144
  'your-workspace-id',
package/dist/connect.cjs CHANGED
@@ -260,7 +260,7 @@ var getAuthHeadersForConsoleSessionToken = ({
260
260
  }
261
261
  return {
262
262
  authorization: `Bearer ${consoleSessionToken}`,
263
- ...workspaceId != null ? { "seam-workspace-id": workspaceId } : {}
263
+ ...workspaceId != null ? { "seam-workspace": workspaceId } : {}
264
264
  };
265
265
  };
266
266
  var getAuthHeadersForPersonalAccessToken = ({
@@ -290,7 +290,7 @@ var getAuthHeadersForPersonalAccessToken = ({
290
290
  }
291
291
  return {
292
292
  authorization: `Bearer ${personalAccessToken}`,
293
- ...workspaceId != null ? { "seam-workspace-id": workspaceId } : {}
293
+ ...workspaceId != null ? { "seam-workspace": workspaceId } : {}
294
294
  };
295
295
  };
296
296
  var getAuthHeadersForPublishableKey = (publishableKey) => {