@stytch/vanilla-js 5.2.0 → 5.3.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.
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { MappedPropsFromRouteMap } from '../Router';
3
+ import { AdminPortalComponentMountOptions } from '../makeAdminPortalComponentMountFn';
4
+ export type AdminPortalSCIMMountOptions = AdminPortalComponentMountOptions;
5
+ declare const routeMap: {
6
+ scimConnection: () => React.JSX.Element;
7
+ newConnection: () => React.JSX.Element;
8
+ newConnectionConfigure: ({ connection }: {
9
+ connection: import("@stytch/core/dist/public").SCIMConnectionWithBearerToken;
10
+ }) => React.JSX.Element;
11
+ scimConnectionDetails: ({ connection }: {
12
+ connection: import("@stytch/core/dist/public").SCIMConnection;
13
+ }) => React.JSX.Element;
14
+ };
15
+ export type ScimRouterMappedProps = MappedPropsFromRouteMap<typeof routeMap>;
16
+ export declare const Content: () => React.JSX.Element;
17
+ export declare const AdminPortalSCIM: (props: AdminPortalSCIMMountOptions) => React.JSX.Element;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SCIMConnection } from '@stytch/core/public';
3
+ export declare const SCIMConnectionDetailsScreen: ({ connection }: {
4
+ connection: SCIMConnection;
5
+ }) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SCIMConnectionWithBearerToken } from '@stytch/core/public';
3
+ export declare const SCIMNewConnectionConfigureScreen: ({ connection }: {
4
+ connection: SCIMConnectionWithBearerToken;
5
+ }) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SCIMNewConnectionScreen: () => React.JSX.Element;
@@ -0,0 +1,45 @@
1
+ /// <reference types="react" />
2
+ export declare const ScimRouterProvider: ({ children, initialRoute, }: {
3
+ children: import("react").ReactNode;
4
+ initialRoute: import("../Router").RouterStateEntry<import("../Router").MappedPropsFromRouteMap<{
5
+ scimConnection: () => import("react").JSX.Element;
6
+ newConnection: () => import("react").JSX.Element;
7
+ newConnectionConfigure: ({ connection }: {
8
+ connection: import("@stytch/core/dist/public").SCIMConnectionWithBearerToken;
9
+ }) => import("react").JSX.Element;
10
+ scimConnectionDetails: ({ connection }: {
11
+ connection: import("@stytch/core/dist/public").SCIMConnection;
12
+ }) => import("react").JSX.Element;
13
+ }>>;
14
+ }) => import("react").JSX.Element, ScimRouter: ({ routeMap }: {
15
+ routeMap: {
16
+ scimConnection: import("react").ComponentType<never>;
17
+ newConnection: import("react").ComponentType<never>;
18
+ newConnectionConfigure: import("react").ComponentType<{
19
+ connection: import("@stytch/core/dist/public").SCIMConnectionWithBearerToken;
20
+ }>;
21
+ scimConnectionDetails: import("react").ComponentType<{
22
+ connection: import("@stytch/core/dist/public").SCIMConnection;
23
+ }>;
24
+ };
25
+ }) => import("react").JSX.Element | null, useScimRouterController: () => import("../Router").RouterController<import("../Router").MappedPropsFromRouteMap<{
26
+ scimConnection: () => import("react").JSX.Element;
27
+ newConnection: () => import("react").JSX.Element;
28
+ newConnectionConfigure: ({ connection }: {
29
+ connection: import("@stytch/core/dist/public").SCIMConnectionWithBearerToken;
30
+ }) => import("react").JSX.Element;
31
+ scimConnectionDetails: ({ connection }: {
32
+ connection: import("@stytch/core/dist/public").SCIMConnection;
33
+ }) => import("react").JSX.Element;
34
+ }>>, useScimRouterState: () => {
35
+ currentRoute: import("../Router").RouterStateEntry<import("../Router").MappedPropsFromRouteMap<{
36
+ scimConnection: () => import("react").JSX.Element;
37
+ newConnection: () => import("react").JSX.Element;
38
+ newConnectionConfigure: ({ connection }: {
39
+ connection: import("@stytch/core/dist/public").SCIMConnectionWithBearerToken;
40
+ }) => import("react").JSX.Element;
41
+ scimConnectionDetails: ({ connection }: {
42
+ connection: import("@stytch/core/dist/public").SCIMConnection;
43
+ }) => import("react").JSX.Element;
44
+ }>>;
45
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SCIMScreen: () => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ export type { AdminPortalSCIMMountOptions } from './AdminPortalSCIM';
2
+ /**
3
+ * Mounts the Admin Portal SCIM Management component inside the element provided.
4
+ * If the component already been rendered inside the element, it will be updated
5
+ * to use the new options passed in.
6
+ * @example
7
+ * mountAdminPortalSCIM{
8
+ * client: stytchClient,
9
+ * element: '#container',
10
+ * styles: {...},
11
+ * });
12
+ *
13
+ * @throws An error when the element specified by element cannot be found.
14
+ */
15
+ export declare const mountAdminPortalSCIM: (options: import("../makeAdminPortalComponentMountFn").AdminPortalComponentMountOptions) => void;
@@ -0,0 +1,175 @@
1
+ import { SCIMConnectionWithBearerToken, SCIMConnectionWithNextBearerToken } from '@stytch/core/public';
2
+ export type KnownSCIMIdp = 'okta' | 'microsoft-entra' | 'cyberark' | 'jumpcloud' | 'onelogin' | 'pingfederate' | 'rippling' | 'generic';
3
+ export type ConnectionWithBearerTokenKey = keyof Pick<SCIMConnectionWithBearerToken, 'bearer_token' | 'base_url' | 'display_name'>;
4
+ export type ConnectionWithNextBearerTokenKey = keyof Pick<SCIMConnectionWithNextBearerToken, 'next_bearer_token'>;
5
+ export type Field<T> = {
6
+ label: string;
7
+ value: string;
8
+ isCopyable?: boolean;
9
+ } | {
10
+ label: string;
11
+ scimConnectionKey: T;
12
+ isCopyable?: boolean;
13
+ };
14
+ export type SCIMIdpInfo = {
15
+ displayName: string;
16
+ copyToIdpLabel: string;
17
+ copyToIdpFields: Field<ConnectionWithBearerTokenKey>[];
18
+ confirmLabel?: string;
19
+ confirmFields?: Field<never>[];
20
+ };
21
+ export declare const DEFAULT_BASE_URL_LABEL = "SCIM Base URL";
22
+ export declare const DEFAULT_HEADER_BEARER_TOKEN_LABEL = "HTTP Header Bearer Token";
23
+ export declare const scimIdpMap: {
24
+ readonly okta: {
25
+ readonly displayName: "Okta";
26
+ readonly copyToIdpLabel: "Copy the SCIM Connection Settings to your IdP.";
27
+ readonly confirmLabel: "Confirm the SCIM username format matches in your IdP.";
28
+ readonly copyToIdpFields: [{
29
+ readonly label: "Authentication Mode";
30
+ readonly value: "HTTP Header";
31
+ }, {
32
+ readonly label: "SCIM Connector base URL";
33
+ readonly scimConnectionKey: "base_url";
34
+ readonly isCopyable: true;
35
+ }, {
36
+ readonly label: "HTTP Header Authorization: Bearer";
37
+ readonly scimConnectionKey: "bearer_token";
38
+ readonly isCopyable: true;
39
+ }];
40
+ readonly confirmFields: [{
41
+ readonly label: "Application username format";
42
+ readonly value: "Email";
43
+ }, {
44
+ readonly label: "Unique Identifier field for users";
45
+ readonly value: "userName";
46
+ }];
47
+ };
48
+ readonly 'microsoft-entra': {
49
+ readonly displayName: "Entra";
50
+ readonly copyToIdpLabel: "Copy the Admin Credentials to your IdP.";
51
+ readonly copyToIdpFields: [{
52
+ readonly label: "Tenant URL";
53
+ readonly scimConnectionKey: "base_url";
54
+ readonly isCopyable: true;
55
+ }, {
56
+ readonly label: "Secret Token";
57
+ readonly scimConnectionKey: "bearer_token";
58
+ readonly isCopyable: true;
59
+ }];
60
+ };
61
+ readonly cyberark: {
62
+ readonly displayName: "CyberArk";
63
+ readonly copyToIdpLabel: "Copy the Provisioning Details to your IdP.";
64
+ readonly copyToIdpFields: [{
65
+ readonly label: "SCIM Service URL";
66
+ readonly scimConnectionKey: "base_url";
67
+ readonly isCopyable: true;
68
+ }, {
69
+ readonly label: "Bearer Token";
70
+ readonly scimConnectionKey: "bearer_token";
71
+ readonly isCopyable: true;
72
+ }];
73
+ };
74
+ readonly jumpcloud: {
75
+ readonly displayName: "JumpCloud";
76
+ readonly copyToIdpLabel: "Copy the Configuration Settings to your IdP.";
77
+ readonly copyToIdpFields: [{
78
+ readonly label: "Base URL";
79
+ readonly scimConnectionKey: "base_url";
80
+ readonly isCopyable: true;
81
+ }, {
82
+ readonly label: "Token Key";
83
+ readonly scimConnectionKey: "bearer_token";
84
+ readonly isCopyable: true;
85
+ }];
86
+ };
87
+ readonly onelogin: {
88
+ readonly displayName: "OneLogin";
89
+ readonly copyToIdpLabel: "Copy the configuration to your IdP.";
90
+ readonly copyToIdpFields: [{
91
+ readonly label: "SCIM Username Format";
92
+ readonly value: "Email";
93
+ }, {
94
+ readonly label: "SCIM Base URL";
95
+ readonly scimConnectionKey: "base_url";
96
+ readonly isCopyable: true;
97
+ }, {
98
+ readonly label: "SCIM Bearer Token";
99
+ readonly scimConnectionKey: "bearer_token";
100
+ readonly isCopyable: true;
101
+ }];
102
+ };
103
+ readonly pingfederate: {
104
+ readonly displayName: "Ping Federate";
105
+ readonly copyToIdpLabel: "Copy the Provisioning Target Information to your IdP.";
106
+ readonly confirmLabel: "Confirm the SCIM username format matches in your IdP.";
107
+ readonly copyToIdpFields: [{
108
+ readonly label: "SCIM Version";
109
+ readonly value: "2.0";
110
+ }, {
111
+ readonly label: "Authentication Method";
112
+ readonly value: "OAuth 2 Bearer Token";
113
+ }, {
114
+ readonly label: "SCIM URL";
115
+ readonly scimConnectionKey: "base_url";
116
+ readonly isCopyable: true;
117
+ }, {
118
+ readonly label: "Access Token";
119
+ readonly scimConnectionKey: "bearer_token";
120
+ readonly isCopyable: true;
121
+ }];
122
+ readonly confirmFields: [{
123
+ readonly label: "SCIM userName";
124
+ readonly value: "Email";
125
+ }];
126
+ };
127
+ readonly rippling: {
128
+ readonly displayName: "Rippling";
129
+ readonly copyToIdpLabel: "Copy the configuration to your IdP.";
130
+ readonly copyToIdpFields: [{
131
+ readonly label: "SCIM Version";
132
+ readonly value: "2.0";
133
+ }, {
134
+ readonly label: "SCIM Base URL";
135
+ readonly scimConnectionKey: "base_url";
136
+ readonly isCopyable: true;
137
+ }, {
138
+ readonly label: "SCIM Authorization Method";
139
+ readonly value: "Bearer Token";
140
+ }, {
141
+ readonly label: "SCIM userName";
142
+ readonly value: "Email address";
143
+ }, {
144
+ readonly label: "Supported SCIM Attributes";
145
+ readonly value: "externalId, emails.primary, name.givenName, name.familyName";
146
+ }, {
147
+ readonly label: "Bearer Token";
148
+ readonly scimConnectionKey: "bearer_token";
149
+ readonly isCopyable: true;
150
+ }];
151
+ };
152
+ readonly generic: {
153
+ readonly displayName: "Generic";
154
+ readonly copyToIdpLabel: "Copy the SCIM Connection Settings to your IdP.";
155
+ readonly confirmLabel: "Confirm the SCIM username format matches in your IdP.";
156
+ readonly copyToIdpFields: [{
157
+ readonly label: "SCIM Base URL";
158
+ readonly scimConnectionKey: "base_url";
159
+ readonly isCopyable: true;
160
+ }, {
161
+ readonly label: "HTTP Header Bearer Token";
162
+ readonly scimConnectionKey: "bearer_token";
163
+ readonly isCopyable: true;
164
+ }];
165
+ readonly confirmFields: [{
166
+ readonly label: "SCIM userName Value";
167
+ readonly value: "Primary email address";
168
+ }];
169
+ };
170
+ };
171
+ export declare const getSCIMIdpInfo: (idp: string) => SCIMIdpInfo;
172
+ export declare const getFieldBy: <T extends "display_name" | "bearer_token" | "base_url">({ idp, key, }: {
173
+ idp: string;
174
+ key: T;
175
+ }) => Field<T> | undefined;
@@ -11,4 +11,5 @@ export type TableItemRenderer<T> = {
11
11
  title: string;
12
12
  renderTitle?: () => ReactNode;
13
13
  getValue(data: T, state?: Record<string, unknown>): string | number | boolean | ReactNode;
14
+ width?: number;
14
15
  };
@@ -1,4 +1,4 @@
1
- export declare const scimGetConnectionKey: (orgId: string | undefined, connectionId: string | undefined) => string[] | null;
1
+ export declare const scimGetConnectionKey: (connectionId: string | undefined) => string[] | null;
2
2
  export declare const useScimConnection: ({ shouldFetch }: {
3
3
  shouldFetch: boolean;
4
- }) => import("swr/_internal").SWRResponse<import("@stytch/core/dist/public").B2BSCIMGetConnectionResponse, any, any>;
4
+ }) => import("swr/_internal").SWRResponse<import("@stytch/core/dist/public").SCIMConnection, any, any>;
@@ -1433,7 +1433,7 @@ var B2BOneTapProvider = /*#__PURE__*/function () {
1433
1433
  }]);
1434
1434
  return B2BOneTapProvider;
1435
1435
  }();
1436
- var version = "5.2.0";
1436
+ var version = "5.3.0";
1437
1437
  var NetworkClient = /*#__PURE__*/function () {
1438
1438
  function NetworkClient(_publicToken, _subscriptionDataLayer, _liveAPIURL, _testAPIURL, additionalTelemetryDataFn) {
1439
1439
  _classCallCheck(this, NetworkClient);
@@ -1434,7 +1434,7 @@ var B2BOneTapProvider = /*#__PURE__*/function () {
1434
1434
  }]);
1435
1435
  return B2BOneTapProvider;
1436
1436
  }();
1437
- var version = "5.2.0";
1437
+ var version = "5.3.0";
1438
1438
  var NetworkClient = /*#__PURE__*/function () {
1439
1439
  function NetworkClient(_publicToken, _subscriptionDataLayer, _liveAPIURL, _testAPIURL, additionalTelemetryDataFn) {
1440
1440
  _classCallCheck(this, NetworkClient);