@outmarket-ai/react-sdk 0.6.0-alpha.0 → 0.6.0-alpha.2

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
@@ -36,7 +36,7 @@ Using the SDK requires Outmarket's approval. See the `LICENSE` file in the packa
36
36
  Take the email from the signed-in user's session on your server, and only an address your sign-in
37
37
  has verified the user owns (a confirmed email or a verified identity-provider claim). Never take it
38
38
  from anything the browser sends. The user must be a member of your Outmarket workspace, and not an
39
- Admin or SuperAdmin: those members can't be signed in this way. Return the `201` body to your page
39
+ Admin or SystemAdmin: those members can't be signed in this way. Return the `201` body to your page
40
40
  unchanged, with `Cache-Control: no-store`, and keep it out of URLs and logs. Mint once per sign-in:
41
41
  the SDK refreshes the session itself.
42
42
 
@@ -89,22 +89,22 @@ Using the SDK requires Outmarket's approval. See the `LICENSE` file in the packa
89
89
 
90
90
  Mount it once and put the components inside it.
91
91
 
92
- | Prop | Type | Description |
93
- | --- | --- | --- |
94
- | `session` | `OutmarketSession` | Required. The `201` body from step 4, unchanged. |
95
- | `onReady` | `({ workflowsByModule, features }) => void` | Called once the user's workflows have loaded, and again if they change. `workflowsByModule`: the workflows the components can show, grouped by module, minus any your plan doesn't include. `features.vault`: whether the user can open the Vault. |
96
- | `colorMode` | `'light' \| 'dark' \| 'system'` | Color mode of the components. |
97
- | `theme` | `{ primary?: string }` | Your brand color, as hex. |
92
+ | Prop | Type | Description |
93
+ | ----------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
94
+ | `session` | `OutmarketSession` | Required. The `201` body from step 4, unchanged. |
95
+ | `onReady` | `({ workflowsByModule, features }) => void` | Called once the user's workflows have loaded, and again if they change. `workflowsByModule`: the workflows the components can show, grouped by module, minus any your plan doesn't include. `features.vault`: whether the user can open the Vault. |
96
+ | `colorMode` | `'light' \| 'dark' \| 'system'` | Color mode of the components. |
97
+ | `theme` | `{ primary?: string }` | Your brand color, as hex. |
98
98
 
99
99
  ### Components
100
100
 
101
- | Component | Props |
102
- | --- | --- |
103
- | `OutmarketWorkflowsList` | `module`: `'commercial_lines'`, `'personal_lines'` or `'benefits'`. `onSelectWorkflow(workflowId)`: called when the user picks a workflow. |
104
- | `OutmarketWorkflowForm` | `workflowId`. `onConversationCreated(conversationId)`: called when the user runs the workflow. |
105
- | `OutmarketWorkflowConversation` | `conversationId`. |
106
- | `OutmarketWorkflowHistory` | `workflowId`, or `vault` for the user's past Vault chats (see [Past chats](#past-chats)). `onSelectConversation(conversationId)`: called when the user opens a past run or chat. |
107
- | `OutmarketVault` | All optional. `location`: `{ tab: 'my' \| 'shared' \| 'team', path }`. `onLocationChange(location)`: called when the user opens a folder or switches tab. `onOpenConversation(conversationId)`: called when the user starts a chat. See [The Vault](#the-vault). |
101
+ | Component | Props |
102
+ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103
+ | `OutmarketWorkflowsList` | `module`: `'commercial_lines'`, `'personal_lines'` or `'benefits'`. `onSelectWorkflow(workflowId)`: called when the user picks a workflow. |
104
+ | `OutmarketWorkflowForm` | `workflowId`. `onConversationCreated(conversationId)`: called when the user runs the workflow. |
105
+ | `OutmarketWorkflowConversation` | `conversationId`. |
106
+ | `OutmarketWorkflowHistory` | One scope: `workflowId` for one workflow's past runs, `module` (`'commercial_lines'`, `'personal_lines'` or `'benefits'`) for the runs of that module's workflows, or `vault` for the user's past Vault chats (see [Past chats](#past-chats)). Without one it shows "History unavailable". `onSelectConversation(conversationId)`: called when the user opens a past run or chat. |
107
+ | `OutmarketVault` | All optional. `location`: `{ tab: 'my' \| 'shared' \| 'team', path }`. `onLocationChange(location)`: called when the user opens a folder or switches tab. `onOpenConversation(conversationId)`: called when the user starts a chat. See [The Vault](#the-vault). |
108
108
 
109
109
  The SDK has no routing: your app decides what to show after each callback.
110
110
 
@@ -305,14 +305,14 @@ render in one more at the end of your page's `body`. So:
305
305
 
306
306
  If your page has a Content Security Policy, loading the components from the CDN needs these sources:
307
307
 
308
- | Directive | Sources |
309
- | --- | --- |
310
- | `script-src` | `https://embed.outmarket.ai` |
311
- | `style-src` | `https://embed.outmarket.ai` |
312
- | `font-src` | `https://embed.outmarket.ai` |
313
- | `worker-src` | `https://embed.outmarket.ai` and `blob:` (the PDF worker starts from a `blob:` URL) |
308
+ | Directive | Sources |
309
+ | ------------- | ------------------------------------------------------------------------------------------------------------------- |
310
+ | `script-src` | `https://embed.outmarket.ai` |
311
+ | `style-src` | `https://embed.outmarket.ai` |
312
+ | `font-src` | `https://embed.outmarket.ai` |
313
+ | `worker-src` | `https://embed.outmarket.ai` and `blob:` (the PDF worker starts from a `blob:` URL) |
314
314
  | `connect-src` | `https://embed.outmarket.ai` (the components' stylesheets are fetched) and the Outmarket APIs of your `environment` |
315
- | `frame-src` | `https://view.officeapps.live.com` (the Vault's previews of Word, PowerPoint and `.xls` files) |
315
+ | `frame-src` | `https://view.officeapps.live.com` (the Vault's previews of Word, PowerPoint and `.xls` files) |
316
316
 
317
317
  The Outmarket APIs of each environment:
318
318
 
@@ -349,11 +349,11 @@ with an error in the console, and the components load from `https://embed.outmar
349
349
 
350
350
  Step 4 can answer:
351
351
 
352
- | Response | Meaning |
353
- | --- | --- |
354
- | `403` `key_not_eligible` | The key is revoked or expired, or API access is off for your workspace. |
355
- | `403` `user_not_eligible` | This user can't be signed in this way. The reason is never given. |
356
- | `403` `browser_origin_not_allowed` | The call came from a browser. Call from your server. |
357
- | `403` `{"message": "Source IP not allowed for this API key"}` | Your server's IP isn't in the key's allowed IP addresses. |
358
- | `429` `rate_limited` | Too many sign-ins. Wait for `Retry-After`, then retry. |
359
- | `502` `session_unavailable` | No session could be created. Retry later. |
352
+ | Response | Meaning |
353
+ | ------------------------------------------------------------- | ----------------------------------------------------------------------- |
354
+ | `403` `key_not_eligible` | The key is revoked or expired, or API access is off for your workspace. |
355
+ | `403` `user_not_eligible` | This user can't be signed in this way. The reason is never given. |
356
+ | `403` `browser_origin_not_allowed` | The call came from a browser. Call from your server. |
357
+ | `403` `{"message": "Source IP not allowed for this API key"}` | Your server's IP isn't in the key's allowed IP addresses. |
358
+ | `429` `rate_limited` | Too many sign-ins. Wait for `Retry-After`, then retry. |
359
+ | `502` `session_unavailable` | No session could be created. Retry later. |
package/dist/index.d.ts CHANGED
@@ -195,12 +195,22 @@ export interface OutmarketWorkflowConversationProps {
195
195
 
196
196
  export declare function OutmarketWorkflowConversation(props: OutmarketWorkflowConversationProps): ReactNode;
197
197
 
198
- /** The user's previous conversations: one workflow's runs (`workflowId`), or their past Vault chats
199
- * (`vault`). Clicking one fires `onSelectConversation` so the host can mount the conversation view. */
198
+ /** The user's previous conversations, always scoped: one workflow's runs (`workflowId`), the runs of a
199
+ * module's workflows (`module`), or their past Vault chats (`vault`). Clicking one fires
200
+ * `onSelectConversation` so the host can mount the conversation view. Without a scope it shows
201
+ * "History unavailable". */
200
202
  export type OutmarketWorkflowHistoryProps =
201
203
  | {
202
204
  /** The workflow whose past runs to list. */
203
205
  workflowId: string;
206
+ module?: never;
207
+ vault?: never;
208
+ onSelectConversation: (conversationId: string) => void;
209
+ }
210
+ | {
211
+ /** List the past runs of every workflow `onReady` reports for this module. */
212
+ module: OutmarketModule;
213
+ workflowId?: never;
204
214
  vault?: never;
205
215
  onSelectConversation: (conversationId: string) => void;
206
216
  }
@@ -209,6 +219,7 @@ export type OutmarketWorkflowHistoryProps =
209
219
  * unavailable" when `features.vault` is false. */
210
220
  vault: true;
211
221
  workflowId?: never;
222
+ module?: never;
212
223
  onSelectConversation: (conversationId: string) => void;
213
224
  };
214
225
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outmarket-ai/react-sdk",
3
- "version": "0.6.0-alpha.0",
3
+ "version": "0.6.0-alpha.2",
4
4
  "description": "Embed the real Outmarket workflows and Vault in any React app.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -62,5 +62,5 @@
62
62
  "url": "git+https://github.com/Outmarket-AI/outmarket-monorepo.git",
63
63
  "directory": "apps/product-frontend/packages/outmarket-react-sdk"
64
64
  },
65
- "gitHead": "61ad2cf0b3d26be8e2b075e752adaa8a362b9fa6"
65
+ "gitHead": "ea2a340eefe425c526f863923b9f43f3442a02e3"
66
66
  }