@workos-inc/widgets 1.17.3 → 1.18.0-next.1788970242803

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +2 -2
  4. package/dist/cjs/lib/pipes-admin.cjs +589 -23
  5. package/dist/cjs/lib/pipes-admin.cjs.map +1 -1
  6. package/dist/cjs/lib/pipes-admin.d.cts +39 -3
  7. package/dist/cjs/lib/pipes.cjs +477 -38
  8. package/dist/cjs/lib/pipes.cjs.map +1 -1
  9. package/dist/cjs/lib/pipes.d.cts +114 -3
  10. package/dist/cjs/lib/status.cjs +2 -0
  11. package/dist/cjs/lib/status.cjs.map +1 -1
  12. package/dist/cjs/lib/status.d.cts +2 -2
  13. package/dist/cjs/pipes-admin.client.cjs +45 -3
  14. package/dist/cjs/pipes-admin.client.cjs.map +1 -1
  15. package/dist/cjs/pipes-admin.client.d.cts +13 -0
  16. package/dist/cjs/pipes.client.cjs +70 -9
  17. package/dist/cjs/pipes.client.cjs.map +1 -1
  18. package/dist/cjs/pipes.client.d.cts +84 -29
  19. package/dist/esm/index.d.ts +2 -2
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/lib/pipes-admin.d.ts +39 -3
  22. package/dist/esm/lib/pipes-admin.js +608 -25
  23. package/dist/esm/lib/pipes-admin.js.map +1 -1
  24. package/dist/esm/lib/pipes.d.ts +114 -3
  25. package/dist/esm/lib/pipes.js +474 -38
  26. package/dist/esm/lib/pipes.js.map +1 -1
  27. package/dist/esm/lib/status.d.ts +2 -2
  28. package/dist/esm/lib/status.js +2 -0
  29. package/dist/esm/lib/status.js.map +1 -1
  30. package/dist/esm/pipes-admin.client.d.ts +13 -0
  31. package/dist/esm/pipes-admin.client.js +48 -4
  32. package/dist/esm/pipes-admin.client.js.map +1 -1
  33. package/dist/esm/pipes.client.d.ts +84 -29
  34. package/dist/esm/pipes.client.js +76 -10
  35. package/dist/esm/pipes.client.js.map +1 -1
  36. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { DataIntegrationConfiguration } from '../api/endpoint.js';
1
+ import * as React from 'react';
2
+ import { DataIntegrationConfiguration, OrganizationDataIntegration } from '../api/endpoint.js';
2
3
  import { WidgetRootDomProps } from './utils.js';
3
4
  import '@tanstack/react-query';
4
5
  import '../api/widgets-api-client.js';
5
6
  import './elements.js';
6
- import 'react';
7
7
  import '@radix-ui/themes';
8
8
  import '@radix-ui/themes/props';
9
9
  import '../dialog-CGXwsXVe.js';
@@ -29,6 +29,18 @@ declare function useManageableIntegrations(): {
29
29
  isError: boolean;
30
30
  error: unknown;
31
31
  };
32
+ /**
33
+ * Integrations the organization owns and shares with everyone, with the
34
+ * organization's configuration and the actions the server allows on them.
35
+ * Gated on the same manage permission as provider settings, but cached
36
+ * separately so the two sections resolve independently. Like the member
37
+ * widget, a failed attempt drops the section rather than leaving skeletons up
38
+ * for the whole retry sequence.
39
+ */
40
+ declare function useOrganizationOwnedIntegrations(): {
41
+ data: OrganizationDataIntegration[];
42
+ isLoading: boolean;
43
+ };
32
44
  interface PipesAdminProps extends WidgetRootDomProps {
33
45
  integrations: DataIntegrationConfiguration[];
34
46
  }
@@ -38,6 +50,30 @@ interface PipesAdminProps extends WidgetRootDomProps {
38
50
  * Presentational — the client wrapper fetches via `useManageableIntegrations`.
39
51
  */
40
52
  declare const PipesAdmin: React.FC<PipesAdminProps>;
53
+ interface PipesAdminSectionsProps extends PipesAdminProps {
54
+ /**
55
+ * Organization-owned integrations, as returned by the organization
56
+ * endpoint. Empty while loading, when the organization owns nothing, and
57
+ * when the request failed.
58
+ */
59
+ sharedIntegrations: OrganizationDataIntegration[];
60
+ /** Renders the shared section as skeleton rows while it resolves. */
61
+ isSharedLoading?: boolean;
62
+ /** Names the owning organization in the shared section's description. */
63
+ organizationName?: string;
64
+ }
65
+ /**
66
+ * The sectioned administrator experience: the connections the organization
67
+ * owns and shares with everyone, then the provider settings governing what
68
+ * members may connect on their own. The two lanes come from different
69
+ * endpoints and are never merged — the same provider can legitimately appear
70
+ * in both, once as the organization's own account and once as the policy for
71
+ * members' personal accounts.
72
+ *
73
+ * The shared section is omitted when the organization owns nothing or the
74
+ * request failed, leaving provider settings on their own.
75
+ */
76
+ declare const PipesAdminSections: React.FC<PipesAdminSectionsProps>;
41
77
  interface PipesAdminLoadingProps extends WidgetRootDomProps {
42
78
  count: number;
43
79
  }
@@ -47,4 +83,4 @@ interface PipesAdminErrorProps extends WidgetRootDomProps {
47
83
  }
48
84
  declare const PipesAdminError: React.FC<PipesAdminErrorProps>;
49
85
 
50
- export { PipesAdmin, PipesAdminError, type PipesAdminErrorProps, PipesAdminLoading, type PipesAdminLoadingProps, type PipesAdminProps, useManageableIntegrations };
86
+ export { PipesAdmin, PipesAdminError, type PipesAdminErrorProps, PipesAdminLoading, type PipesAdminLoadingProps, type PipesAdminProps, PipesAdminSections, type PipesAdminSectionsProps, useManageableIntegrations, useOrganizationOwnedIntegrations };