@raystack/frontier 0.106.1 → 0.107.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/admin/dist/index.js +299 -220
- package/admin/dist/index.mjs +299 -220
- package/client/dist/index.d.ts +64 -34
- package/client/dist/index.js +182 -138
- package/client/dist/index.mjs +182 -138
- package/package.json +1 -1
package/client/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React, { ComponentProps, ReactNode, ComponentPropsWithRef, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import { Flex, ThemeProviderProps } from '@raystack/apsara';
|
|
4
4
|
import * as yup from 'yup';
|
|
5
|
-
import { Plan, Organization, Group, User, BillingAccount, Subscription, PaymentMethod, OrganizationKyc, BillingAccountDetails } from '@raystack/proton/frontier';
|
|
5
|
+
import { Plan, ServiceUserToken, Organization, Group, User, BillingAccount, Subscription, PaymentMethod, OrganizationKyc, BillingAccountDetails } from '@raystack/proton/frontier';
|
|
6
6
|
import { QueryClient, UseQueryResult, UseMutationResult } from '@tanstack/react-query';
|
|
7
7
|
import { ConnectError } from '@connectrpc/connect';
|
|
8
8
|
import { DescMessage, MessageShape, DescMethodUnary, MessageInitShape } from '@bufbuild/protobuf';
|
|
@@ -213,44 +213,22 @@ interface TeamDetailsViewProps {
|
|
|
213
213
|
}
|
|
214
214
|
declare function TeamDetailsView({ teamId, teamsLabel, onNavigateToTeams, onDeleteSuccess }: TeamDetailsViewProps): react_jsx_runtime.JSX.Element;
|
|
215
215
|
|
|
216
|
-
interface ServiceAccountsViewProps {
|
|
217
|
-
onServiceAccountClick?: (id: string) => void;
|
|
218
|
-
}
|
|
219
|
-
declare function ServiceAccountsView({ onServiceAccountClick }: ServiceAccountsViewProps): react_jsx_runtime.JSX.Element;
|
|
220
|
-
|
|
221
|
-
interface ServiceAccountDetailsViewProps {
|
|
222
|
-
serviceAccountId: string;
|
|
223
|
-
serviceAccountsLabel?: string;
|
|
224
|
-
onNavigateToServiceAccounts?: () => void;
|
|
225
|
-
onDeleteSuccess?: () => void;
|
|
226
|
-
}
|
|
227
|
-
declare function ServiceAccountDetailsView({ serviceAccountId, serviceAccountsLabel, onNavigateToServiceAccounts, onDeleteSuccess }: ServiceAccountDetailsViewProps): react_jsx_runtime.JSX.Element;
|
|
228
|
-
|
|
229
|
-
declare function PlansView(): react_jsx_runtime.JSX.Element;
|
|
230
|
-
|
|
231
|
-
interface PatsViewProps {
|
|
232
|
-
onPATClick?: (patId: string) => void;
|
|
233
|
-
}
|
|
234
|
-
declare function PatsView({ onPATClick }?: PatsViewProps): react_jsx_runtime.JSX.Element;
|
|
235
|
-
|
|
236
|
-
interface PATDetailsViewProps {
|
|
237
|
-
patId: string;
|
|
238
|
-
onNavigateToPats?: () => void;
|
|
239
|
-
onDeleteSuccess?: () => void;
|
|
240
|
-
}
|
|
241
|
-
declare function PATDetailsView({ patId, onNavigateToPats, onDeleteSuccess }: PATDetailsViewProps): react_jsx_runtime.JSX.Element;
|
|
242
|
-
|
|
243
|
-
type CreateOrganizationViewProps = ComponentPropsWithRef<'div'> & {
|
|
244
|
-
title?: string;
|
|
245
|
-
description?: string;
|
|
246
|
-
};
|
|
247
|
-
declare const CreateOrganizationView: ({ title, description, ...props }: CreateOrganizationViewProps) => react_jsx_runtime.JSX.Element;
|
|
248
|
-
|
|
249
216
|
interface BasePlan extends Omit<Plan, 'title'> {
|
|
250
217
|
features?: Record<string, string>;
|
|
251
218
|
title: string;
|
|
252
219
|
}
|
|
253
220
|
|
|
221
|
+
/**
|
|
222
|
+
* A render-prop slot: receives a context object (shape defined per view/slot)
|
|
223
|
+
* and returns the node to render. Lets a consumer override an internal element
|
|
224
|
+
* of a view while keeping the customisation on their side.
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* interface ViewSlots {
|
|
228
|
+
* addButton?: Slot<{ onClick: () => void; disabled: boolean }>;
|
|
229
|
+
* }
|
|
230
|
+
*/
|
|
231
|
+
type Slot<TContext> = (context: TContext) => React.ReactNode;
|
|
254
232
|
interface FrontierClientBillingOptions {
|
|
255
233
|
supportEmail?: string;
|
|
256
234
|
successUrl?: string;
|
|
@@ -307,6 +285,58 @@ interface FrontierProviderProps {
|
|
|
307
285
|
renderThemeProvider?: boolean;
|
|
308
286
|
}
|
|
309
287
|
|
|
288
|
+
interface ServiceAccountsViewProps {
|
|
289
|
+
onServiceAccountClick?: (id: string) => void;
|
|
290
|
+
slots?: {
|
|
291
|
+
addAccountButton?: Slot<{
|
|
292
|
+
onClick: () => void;
|
|
293
|
+
disabled: boolean;
|
|
294
|
+
}>;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
declare function ServiceAccountsView({ onServiceAccountClick, slots }: ServiceAccountsViewProps): react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
299
|
+
interface AddTokenFormProps {
|
|
300
|
+
serviceUserId: string;
|
|
301
|
+
onAddToken: (token: ServiceUserToken) => void;
|
|
302
|
+
generateKeyButton?: Slot<{
|
|
303
|
+
onClick: () => void;
|
|
304
|
+
loading: boolean;
|
|
305
|
+
disabled: boolean;
|
|
306
|
+
}>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface ServiceAccountDetailsViewProps {
|
|
310
|
+
serviceAccountId: string;
|
|
311
|
+
serviceAccountsLabel?: string;
|
|
312
|
+
onNavigateToServiceAccounts?: () => void;
|
|
313
|
+
onDeleteSuccess?: () => void;
|
|
314
|
+
slots?: {
|
|
315
|
+
generateKeyButton?: AddTokenFormProps['generateKeyButton'];
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
declare function ServiceAccountDetailsView({ serviceAccountId, serviceAccountsLabel, onNavigateToServiceAccounts, onDeleteSuccess, slots }: ServiceAccountDetailsViewProps): react_jsx_runtime.JSX.Element;
|
|
319
|
+
|
|
320
|
+
declare function PlansView(): react_jsx_runtime.JSX.Element;
|
|
321
|
+
|
|
322
|
+
interface PatsViewProps {
|
|
323
|
+
onPATClick?: (patId: string) => void;
|
|
324
|
+
}
|
|
325
|
+
declare function PatsView({ onPATClick }?: PatsViewProps): react_jsx_runtime.JSX.Element;
|
|
326
|
+
|
|
327
|
+
interface PATDetailsViewProps {
|
|
328
|
+
patId: string;
|
|
329
|
+
onNavigateToPats?: () => void;
|
|
330
|
+
onDeleteSuccess?: () => void;
|
|
331
|
+
}
|
|
332
|
+
declare function PATDetailsView({ patId, onNavigateToPats, onDeleteSuccess }: PATDetailsViewProps): react_jsx_runtime.JSX.Element;
|
|
333
|
+
|
|
334
|
+
type CreateOrganizationViewProps = ComponentPropsWithRef<'div'> & {
|
|
335
|
+
title?: string;
|
|
336
|
+
description?: string;
|
|
337
|
+
};
|
|
338
|
+
declare const CreateOrganizationView: ({ title, description, ...props }: CreateOrganizationViewProps) => react_jsx_runtime.JSX.Element;
|
|
339
|
+
|
|
310
340
|
interface FrontierContextProviderProps {
|
|
311
341
|
config: FrontierClientOptions;
|
|
312
342
|
organizations: Organization[];
|