@fonderie/react-admin-screens 1.1.0 → 1.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.
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { AdminClient, ConfigAdminClient, CourierAdminClient, AuthAdminClient, BillingAdminClient, AuditAdminClient } from '@fonderie/client';
3
+ import { AdminClient, ConfigAdminClient, CourierAdminClient, AuthAdminClient, BillingAdminClient, AuditAdminClient, SubscriberType } from '@fonderie/client';
4
4
 
5
- type AdminPage = 'attention' | 'modules' | 'doctor' | 'environment' | 'routes' | 'migrations' | 'tokens' | 'log' | 'settings' | 'templates' | 'users' | 'catalog' | 'subscriber' | 'audit';
5
+ type AdminPage = 'attention' | 'modules' | 'doctor' | 'environment' | 'routes' | 'migrations' | 'tokens' | 'operators' | 'log' | 'settings' | 'templates' | 'users' | 'catalog' | 'subscriber' | 'audit';
6
6
  interface IAdminShellProps {
7
7
  client: AdminClient;
8
8
  configClient?: ConfigAdminClient;
@@ -16,8 +16,10 @@ interface IAdminShellProps {
16
16
  appName?: string;
17
17
  envLabel?: string;
18
18
  footer?: ReactNode;
19
+ operators?: boolean;
20
+ currentOperator?: string;
19
21
  }
20
- declare function AdminShell({ client, configClient, courierClient, authClient, billingClient, auditClient, environment, page, onNavigate, appName, envLabel, footer, }: IAdminShellProps): react.JSX.Element;
22
+ declare function AdminShell({ client, configClient, courierClient, authClient, billingClient, auditClient, environment, page, onNavigate, appName, envLabel, footer, operators, currentOperator, }: IAdminShellProps): react.JSX.Element;
21
23
 
22
24
  interface IAttentionScreenProps {
23
25
  client: AdminClient;
@@ -63,8 +65,10 @@ declare function AdminLogScreen({ client, pageSize }: IAdminLogScreenProps): rea
63
65
  interface IUsersScreenProps {
64
66
  client: AuthAdminClient;
65
67
  pageSize?: number;
68
+ billingClient?: BillingAdminClient | undefined;
69
+ openUserId?: string | undefined;
66
70
  }
67
- declare function UsersScreen({ client, pageSize }: IUsersScreenProps): react.JSX.Element;
71
+ declare function UsersScreen({ client, pageSize, billingClient, openUserId, }: IUsersScreenProps): react.JSX.Element;
68
72
 
69
73
  interface ICatalogScreenProps {
70
74
  client: BillingAdminClient;
@@ -74,8 +78,13 @@ declare function CatalogScreen({ client }: ICatalogScreenProps): react.JSX.Eleme
74
78
  interface ISubscriberScreenProps {
75
79
  client: BillingAdminClient;
76
80
  pageSize?: number;
81
+ /**
82
+ * A user subscriber opens on the Users page, where their plan and credits
83
+ * live beside their account. Omit to open everything here.
84
+ */
85
+ onOpenUser?: (userId: string) => void;
77
86
  }
78
- declare function SubscriberScreen({ client, pageSize }: ISubscriberScreenProps): react.JSX.Element;
87
+ declare function SubscriberScreen({ client, pageSize, onOpenUser }: ISubscriberScreenProps): react.JSX.Element;
79
88
 
80
89
  interface IAuditScreenProps {
81
90
  client: AuditAdminClient;
@@ -83,4 +92,19 @@ interface IAuditScreenProps {
83
92
  }
84
93
  declare function AuditScreen({ client, pageSize }: IAuditScreenProps): react.JSX.Element;
85
94
 
86
- export { AdminLogScreen, type AdminPage, AdminShell, AttentionScreen, AuditScreen, CatalogScreen, DoctorScreen, EnvironmentScreen, type IAdminLogScreenProps, type IAdminShellProps, type IAttentionScreenProps, type IAuditScreenProps, type ICatalogScreenProps, type IDoctorScreenProps, type IEnvironmentScreenProps, type IMigrationsScreenProps, type IModulesScreenProps, type IRoutesScreenProps, type ISubscriberScreenProps, type ITokensScreenProps, type IUsersScreenProps, MigrationsScreen, ModulesScreen, RoutesScreen, SubscriberScreen, TokensScreen, UsersScreen };
95
+ interface IOperatorsScreenProps {
96
+ client: AdminClient;
97
+ me?: string | undefined;
98
+ }
99
+ declare function OperatorsScreen({ client, me }: IOperatorsScreenProps): react.JSX.Element;
100
+
101
+ interface ISubscriberBillingProps {
102
+ client: BillingAdminClient;
103
+ subscriber: {
104
+ type: SubscriberType;
105
+ id: string;
106
+ };
107
+ }
108
+ declare function SubscriberBilling({ client, subscriber }: ISubscriberBillingProps): react.JSX.Element;
109
+
110
+ export { AdminLogScreen, type AdminPage, AdminShell, AttentionScreen, AuditScreen, CatalogScreen, DoctorScreen, EnvironmentScreen, type IAdminLogScreenProps, type IAdminShellProps, type IAttentionScreenProps, type IAuditScreenProps, type ICatalogScreenProps, type IDoctorScreenProps, type IEnvironmentScreenProps, type IMigrationsScreenProps, type IModulesScreenProps, type IOperatorsScreenProps, type IRoutesScreenProps, type ISubscriberBillingProps, type ISubscriberScreenProps, type ITokensScreenProps, type IUsersScreenProps, MigrationsScreen, ModulesScreen, OperatorsScreen, RoutesScreen, SubscriberBilling, SubscriberScreen, TokensScreen, UsersScreen };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { AdminClient, ConfigAdminClient, CourierAdminClient, AuthAdminClient, BillingAdminClient, AuditAdminClient } from '@fonderie/client';
3
+ import { AdminClient, ConfigAdminClient, CourierAdminClient, AuthAdminClient, BillingAdminClient, AuditAdminClient, SubscriberType } from '@fonderie/client';
4
4
 
5
- type AdminPage = 'attention' | 'modules' | 'doctor' | 'environment' | 'routes' | 'migrations' | 'tokens' | 'log' | 'settings' | 'templates' | 'users' | 'catalog' | 'subscriber' | 'audit';
5
+ type AdminPage = 'attention' | 'modules' | 'doctor' | 'environment' | 'routes' | 'migrations' | 'tokens' | 'operators' | 'log' | 'settings' | 'templates' | 'users' | 'catalog' | 'subscriber' | 'audit';
6
6
  interface IAdminShellProps {
7
7
  client: AdminClient;
8
8
  configClient?: ConfigAdminClient;
@@ -16,8 +16,10 @@ interface IAdminShellProps {
16
16
  appName?: string;
17
17
  envLabel?: string;
18
18
  footer?: ReactNode;
19
+ operators?: boolean;
20
+ currentOperator?: string;
19
21
  }
20
- declare function AdminShell({ client, configClient, courierClient, authClient, billingClient, auditClient, environment, page, onNavigate, appName, envLabel, footer, }: IAdminShellProps): react.JSX.Element;
22
+ declare function AdminShell({ client, configClient, courierClient, authClient, billingClient, auditClient, environment, page, onNavigate, appName, envLabel, footer, operators, currentOperator, }: IAdminShellProps): react.JSX.Element;
21
23
 
22
24
  interface IAttentionScreenProps {
23
25
  client: AdminClient;
@@ -63,8 +65,10 @@ declare function AdminLogScreen({ client, pageSize }: IAdminLogScreenProps): rea
63
65
  interface IUsersScreenProps {
64
66
  client: AuthAdminClient;
65
67
  pageSize?: number;
68
+ billingClient?: BillingAdminClient | undefined;
69
+ openUserId?: string | undefined;
66
70
  }
67
- declare function UsersScreen({ client, pageSize }: IUsersScreenProps): react.JSX.Element;
71
+ declare function UsersScreen({ client, pageSize, billingClient, openUserId, }: IUsersScreenProps): react.JSX.Element;
68
72
 
69
73
  interface ICatalogScreenProps {
70
74
  client: BillingAdminClient;
@@ -74,8 +78,13 @@ declare function CatalogScreen({ client }: ICatalogScreenProps): react.JSX.Eleme
74
78
  interface ISubscriberScreenProps {
75
79
  client: BillingAdminClient;
76
80
  pageSize?: number;
81
+ /**
82
+ * A user subscriber opens on the Users page, where their plan and credits
83
+ * live beside their account. Omit to open everything here.
84
+ */
85
+ onOpenUser?: (userId: string) => void;
77
86
  }
78
- declare function SubscriberScreen({ client, pageSize }: ISubscriberScreenProps): react.JSX.Element;
87
+ declare function SubscriberScreen({ client, pageSize, onOpenUser }: ISubscriberScreenProps): react.JSX.Element;
79
88
 
80
89
  interface IAuditScreenProps {
81
90
  client: AuditAdminClient;
@@ -83,4 +92,19 @@ interface IAuditScreenProps {
83
92
  }
84
93
  declare function AuditScreen({ client, pageSize }: IAuditScreenProps): react.JSX.Element;
85
94
 
86
- export { AdminLogScreen, type AdminPage, AdminShell, AttentionScreen, AuditScreen, CatalogScreen, DoctorScreen, EnvironmentScreen, type IAdminLogScreenProps, type IAdminShellProps, type IAttentionScreenProps, type IAuditScreenProps, type ICatalogScreenProps, type IDoctorScreenProps, type IEnvironmentScreenProps, type IMigrationsScreenProps, type IModulesScreenProps, type IRoutesScreenProps, type ISubscriberScreenProps, type ITokensScreenProps, type IUsersScreenProps, MigrationsScreen, ModulesScreen, RoutesScreen, SubscriberScreen, TokensScreen, UsersScreen };
95
+ interface IOperatorsScreenProps {
96
+ client: AdminClient;
97
+ me?: string | undefined;
98
+ }
99
+ declare function OperatorsScreen({ client, me }: IOperatorsScreenProps): react.JSX.Element;
100
+
101
+ interface ISubscriberBillingProps {
102
+ client: BillingAdminClient;
103
+ subscriber: {
104
+ type: SubscriberType;
105
+ id: string;
106
+ };
107
+ }
108
+ declare function SubscriberBilling({ client, subscriber }: ISubscriberBillingProps): react.JSX.Element;
109
+
110
+ export { AdminLogScreen, type AdminPage, AdminShell, AttentionScreen, AuditScreen, CatalogScreen, DoctorScreen, EnvironmentScreen, type IAdminLogScreenProps, type IAdminShellProps, type IAttentionScreenProps, type IAuditScreenProps, type ICatalogScreenProps, type IDoctorScreenProps, type IEnvironmentScreenProps, type IMigrationsScreenProps, type IModulesScreenProps, type IOperatorsScreenProps, type IRoutesScreenProps, type ISubscriberBillingProps, type ISubscriberScreenProps, type ITokensScreenProps, type IUsersScreenProps, MigrationsScreen, ModulesScreen, OperatorsScreen, RoutesScreen, SubscriberBilling, SubscriberScreen, TokensScreen, UsersScreen };