@pipedream/connect-react 1.6.0 → 2.1.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/connect-react.es.js +5843 -7286
- package/dist/connect-react.umd.d.ts +93 -333
- package/dist/connect-react.umd.js +18 -18
- package/package.json +2 -2
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
import { Account } from '@pipedream/sdk';
|
|
2
2
|
import { App } from '@pipedream/sdk';
|
|
3
|
-
import {
|
|
4
|
-
import { AppResponse } from '@pipedream/sdk';
|
|
5
|
-
import { BrowserClient } from '@pipedream/sdk/browser';
|
|
3
|
+
import { AppsListRequest } from '@pipedream/sdk';
|
|
6
4
|
import { ClassNamesConfig } from 'react-select';
|
|
7
|
-
import { Component } from '
|
|
5
|
+
import { Component } from '@pipedream/sdk';
|
|
6
|
+
import { Component as Component_2 } from 'react';
|
|
8
7
|
import { ComponentProps } from 'react';
|
|
9
|
-
import {
|
|
8
|
+
import { ComponentsListRequest } from '@pipedream/sdk';
|
|
10
9
|
import { ConfigurableProp } from '@pipedream/sdk';
|
|
11
10
|
import { ConfigurablePropAlert } from '@pipedream/sdk';
|
|
12
11
|
import { ConfigurablePropApp } from '@pipedream/sdk';
|
|
12
|
+
import { ConfigurablePropBoolean } from '@pipedream/sdk';
|
|
13
13
|
import { ConfigurableProps } from '@pipedream/sdk';
|
|
14
14
|
import { ConfiguredProps } from '@pipedream/sdk';
|
|
15
15
|
import { Context } from 'react';
|
|
16
16
|
import { CSSProperties } from 'react';
|
|
17
|
+
import { DynamicProps as DynamicProps_2 } from '@pipedream/sdk';
|
|
17
18
|
import { FC } from 'react';
|
|
18
19
|
import { FetchStatus } from '@tanstack/query-core';
|
|
19
|
-
import { GetAccountOpts } from '@pipedream/sdk';
|
|
20
|
-
import { GetAccountsResponse } from '@pipedream/sdk';
|
|
21
20
|
import { GetAppResponse } from '@pipedream/sdk';
|
|
22
|
-
import { GetAppsOpts } from '@pipedream/sdk';
|
|
23
|
-
import { GetAppsResponse } from '@pipedream/sdk/browser';
|
|
24
21
|
import { GetComponentResponse } from '@pipedream/sdk';
|
|
25
|
-
import { GetComponentsOpts } from '@pipedream/sdk';
|
|
26
|
-
import { GetComponentsResponse } from '@pipedream/sdk/browser';
|
|
27
22
|
import { GroupBase } from 'react-select';
|
|
28
23
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
29
24
|
import { JSXElementConstructor } from 'react';
|
|
25
|
+
import { PipedreamClient } from '@pipedream/sdk/browser';
|
|
26
|
+
import { PropOption } from '@pipedream/sdk';
|
|
27
|
+
import { PropOptionValue } from '@pipedream/sdk';
|
|
30
28
|
import { Props } from 'react-select';
|
|
31
29
|
import { PropValue } from '@pipedream/sdk';
|
|
32
30
|
import { QueryObserverResult } from '@tanstack/query-core';
|
|
33
31
|
import { ReactNode } from 'react';
|
|
34
32
|
import { RefetchOptions } from '@tanstack/query-core';
|
|
35
|
-
import { ReloadComponentPropsResponse } from '@pipedream/sdk';
|
|
36
33
|
import { SelectComponentsConfig } from 'react-select';
|
|
37
34
|
import { StylesConfig } from 'react-select';
|
|
38
35
|
import { Theme as Theme_2 } from 'react-select';
|
|
39
36
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
40
|
-
import {
|
|
41
|
-
import { V1Component as V1Component_2 } from '@pipedream/sdk/browser';
|
|
37
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
42
38
|
|
|
43
39
|
export declare function Alert({ prop }: AlertProps): JSX_2.Element;
|
|
44
40
|
|
|
@@ -46,6 +42,10 @@ declare type AlertProps = {
|
|
|
46
42
|
prop: ConfigurablePropAlert;
|
|
47
43
|
};
|
|
48
44
|
|
|
45
|
+
export declare type AnyFormFieldContext = Omit<FormFieldContext<ConfigurableProp>, "onChange"> & {
|
|
46
|
+
onChange: (value: unknown) => void;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
49
|
export declare type BaseReactSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
|
|
50
50
|
components?: SelectComponentsConfig<Option, IsMulti, Group>;
|
|
51
51
|
styles?: StylesConfig<Option, IsMulti, Group>;
|
|
@@ -98,13 +98,13 @@ declare type ComponentFormProps<T extends ConfigurableProps, U = ConfiguredProps
|
|
|
98
98
|
* @deprecated Use `externalUserId` instead.
|
|
99
99
|
*/
|
|
100
100
|
userId?: string;
|
|
101
|
-
component:
|
|
101
|
+
component: Component;
|
|
102
102
|
configuredProps?: U;
|
|
103
103
|
disableQueryDisabling?: boolean;
|
|
104
104
|
propNames?: string[];
|
|
105
105
|
onSubmit?: (ctx: FormContext<T>) => void | Promise<void>;
|
|
106
106
|
onUpdateConfiguredProps?: (v: U) => void;
|
|
107
|
-
onUpdateDynamicProps?: (dp:
|
|
107
|
+
onUpdateDynamicProps?: (dp: DynamicProps_2) => void;
|
|
108
108
|
hideOptionalProps?: boolean;
|
|
109
109
|
sdkResponse?: U;
|
|
110
110
|
enableDebugging?: boolean;
|
|
@@ -147,9 +147,9 @@ declare type ControlProps<T extends ConfigurableProps, U extends ConfigurablePro
|
|
|
147
147
|
form: FormContext<T>;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
export declare function ControlSelect<T>({ isCreatable, options, selectProps, showLoadMoreButton, onLoadMore, components: componentsOverride, }: ControlSelectProps<T>): JSX_2.Element;
|
|
150
|
+
export declare function ControlSelect<T extends PropOptionValue>({ isCreatable, options, selectProps, showLoadMoreButton, onLoadMore, components: componentsOverride, }: ControlSelectProps<T>): JSX_2.Element;
|
|
151
151
|
|
|
152
|
-
declare type ControlSelectProps<T> = {
|
|
152
|
+
declare type ControlSelectProps<T extends PropOptionValue> = {
|
|
153
153
|
isCreatable?: boolean;
|
|
154
154
|
options: LabelValueOption<T>[];
|
|
155
155
|
selectProps?: Props<LabelValueOption<T>, boolean>;
|
|
@@ -184,11 +184,11 @@ export declare type CustomComponentsConfig<T, U extends boolean, V extends Group
|
|
|
184
184
|
|
|
185
185
|
export declare type CustomizableProps = {
|
|
186
186
|
componentForm: ComponentProps<typeof ComponentForm>;
|
|
187
|
-
connectButton: ComponentProps<typeof ControlApp> & FormFieldContext<
|
|
187
|
+
connectButton: ComponentProps<typeof ControlApp> & FormFieldContext<ConfigurablePropApp>;
|
|
188
188
|
controlAny: ComponentProps<typeof ControlAny> & FormFieldContext<ConfigurableProp>;
|
|
189
|
-
controlApp: ComponentProps<typeof ControlApp> & FormFieldContext<
|
|
189
|
+
controlApp: ComponentProps<typeof ControlApp> & FormFieldContext<ConfigurablePropApp>;
|
|
190
190
|
controlArray: ComponentProps<typeof ControlArray> & FormFieldContext<ConfigurableProp>;
|
|
191
|
-
controlBoolean: ComponentProps<typeof ControlBoolean> & FormFieldContext<
|
|
191
|
+
controlBoolean: ComponentProps<typeof ControlBoolean> & FormFieldContext<ConfigurablePropBoolean>;
|
|
192
192
|
controlInput: ComponentProps<typeof ControlInput> & FormFieldContext<ConfigurableProp>;
|
|
193
193
|
controlObject: ComponentProps<typeof ControlObject> & FormFieldContext<ConfigurableProp>;
|
|
194
194
|
controlSql: ComponentProps<typeof ControlSql> & FormFieldContext<ConfigurableProp>;
|
|
@@ -277,9 +277,16 @@ declare type DescriptionProps<T extends ConfigurableProps, U extends Configurabl
|
|
|
277
277
|
form: FormContext<T>;
|
|
278
278
|
};
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
/**
|
|
281
|
+
* Auxiliary type to avoid breaking the generic chain given that `DynamicProps`
|
|
282
|
+
* in the SDK is not generic. This prevents us from doing double casting and
|
|
283
|
+
* destroying type information (i.e. `as unknown as T`).
|
|
284
|
+
*/
|
|
285
|
+
declare interface DynamicProps<T extends ConfigurableProps = ConfigurableProps> extends Omit<DynamicProps_2, "configurableProps"> {
|
|
286
|
+
configurableProps?: T;
|
|
287
|
+
}
|
|
281
288
|
|
|
282
|
-
export declare class ErrorBoundary extends
|
|
289
|
+
export declare class ErrorBoundary extends Component_2<Props_2> {
|
|
283
290
|
state: {
|
|
284
291
|
err: undefined;
|
|
285
292
|
};
|
|
@@ -309,14 +316,14 @@ declare type FieldProps<T extends ConfigurableProp> = {
|
|
|
309
316
|
};
|
|
310
317
|
|
|
311
318
|
export declare type FormContext<T extends ConfigurableProps> = {
|
|
312
|
-
component:
|
|
319
|
+
component: Component;
|
|
313
320
|
configurableProps: T;
|
|
314
321
|
configuredProps: ConfiguredProps<T>;
|
|
315
|
-
dynamicProps?: DynamicProps
|
|
322
|
+
dynamicProps?: DynamicProps<T>;
|
|
316
323
|
dynamicPropsQueryIsFetching?: boolean;
|
|
317
324
|
errors: Record<string, string[]>;
|
|
318
325
|
sdkErrors: SdkError[];
|
|
319
|
-
fields: Record<string,
|
|
326
|
+
fields: Record<string, AnyFormFieldContext>;
|
|
320
327
|
id: string;
|
|
321
328
|
isValid: boolean;
|
|
322
329
|
optionalPropIsEnabled: (prop: ConfigurableProp) => boolean;
|
|
@@ -366,7 +373,7 @@ export declare const FrontendClientProvider: FC<FrontendClientProviderProps>;
|
|
|
366
373
|
|
|
367
374
|
declare type FrontendClientProviderProps = {
|
|
368
375
|
children: ReactNode;
|
|
369
|
-
client:
|
|
376
|
+
client: PipedreamClient;
|
|
370
377
|
};
|
|
371
378
|
|
|
372
379
|
export declare function getReactSelectTheme(theme: CustomThemeConfig | undefined): Theme_2;
|
|
@@ -377,15 +384,14 @@ export declare function InternalField<T extends ConfigurableProp>({ prop, idx, }
|
|
|
377
384
|
|
|
378
385
|
export declare function Label<T extends ConfigurableProps, U extends ConfigurableProp>(props: LabelProps<T, U>): JSX_2.Element;
|
|
379
386
|
|
|
380
|
-
declare type LabelProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
387
|
+
export declare type LabelProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
381
388
|
text: string;
|
|
382
389
|
field: FormFieldContext<U>;
|
|
383
390
|
form: FormContext<T>;
|
|
384
391
|
};
|
|
385
392
|
|
|
386
|
-
declare type LabelValueOption<T> = {
|
|
387
|
-
|
|
388
|
-
value: T;
|
|
393
|
+
declare type LabelValueOption<T extends PropOptionValue = PropOptionValue> = Omit<PropOption, "value"> & {
|
|
394
|
+
value?: T;
|
|
389
395
|
};
|
|
390
396
|
|
|
391
397
|
declare const LoadMoreButton: (props: ButtonProps) => JSX_2.Element;
|
|
@@ -431,27 +437,27 @@ declare type SdkError = {
|
|
|
431
437
|
export declare function SelectApp({ value, onChange, appsOptions, }: SelectAppProps): JSX_2.Element;
|
|
432
438
|
|
|
433
439
|
declare type SelectAppProps = {
|
|
434
|
-
value?: Partial<
|
|
435
|
-
|
|
440
|
+
value?: Partial<App> & {
|
|
441
|
+
nameSlug: string;
|
|
436
442
|
};
|
|
437
|
-
onChange?: (app?:
|
|
443
|
+
onChange?: (app?: App) => void;
|
|
438
444
|
/**
|
|
439
445
|
* Additional options for fetching apps (sorting, filtering, etc.)
|
|
440
446
|
*/
|
|
441
|
-
appsOptions?: Omit<
|
|
447
|
+
appsOptions?: Omit<AppsListRequest, "q">;
|
|
442
448
|
};
|
|
443
449
|
|
|
444
450
|
export declare function SelectComponent({ app, componentType, value, onChange, }: SelectComponentProps): JSX_2.Element;
|
|
445
451
|
|
|
446
452
|
declare type SelectComponentProps = {
|
|
447
|
-
app?: Partial<
|
|
448
|
-
|
|
453
|
+
app?: Partial<App> & {
|
|
454
|
+
nameSlug: string;
|
|
449
455
|
};
|
|
450
456
|
componentType?: "action" | "trigger";
|
|
451
|
-
value?: Partial<
|
|
457
|
+
value?: Partial<Component> & {
|
|
452
458
|
key: string;
|
|
453
459
|
};
|
|
454
|
-
onChange?: (component?:
|
|
460
|
+
onChange?: (component?: Component) => void;
|
|
455
461
|
};
|
|
456
462
|
|
|
457
463
|
export declare type Shadows = {
|
|
@@ -481,11 +487,17 @@ export declare const unstyledTheme: Theme;
|
|
|
481
487
|
/**
|
|
482
488
|
* Retrieves the list of accounts associated with the project.
|
|
483
489
|
*/
|
|
484
|
-
export declare const useAccounts: (input:
|
|
485
|
-
|
|
490
|
+
export declare const useAccounts: (input: {
|
|
491
|
+
external_user_id?: string;
|
|
492
|
+
app?: string;
|
|
493
|
+
oauth_app_id?: string;
|
|
494
|
+
}, opts?: {
|
|
495
|
+
useQueryOpts?: (Omit<UseQueryOptions<Account[]>, "queryKey" | "queryFn"> & {
|
|
496
|
+
suspense?: boolean;
|
|
497
|
+
});
|
|
486
498
|
}) => {
|
|
487
499
|
accounts: Account[];
|
|
488
|
-
data:
|
|
500
|
+
data: Account[];
|
|
489
501
|
error: Error;
|
|
490
502
|
isError: true;
|
|
491
503
|
isPending: false;
|
|
@@ -507,12 +519,12 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
507
519
|
isPlaceholderData: boolean;
|
|
508
520
|
isRefetching: boolean;
|
|
509
521
|
isStale: boolean;
|
|
510
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
522
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
511
523
|
fetchStatus: FetchStatus;
|
|
512
|
-
promise: Promise<
|
|
524
|
+
promise: Promise<Account[]>;
|
|
513
525
|
} | {
|
|
514
526
|
accounts: Account[];
|
|
515
|
-
data:
|
|
527
|
+
data: Account[];
|
|
516
528
|
error: null;
|
|
517
529
|
isError: false;
|
|
518
530
|
isPending: false;
|
|
@@ -534,9 +546,9 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
534
546
|
isPlaceholderData: boolean;
|
|
535
547
|
isRefetching: boolean;
|
|
536
548
|
isStale: boolean;
|
|
537
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
549
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
538
550
|
fetchStatus: FetchStatus;
|
|
539
|
-
promise: Promise<
|
|
551
|
+
promise: Promise<Account[]>;
|
|
540
552
|
} | {
|
|
541
553
|
accounts: Account[];
|
|
542
554
|
data: undefined;
|
|
@@ -561,9 +573,9 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
561
573
|
isPlaceholderData: boolean;
|
|
562
574
|
isRefetching: boolean;
|
|
563
575
|
isStale: boolean;
|
|
564
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
576
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
565
577
|
fetchStatus: FetchStatus;
|
|
566
|
-
promise: Promise<
|
|
578
|
+
promise: Promise<Account[]>;
|
|
567
579
|
} | {
|
|
568
580
|
accounts: Account[];
|
|
569
581
|
data: undefined;
|
|
@@ -588,9 +600,9 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
588
600
|
isPlaceholderData: boolean;
|
|
589
601
|
isRefetching: boolean;
|
|
590
602
|
isStale: boolean;
|
|
591
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
603
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
592
604
|
fetchStatus: FetchStatus;
|
|
593
|
-
promise: Promise<
|
|
605
|
+
promise: Promise<Account[]>;
|
|
594
606
|
} | {
|
|
595
607
|
accounts: Account[];
|
|
596
608
|
data: undefined;
|
|
@@ -615,16 +627,18 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
615
627
|
isPlaceholderData: boolean;
|
|
616
628
|
isRefetching: boolean;
|
|
617
629
|
isStale: boolean;
|
|
618
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
630
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
619
631
|
fetchStatus: FetchStatus;
|
|
620
|
-
promise: Promise<
|
|
632
|
+
promise: Promise<Account[]>;
|
|
621
633
|
};
|
|
622
634
|
|
|
623
635
|
/**
|
|
624
636
|
* Get details about an app
|
|
625
637
|
*/
|
|
626
638
|
export declare const useApp: (slug: string, opts?: {
|
|
627
|
-
useQueryOpts?: Omit<UseQueryOptions<GetAppResponse>, "queryKey" | "queryFn"
|
|
639
|
+
useQueryOpts?: (Omit<UseQueryOptions<GetAppResponse>, "queryKey" | "queryFn"> & {
|
|
640
|
+
suspense?: boolean;
|
|
641
|
+
});
|
|
628
642
|
}) => {
|
|
629
643
|
app: App | undefined;
|
|
630
644
|
data: GetAppResponse;
|
|
@@ -763,143 +777,16 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
763
777
|
};
|
|
764
778
|
|
|
765
779
|
/**
|
|
766
|
-
* Get list of apps that can be authenticated
|
|
780
|
+
* Get list of apps that can be authenticated with pagination support
|
|
767
781
|
*/
|
|
768
|
-
export declare const useApps: (input?:
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
isRefetchError: true;
|
|
777
|
-
isSuccess: false;
|
|
778
|
-
status: "error";
|
|
779
|
-
dataUpdatedAt: number;
|
|
780
|
-
errorUpdatedAt: number;
|
|
781
|
-
failureCount: number;
|
|
782
|
-
failureReason: Error | null;
|
|
783
|
-
errorUpdateCount: number;
|
|
784
|
-
isFetched: boolean;
|
|
785
|
-
isFetchedAfterMount: boolean;
|
|
786
|
-
isFetching: boolean;
|
|
787
|
-
isInitialLoading: boolean;
|
|
788
|
-
isPaused: boolean;
|
|
789
|
-
isPlaceholderData: boolean;
|
|
790
|
-
isRefetching: boolean;
|
|
791
|
-
isStale: boolean;
|
|
792
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetAppsResponse, Error>>;
|
|
793
|
-
fetchStatus: FetchStatus;
|
|
794
|
-
promise: Promise<GetAppsResponse>;
|
|
795
|
-
} | {
|
|
796
|
-
apps: App_2[];
|
|
797
|
-
data: GetAppsResponse;
|
|
798
|
-
error: null;
|
|
799
|
-
isError: false;
|
|
800
|
-
isPending: false;
|
|
801
|
-
isLoading: false;
|
|
802
|
-
isLoadingError: false;
|
|
803
|
-
isRefetchError: false;
|
|
804
|
-
isSuccess: true;
|
|
805
|
-
status: "success";
|
|
806
|
-
dataUpdatedAt: number;
|
|
807
|
-
errorUpdatedAt: number;
|
|
808
|
-
failureCount: number;
|
|
809
|
-
failureReason: Error | null;
|
|
810
|
-
errorUpdateCount: number;
|
|
811
|
-
isFetched: boolean;
|
|
812
|
-
isFetchedAfterMount: boolean;
|
|
813
|
-
isFetching: boolean;
|
|
814
|
-
isInitialLoading: boolean;
|
|
815
|
-
isPaused: boolean;
|
|
816
|
-
isPlaceholderData: boolean;
|
|
817
|
-
isRefetching: boolean;
|
|
818
|
-
isStale: boolean;
|
|
819
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetAppsResponse, Error>>;
|
|
820
|
-
fetchStatus: FetchStatus;
|
|
821
|
-
promise: Promise<GetAppsResponse>;
|
|
822
|
-
} | {
|
|
823
|
-
apps: App_2[];
|
|
824
|
-
data: undefined;
|
|
825
|
-
error: Error;
|
|
826
|
-
isError: true;
|
|
827
|
-
isPending: false;
|
|
828
|
-
isLoading: false;
|
|
829
|
-
isLoadingError: true;
|
|
830
|
-
isRefetchError: false;
|
|
831
|
-
isSuccess: false;
|
|
832
|
-
status: "error";
|
|
833
|
-
dataUpdatedAt: number;
|
|
834
|
-
errorUpdatedAt: number;
|
|
835
|
-
failureCount: number;
|
|
836
|
-
failureReason: Error | null;
|
|
837
|
-
errorUpdateCount: number;
|
|
838
|
-
isFetched: boolean;
|
|
839
|
-
isFetchedAfterMount: boolean;
|
|
840
|
-
isFetching: boolean;
|
|
841
|
-
isInitialLoading: boolean;
|
|
842
|
-
isPaused: boolean;
|
|
843
|
-
isPlaceholderData: boolean;
|
|
844
|
-
isRefetching: boolean;
|
|
845
|
-
isStale: boolean;
|
|
846
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetAppsResponse, Error>>;
|
|
847
|
-
fetchStatus: FetchStatus;
|
|
848
|
-
promise: Promise<GetAppsResponse>;
|
|
849
|
-
} | {
|
|
850
|
-
apps: App_2[];
|
|
851
|
-
data: undefined;
|
|
852
|
-
error: null;
|
|
853
|
-
isError: false;
|
|
854
|
-
isPending: true;
|
|
855
|
-
isLoading: true;
|
|
856
|
-
isLoadingError: false;
|
|
857
|
-
isRefetchError: false;
|
|
858
|
-
isSuccess: false;
|
|
859
|
-
status: "pending";
|
|
860
|
-
dataUpdatedAt: number;
|
|
861
|
-
errorUpdatedAt: number;
|
|
862
|
-
failureCount: number;
|
|
863
|
-
failureReason: Error | null;
|
|
864
|
-
errorUpdateCount: number;
|
|
865
|
-
isFetched: boolean;
|
|
866
|
-
isFetchedAfterMount: boolean;
|
|
867
|
-
isFetching: boolean;
|
|
868
|
-
isInitialLoading: boolean;
|
|
869
|
-
isPaused: boolean;
|
|
870
|
-
isPlaceholderData: boolean;
|
|
871
|
-
isRefetching: boolean;
|
|
872
|
-
isStale: boolean;
|
|
873
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetAppsResponse, Error>>;
|
|
874
|
-
fetchStatus: FetchStatus;
|
|
875
|
-
promise: Promise<GetAppsResponse>;
|
|
876
|
-
} | {
|
|
877
|
-
apps: App_2[];
|
|
878
|
-
data: undefined;
|
|
879
|
-
error: null;
|
|
880
|
-
isError: false;
|
|
881
|
-
isPending: true;
|
|
882
|
-
isLoadingError: false;
|
|
883
|
-
isRefetchError: false;
|
|
884
|
-
isSuccess: false;
|
|
885
|
-
status: "pending";
|
|
886
|
-
dataUpdatedAt: number;
|
|
887
|
-
errorUpdatedAt: number;
|
|
888
|
-
failureCount: number;
|
|
889
|
-
failureReason: Error | null;
|
|
890
|
-
errorUpdateCount: number;
|
|
891
|
-
isFetched: boolean;
|
|
892
|
-
isFetchedAfterMount: boolean;
|
|
893
|
-
isFetching: boolean;
|
|
894
|
-
isLoading: boolean;
|
|
895
|
-
isInitialLoading: boolean;
|
|
896
|
-
isPaused: boolean;
|
|
897
|
-
isPlaceholderData: boolean;
|
|
898
|
-
isRefetching: boolean;
|
|
899
|
-
isStale: boolean;
|
|
900
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetAppsResponse, Error>>;
|
|
901
|
-
fetchStatus: FetchStatus;
|
|
902
|
-
promise: Promise<GetAppsResponse>;
|
|
782
|
+
export declare const useApps: (input?: AppsListRequest) => UseAppsResult;
|
|
783
|
+
|
|
784
|
+
export declare type UseAppsResult = Omit<UseQueryResult<unknown, Error>, "data"> & {
|
|
785
|
+
apps: App[];
|
|
786
|
+
isLoadingMore: boolean;
|
|
787
|
+
hasMore: boolean;
|
|
788
|
+
loadMore: () => Promise<void>;
|
|
789
|
+
loadMoreError?: Error;
|
|
903
790
|
};
|
|
904
791
|
|
|
905
792
|
/**
|
|
@@ -908,9 +795,9 @@ export declare const useApps: (input?: GetAppsOpts) => {
|
|
|
908
795
|
export declare const useComponent: ({ key }: {
|
|
909
796
|
key?: string;
|
|
910
797
|
}, opts?: {
|
|
911
|
-
useQueryOpts?: Omit<UseQueryOptions<
|
|
798
|
+
useQueryOpts?: Omit<UseQueryOptions<GetComponentResponse>, "queryKey" | "queryFn">;
|
|
912
799
|
}) => {
|
|
913
|
-
component:
|
|
800
|
+
component: Component | undefined;
|
|
914
801
|
data: GetComponentResponse;
|
|
915
802
|
error: Error;
|
|
916
803
|
isError: true;
|
|
@@ -937,7 +824,7 @@ export declare const useComponent: ({ key }: {
|
|
|
937
824
|
fetchStatus: FetchStatus;
|
|
938
825
|
promise: Promise<GetComponentResponse>;
|
|
939
826
|
} | {
|
|
940
|
-
component:
|
|
827
|
+
component: Component | undefined;
|
|
941
828
|
data: GetComponentResponse;
|
|
942
829
|
error: null;
|
|
943
830
|
isError: false;
|
|
@@ -964,7 +851,7 @@ export declare const useComponent: ({ key }: {
|
|
|
964
851
|
fetchStatus: FetchStatus;
|
|
965
852
|
promise: Promise<GetComponentResponse>;
|
|
966
853
|
} | {
|
|
967
|
-
component:
|
|
854
|
+
component: Component | undefined;
|
|
968
855
|
data: undefined;
|
|
969
856
|
error: Error;
|
|
970
857
|
isError: true;
|
|
@@ -991,7 +878,7 @@ export declare const useComponent: ({ key }: {
|
|
|
991
878
|
fetchStatus: FetchStatus;
|
|
992
879
|
promise: Promise<GetComponentResponse>;
|
|
993
880
|
} | {
|
|
994
|
-
component:
|
|
881
|
+
component: Component | undefined;
|
|
995
882
|
data: undefined;
|
|
996
883
|
error: null;
|
|
997
884
|
isError: false;
|
|
@@ -1018,7 +905,7 @@ export declare const useComponent: ({ key }: {
|
|
|
1018
905
|
fetchStatus: FetchStatus;
|
|
1019
906
|
promise: Promise<GetComponentResponse>;
|
|
1020
907
|
} | {
|
|
1021
|
-
component:
|
|
908
|
+
component: Component | undefined;
|
|
1022
909
|
data: undefined;
|
|
1023
910
|
error: null;
|
|
1024
911
|
isError: false;
|
|
@@ -1047,143 +934,16 @@ export declare const useComponent: ({ key }: {
|
|
|
1047
934
|
};
|
|
1048
935
|
|
|
1049
936
|
/**
|
|
1050
|
-
* Get list of components
|
|
937
|
+
* Get list of components with pagination support
|
|
1051
938
|
*/
|
|
1052
|
-
export declare const useComponents: (input?:
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
isRefetchError: true;
|
|
1061
|
-
isSuccess: false;
|
|
1062
|
-
status: "error";
|
|
1063
|
-
dataUpdatedAt: number;
|
|
1064
|
-
errorUpdatedAt: number;
|
|
1065
|
-
failureCount: number;
|
|
1066
|
-
failureReason: Error | null;
|
|
1067
|
-
errorUpdateCount: number;
|
|
1068
|
-
isFetched: boolean;
|
|
1069
|
-
isFetchedAfterMount: boolean;
|
|
1070
|
-
isFetching: boolean;
|
|
1071
|
-
isInitialLoading: boolean;
|
|
1072
|
-
isPaused: boolean;
|
|
1073
|
-
isPlaceholderData: boolean;
|
|
1074
|
-
isRefetching: boolean;
|
|
1075
|
-
isStale: boolean;
|
|
1076
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentsResponse, Error>>;
|
|
1077
|
-
fetchStatus: FetchStatus;
|
|
1078
|
-
promise: Promise<GetComponentsResponse>;
|
|
1079
|
-
} | {
|
|
1080
|
-
components: V1Component_2<any>[];
|
|
1081
|
-
data: GetComponentsResponse;
|
|
1082
|
-
error: null;
|
|
1083
|
-
isError: false;
|
|
1084
|
-
isPending: false;
|
|
1085
|
-
isLoading: false;
|
|
1086
|
-
isLoadingError: false;
|
|
1087
|
-
isRefetchError: false;
|
|
1088
|
-
isSuccess: true;
|
|
1089
|
-
status: "success";
|
|
1090
|
-
dataUpdatedAt: number;
|
|
1091
|
-
errorUpdatedAt: number;
|
|
1092
|
-
failureCount: number;
|
|
1093
|
-
failureReason: Error | null;
|
|
1094
|
-
errorUpdateCount: number;
|
|
1095
|
-
isFetched: boolean;
|
|
1096
|
-
isFetchedAfterMount: boolean;
|
|
1097
|
-
isFetching: boolean;
|
|
1098
|
-
isInitialLoading: boolean;
|
|
1099
|
-
isPaused: boolean;
|
|
1100
|
-
isPlaceholderData: boolean;
|
|
1101
|
-
isRefetching: boolean;
|
|
1102
|
-
isStale: boolean;
|
|
1103
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentsResponse, Error>>;
|
|
1104
|
-
fetchStatus: FetchStatus;
|
|
1105
|
-
promise: Promise<GetComponentsResponse>;
|
|
1106
|
-
} | {
|
|
1107
|
-
components: V1Component_2<any>[];
|
|
1108
|
-
data: undefined;
|
|
1109
|
-
error: Error;
|
|
1110
|
-
isError: true;
|
|
1111
|
-
isPending: false;
|
|
1112
|
-
isLoading: false;
|
|
1113
|
-
isLoadingError: true;
|
|
1114
|
-
isRefetchError: false;
|
|
1115
|
-
isSuccess: false;
|
|
1116
|
-
status: "error";
|
|
1117
|
-
dataUpdatedAt: number;
|
|
1118
|
-
errorUpdatedAt: number;
|
|
1119
|
-
failureCount: number;
|
|
1120
|
-
failureReason: Error | null;
|
|
1121
|
-
errorUpdateCount: number;
|
|
1122
|
-
isFetched: boolean;
|
|
1123
|
-
isFetchedAfterMount: boolean;
|
|
1124
|
-
isFetching: boolean;
|
|
1125
|
-
isInitialLoading: boolean;
|
|
1126
|
-
isPaused: boolean;
|
|
1127
|
-
isPlaceholderData: boolean;
|
|
1128
|
-
isRefetching: boolean;
|
|
1129
|
-
isStale: boolean;
|
|
1130
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentsResponse, Error>>;
|
|
1131
|
-
fetchStatus: FetchStatus;
|
|
1132
|
-
promise: Promise<GetComponentsResponse>;
|
|
1133
|
-
} | {
|
|
1134
|
-
components: V1Component_2<any>[];
|
|
1135
|
-
data: undefined;
|
|
1136
|
-
error: null;
|
|
1137
|
-
isError: false;
|
|
1138
|
-
isPending: true;
|
|
1139
|
-
isLoading: true;
|
|
1140
|
-
isLoadingError: false;
|
|
1141
|
-
isRefetchError: false;
|
|
1142
|
-
isSuccess: false;
|
|
1143
|
-
status: "pending";
|
|
1144
|
-
dataUpdatedAt: number;
|
|
1145
|
-
errorUpdatedAt: number;
|
|
1146
|
-
failureCount: number;
|
|
1147
|
-
failureReason: Error | null;
|
|
1148
|
-
errorUpdateCount: number;
|
|
1149
|
-
isFetched: boolean;
|
|
1150
|
-
isFetchedAfterMount: boolean;
|
|
1151
|
-
isFetching: boolean;
|
|
1152
|
-
isInitialLoading: boolean;
|
|
1153
|
-
isPaused: boolean;
|
|
1154
|
-
isPlaceholderData: boolean;
|
|
1155
|
-
isRefetching: boolean;
|
|
1156
|
-
isStale: boolean;
|
|
1157
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentsResponse, Error>>;
|
|
1158
|
-
fetchStatus: FetchStatus;
|
|
1159
|
-
promise: Promise<GetComponentsResponse>;
|
|
1160
|
-
} | {
|
|
1161
|
-
components: V1Component_2<any>[];
|
|
1162
|
-
data: undefined;
|
|
1163
|
-
error: null;
|
|
1164
|
-
isError: false;
|
|
1165
|
-
isPending: true;
|
|
1166
|
-
isLoadingError: false;
|
|
1167
|
-
isRefetchError: false;
|
|
1168
|
-
isSuccess: false;
|
|
1169
|
-
status: "pending";
|
|
1170
|
-
dataUpdatedAt: number;
|
|
1171
|
-
errorUpdatedAt: number;
|
|
1172
|
-
failureCount: number;
|
|
1173
|
-
failureReason: Error | null;
|
|
1174
|
-
errorUpdateCount: number;
|
|
1175
|
-
isFetched: boolean;
|
|
1176
|
-
isFetchedAfterMount: boolean;
|
|
1177
|
-
isFetching: boolean;
|
|
1178
|
-
isLoading: boolean;
|
|
1179
|
-
isInitialLoading: boolean;
|
|
1180
|
-
isPaused: boolean;
|
|
1181
|
-
isPlaceholderData: boolean;
|
|
1182
|
-
isRefetching: boolean;
|
|
1183
|
-
isStale: boolean;
|
|
1184
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentsResponse, Error>>;
|
|
1185
|
-
fetchStatus: FetchStatus;
|
|
1186
|
-
promise: Promise<GetComponentsResponse>;
|
|
939
|
+
export declare const useComponents: (input?: ComponentsListRequest) => UseComponentsResult;
|
|
940
|
+
|
|
941
|
+
export declare type UseComponentsResult = Omit<UseQueryResult<unknown, Error>, "data"> & {
|
|
942
|
+
components: Component[];
|
|
943
|
+
isLoadingMore: boolean;
|
|
944
|
+
hasMore: boolean;
|
|
945
|
+
loadMore: () => Promise<void>;
|
|
946
|
+
loadMoreError?: Error;
|
|
1187
947
|
};
|
|
1188
948
|
|
|
1189
949
|
export declare function useCustomize(): Customization;
|
|
@@ -1192,6 +952,6 @@ export declare const useFormContext: () => FormContext<any>;
|
|
|
1192
952
|
|
|
1193
953
|
export declare const useFormFieldContext: <T extends ConfigurableProp>() => FormFieldContext<T>;
|
|
1194
954
|
|
|
1195
|
-
export declare const useFrontendClient: () =>
|
|
955
|
+
export declare const useFrontendClient: () => PipedreamClient;
|
|
1196
956
|
|
|
1197
957
|
export { }
|