@pipedream/connect-react 1.5.0 → 2.0.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 +5546 -7278
- package/dist/connect-react.umd.d.ts +130 -365
- package/dist/connect-react.umd.js +19 -19
- package/package.json +5 -3
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Account } from '@pipedream/sdk';
|
|
2
|
+
import { App } from '@pipedream/sdk';
|
|
3
|
+
import { AppsListRequest } from '@pipedream/sdk';
|
|
4
4
|
import { ClassNamesConfig } from 'react-select';
|
|
5
|
-
import { Component } from '
|
|
5
|
+
import { Component } from '@pipedream/sdk';
|
|
6
|
+
import { Component as Component_2 } from 'react';
|
|
6
7
|
import { ComponentProps } from 'react';
|
|
7
|
-
import {
|
|
8
|
+
import { ComponentsListRequest } from '@pipedream/sdk';
|
|
8
9
|
import { ConfigurableProp } from '@pipedream/sdk';
|
|
9
10
|
import { ConfigurablePropAlert } from '@pipedream/sdk';
|
|
10
11
|
import { ConfigurablePropApp } from '@pipedream/sdk';
|
|
12
|
+
import { ConfigurablePropBoolean } from '@pipedream/sdk';
|
|
11
13
|
import { ConfigurableProps } from '@pipedream/sdk';
|
|
12
14
|
import { ConfiguredProps } from '@pipedream/sdk';
|
|
13
15
|
import { Context } from 'react';
|
|
14
16
|
import { CSSProperties } from 'react';
|
|
17
|
+
import { DynamicProps as DynamicProps_2 } from '@pipedream/sdk';
|
|
15
18
|
import { FC } from 'react';
|
|
16
19
|
import { FetchStatus } from '@tanstack/query-core';
|
|
17
|
-
import { GetAccountOpts } from '@pipedream/sdk';
|
|
18
20
|
import { GetAppResponse } from '@pipedream/sdk';
|
|
19
|
-
import {
|
|
20
|
-
import { GetComponentsOpts } from '@pipedream/sdk';
|
|
21
|
+
import { GetComponentResponse } from '@pipedream/sdk';
|
|
21
22
|
import { GroupBase } from 'react-select';
|
|
22
23
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
23
24
|
import { JSXElementConstructor } from 'react';
|
|
25
|
+
import { PipedreamClient } from '@pipedream/sdk/browser';
|
|
26
|
+
import { PropOption } from '@pipedream/sdk';
|
|
27
|
+
import { PropOptionValue } from '@pipedream/sdk';
|
|
24
28
|
import { Props } from 'react-select';
|
|
25
29
|
import { PropValue } from '@pipedream/sdk';
|
|
26
30
|
import { QueryObserverResult } from '@tanstack/query-core';
|
|
@@ -30,7 +34,6 @@ import { SelectComponentsConfig } from 'react-select';
|
|
|
30
34
|
import { StylesConfig } from 'react-select';
|
|
31
35
|
import { Theme as Theme_2 } from 'react-select';
|
|
32
36
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
33
|
-
import { V1Component } from '@pipedream/sdk';
|
|
34
37
|
|
|
35
38
|
export declare function Alert({ prop }: AlertProps): JSX_2.Element;
|
|
36
39
|
|
|
@@ -38,9 +41,13 @@ declare type AlertProps = {
|
|
|
38
41
|
prop: ConfigurablePropAlert;
|
|
39
42
|
};
|
|
40
43
|
|
|
41
|
-
export declare type
|
|
44
|
+
export declare type AnyFormFieldContext = Omit<FormFieldContext<ConfigurableProp>, "onChange"> & {
|
|
45
|
+
onChange: (value: unknown) => void;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export declare type BaseReactSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
|
|
42
49
|
components?: SelectComponentsConfig<Option, IsMulti, Group>;
|
|
43
|
-
styles?: StylesConfig
|
|
50
|
+
styles?: StylesConfig<Option, IsMulti, Group>;
|
|
44
51
|
};
|
|
45
52
|
|
|
46
53
|
declare type ButtonProps = {
|
|
@@ -73,7 +80,13 @@ export declare function ComponentFormContainer<T extends ConfigurableProps>(prop
|
|
|
73
80
|
|
|
74
81
|
declare type ComponentFormContainerProps<T extends ConfigurableProps> = Omit<ComponentFormProps<T>, "component"> & {
|
|
75
82
|
componentKey: string;
|
|
76
|
-
}
|
|
83
|
+
} & ({
|
|
84
|
+
externalUserId: string;
|
|
85
|
+
userId?: never;
|
|
86
|
+
} | {
|
|
87
|
+
userId: string;
|
|
88
|
+
externalUserId?: never;
|
|
89
|
+
});
|
|
77
90
|
|
|
78
91
|
declare type ComponentFormProps<T extends ConfigurableProps, U = ConfiguredProps<T>> = {
|
|
79
92
|
/**
|
|
@@ -84,15 +97,15 @@ declare type ComponentFormProps<T extends ConfigurableProps, U = ConfiguredProps
|
|
|
84
97
|
* @deprecated Use `externalUserId` instead.
|
|
85
98
|
*/
|
|
86
99
|
userId?: string;
|
|
87
|
-
component:
|
|
100
|
+
component: Component;
|
|
88
101
|
configuredProps?: U;
|
|
89
102
|
disableQueryDisabling?: boolean;
|
|
90
103
|
propNames?: string[];
|
|
91
104
|
onSubmit?: (ctx: FormContext<T>) => void | Promise<void>;
|
|
92
105
|
onUpdateConfiguredProps?: (v: U) => void;
|
|
93
|
-
onUpdateDynamicProps?: (dp:
|
|
106
|
+
onUpdateDynamicProps?: (dp: DynamicProps_2) => void;
|
|
94
107
|
hideOptionalProps?: boolean;
|
|
95
|
-
sdkResponse?:
|
|
108
|
+
sdkResponse?: U;
|
|
96
109
|
enableDebugging?: boolean;
|
|
97
110
|
/**
|
|
98
111
|
* OAuth app ID configuration for specific apps.
|
|
@@ -117,7 +130,7 @@ export declare function ControlAny(): JSX_2.Element;
|
|
|
117
130
|
export declare function ControlApp({ app }: ControlAppProps): JSX_2.Element;
|
|
118
131
|
|
|
119
132
|
declare type ControlAppProps = {
|
|
120
|
-
app:
|
|
133
|
+
app: App;
|
|
121
134
|
};
|
|
122
135
|
|
|
123
136
|
declare function ControlArray(): JSX_2.Element;
|
|
@@ -133,25 +146,23 @@ declare type ControlProps<T extends ConfigurableProps, U extends ConfigurablePro
|
|
|
133
146
|
form: FormContext<T>;
|
|
134
147
|
};
|
|
135
148
|
|
|
136
|
-
export declare function ControlSelect<T>({ isCreatable, options, selectProps, showLoadMoreButton, onLoadMore, }: ControlSelectProps<T>): JSX_2.Element;
|
|
149
|
+
export declare function ControlSelect<T extends PropOptionValue>({ isCreatable, options, selectProps, showLoadMoreButton, onLoadMore, components: componentsOverride, }: ControlSelectProps<T>): JSX_2.Element;
|
|
137
150
|
|
|
138
|
-
declare type ControlSelectProps<T> = {
|
|
151
|
+
declare type ControlSelectProps<T extends PropOptionValue> = {
|
|
139
152
|
isCreatable?: boolean;
|
|
140
|
-
options:
|
|
141
|
-
|
|
142
|
-
value: T;
|
|
143
|
-
}[];
|
|
144
|
-
selectProps?: Props;
|
|
153
|
+
options: LabelValueOption<T>[];
|
|
154
|
+
selectProps?: Props<LabelValueOption<T>, boolean>;
|
|
145
155
|
showLoadMoreButton?: boolean;
|
|
146
156
|
onLoadMore?: () => void;
|
|
157
|
+
components?: Props<LabelValueOption<T>, boolean>["components"];
|
|
147
158
|
};
|
|
148
159
|
|
|
149
160
|
export declare function ControlSql(): JSX_2.Element;
|
|
150
161
|
|
|
151
|
-
export declare function ControlSubmit(props: ControlSubmitProps): JSX_2.Element;
|
|
162
|
+
export declare function ControlSubmit<T extends ConfigurableProps>(props: ControlSubmitProps<T>): JSX_2.Element;
|
|
152
163
|
|
|
153
|
-
declare type ControlSubmitProps = {
|
|
154
|
-
form: FormContext
|
|
164
|
+
declare type ControlSubmitProps<T extends ConfigurableProps> = {
|
|
165
|
+
form: FormContext<T>;
|
|
155
166
|
};
|
|
156
167
|
|
|
157
168
|
export declare type CustomClassNamesConfig = {
|
|
@@ -172,11 +183,11 @@ export declare type CustomComponentsConfig<T, U extends boolean, V extends Group
|
|
|
172
183
|
|
|
173
184
|
export declare type CustomizableProps = {
|
|
174
185
|
componentForm: ComponentProps<typeof ComponentForm>;
|
|
175
|
-
connectButton: ComponentProps<typeof ControlApp> & FormFieldContext<
|
|
186
|
+
connectButton: ComponentProps<typeof ControlApp> & FormFieldContext<ConfigurablePropApp>;
|
|
176
187
|
controlAny: ComponentProps<typeof ControlAny> & FormFieldContext<ConfigurableProp>;
|
|
177
|
-
controlApp: ComponentProps<typeof ControlApp> & FormFieldContext<
|
|
188
|
+
controlApp: ComponentProps<typeof ControlApp> & FormFieldContext<ConfigurablePropApp>;
|
|
178
189
|
controlArray: ComponentProps<typeof ControlArray> & FormFieldContext<ConfigurableProp>;
|
|
179
|
-
controlBoolean: ComponentProps<typeof ControlBoolean> & FormFieldContext<
|
|
190
|
+
controlBoolean: ComponentProps<typeof ControlBoolean> & FormFieldContext<ConfigurablePropBoolean>;
|
|
180
191
|
controlInput: ComponentProps<typeof ControlInput> & FormFieldContext<ConfigurableProp>;
|
|
181
192
|
controlObject: ComponentProps<typeof ControlObject> & FormFieldContext<ConfigurableProp>;
|
|
182
193
|
controlSql: ComponentProps<typeof ControlSql> & FormFieldContext<ConfigurableProp>;
|
|
@@ -200,10 +211,10 @@ export declare type Customization = {
|
|
|
200
211
|
theme: Theme;
|
|
201
212
|
select: {
|
|
202
213
|
getClassNamePrefix: <Key extends keyof ReactSelectComponents>(name: Key) => string;
|
|
203
|
-
getClassNames: <Key extends keyof ReactSelectComponents>(name: Key) => ClassNamesConfig
|
|
204
|
-
getComponents: <Key extends keyof ReactSelectComponents>(name: Key, baseComponents?: SelectComponentsConfig<
|
|
205
|
-
getStyles: <Key extends keyof ReactSelectComponents>(name: Key, baseStyles?: StylesConfig) => StylesConfig
|
|
206
|
-
getProps: <Key extends keyof ReactSelectComponents>(name: Key, baseProps?: BaseReactSelectProps<
|
|
214
|
+
getClassNames: <Key extends keyof ReactSelectComponents, Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(name: Key) => ClassNamesConfig<Option, IsMulti, Group>;
|
|
215
|
+
getComponents: <Key extends keyof ReactSelectComponents, Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(name: Key, baseComponents?: SelectComponentsConfig<Option, IsMulti, Group>) => SelectComponentsConfig<Option, IsMulti, Group>;
|
|
216
|
+
getStyles: <Key extends keyof ReactSelectComponents, Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(name: Key, baseStyles?: StylesConfig<Option, IsMulti, Group>) => StylesConfig<Option, IsMulti, Group>;
|
|
217
|
+
getProps: <Key extends keyof ReactSelectComponents, Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(name: Key, baseProps?: BaseReactSelectProps<Option, IsMulti, Group>) => Partial<Props<Option, IsMulti, Group>>;
|
|
207
218
|
theme: Theme_2;
|
|
208
219
|
};
|
|
209
220
|
};
|
|
@@ -265,12 +276,16 @@ declare type DescriptionProps<T extends ConfigurableProps, U extends Configurabl
|
|
|
265
276
|
form: FormContext<T>;
|
|
266
277
|
};
|
|
267
278
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
279
|
+
/**
|
|
280
|
+
* Auxiliary type to avoid breaking the generic chain given that `DynamicProps`
|
|
281
|
+
* in the SDK is not generic. This prevents us from doing double casting and
|
|
282
|
+
* destroying type information (i.e. `as unknown as T`).
|
|
283
|
+
*/
|
|
284
|
+
declare interface DynamicProps<T extends ConfigurableProps = ConfigurableProps> extends Omit<DynamicProps_2, "configurableProps"> {
|
|
285
|
+
configurableProps?: T;
|
|
286
|
+
}
|
|
272
287
|
|
|
273
|
-
export declare class ErrorBoundary extends
|
|
288
|
+
export declare class ErrorBoundary extends Component_2<Props_2> {
|
|
274
289
|
state: {
|
|
275
290
|
err: undefined;
|
|
276
291
|
};
|
|
@@ -295,19 +310,19 @@ declare type FieldInternalProps<T extends ConfigurableProp> = {
|
|
|
295
310
|
};
|
|
296
311
|
|
|
297
312
|
declare type FieldProps<T extends ConfigurableProp> = {
|
|
298
|
-
form: FormContext
|
|
313
|
+
form: FormContext<T[]>;
|
|
299
314
|
field: FormFieldContext<T>;
|
|
300
315
|
};
|
|
301
316
|
|
|
302
317
|
export declare type FormContext<T extends ConfigurableProps> = {
|
|
303
|
-
component:
|
|
318
|
+
component: Component;
|
|
304
319
|
configurableProps: T;
|
|
305
320
|
configuredProps: ConfiguredProps<T>;
|
|
306
321
|
dynamicProps?: DynamicProps<T>;
|
|
307
322
|
dynamicPropsQueryIsFetching?: boolean;
|
|
308
323
|
errors: Record<string, string[]>;
|
|
309
324
|
sdkErrors: SdkError[];
|
|
310
|
-
fields: Record<string,
|
|
325
|
+
fields: Record<string, AnyFormFieldContext>;
|
|
311
326
|
id: string;
|
|
312
327
|
isValid: boolean;
|
|
313
328
|
optionalPropIsEnabled: (prop: ConfigurableProp) => boolean;
|
|
@@ -350,14 +365,14 @@ export declare type FormFieldContext<T extends ConfigurableProp> = {
|
|
|
350
365
|
export declare const FormFieldContext: Context<FormFieldContext<any> | undefined>;
|
|
351
366
|
|
|
352
367
|
export declare type FormFieldContextExtra<T extends ConfigurableProp> = T extends ConfigurablePropApp ? {
|
|
353
|
-
app?:
|
|
354
|
-
} :
|
|
368
|
+
app?: App;
|
|
369
|
+
} : object;
|
|
355
370
|
|
|
356
371
|
export declare const FrontendClientProvider: FC<FrontendClientProviderProps>;
|
|
357
372
|
|
|
358
373
|
declare type FrontendClientProviderProps = {
|
|
359
374
|
children: ReactNode;
|
|
360
|
-
client:
|
|
375
|
+
client: PipedreamClient;
|
|
361
376
|
};
|
|
362
377
|
|
|
363
378
|
export declare function getReactSelectTheme(theme: CustomThemeConfig | undefined): Theme_2;
|
|
@@ -368,12 +383,16 @@ export declare function InternalField<T extends ConfigurableProp>({ prop, idx, }
|
|
|
368
383
|
|
|
369
384
|
export declare function Label<T extends ConfigurableProps, U extends ConfigurableProp>(props: LabelProps<T, U>): JSX_2.Element;
|
|
370
385
|
|
|
371
|
-
declare type LabelProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
386
|
+
export declare type LabelProps<T extends ConfigurableProps, U extends ConfigurableProp> = {
|
|
372
387
|
text: string;
|
|
373
388
|
field: FormFieldContext<U>;
|
|
374
389
|
form: FormContext<T>;
|
|
375
390
|
};
|
|
376
391
|
|
|
392
|
+
declare type LabelValueOption<T extends PropOptionValue = PropOptionValue> = Omit<PropOption, "value"> & {
|
|
393
|
+
value?: T;
|
|
394
|
+
};
|
|
395
|
+
|
|
377
396
|
declare const LoadMoreButton: (props: ButtonProps) => JSX_2.Element;
|
|
378
397
|
|
|
379
398
|
export declare function mergeTheme(target: Theme, ...sources: (PartialTheme | undefined)[]): Theme;
|
|
@@ -417,27 +436,27 @@ declare type SdkError = {
|
|
|
417
436
|
export declare function SelectApp({ value, onChange, appsOptions, }: SelectAppProps): JSX_2.Element;
|
|
418
437
|
|
|
419
438
|
declare type SelectAppProps = {
|
|
420
|
-
value?: Partial<
|
|
421
|
-
|
|
439
|
+
value?: Partial<App> & {
|
|
440
|
+
nameSlug: string;
|
|
422
441
|
};
|
|
423
|
-
onChange?: (app?:
|
|
442
|
+
onChange?: (app?: App) => void;
|
|
424
443
|
/**
|
|
425
444
|
* Additional options for fetching apps (sorting, filtering, etc.)
|
|
426
445
|
*/
|
|
427
|
-
appsOptions?: Omit<
|
|
446
|
+
appsOptions?: Omit<AppsListRequest, "q">;
|
|
428
447
|
};
|
|
429
448
|
|
|
430
449
|
export declare function SelectComponent({ app, componentType, value, onChange, }: SelectComponentProps): JSX_2.Element;
|
|
431
450
|
|
|
432
451
|
declare type SelectComponentProps = {
|
|
433
|
-
app?: Partial<
|
|
434
|
-
|
|
452
|
+
app?: Partial<App> & {
|
|
453
|
+
nameSlug: string;
|
|
435
454
|
};
|
|
436
455
|
componentType?: "action" | "trigger";
|
|
437
|
-
value?: Partial<
|
|
456
|
+
value?: Partial<Component> & {
|
|
438
457
|
key: string;
|
|
439
458
|
};
|
|
440
|
-
onChange?: (component?:
|
|
459
|
+
onChange?: (component?: Component) => void;
|
|
441
460
|
};
|
|
442
461
|
|
|
443
462
|
export declare type Shadows = {
|
|
@@ -467,11 +486,17 @@ export declare const unstyledTheme: Theme;
|
|
|
467
486
|
/**
|
|
468
487
|
* Retrieves the list of accounts associated with the project.
|
|
469
488
|
*/
|
|
470
|
-
export declare const useAccounts: (input:
|
|
471
|
-
|
|
489
|
+
export declare const useAccounts: (input: {
|
|
490
|
+
external_user_id?: string;
|
|
491
|
+
app?: string;
|
|
492
|
+
oauth_app_id?: string;
|
|
493
|
+
}, opts?: {
|
|
494
|
+
useQueryOpts?: (Omit<UseQueryOptions<Account[]>, "queryKey" | "queryFn"> & {
|
|
495
|
+
suspense?: boolean;
|
|
496
|
+
});
|
|
472
497
|
}) => {
|
|
473
|
-
accounts:
|
|
474
|
-
data:
|
|
498
|
+
accounts: Account[];
|
|
499
|
+
data: Account[];
|
|
475
500
|
error: Error;
|
|
476
501
|
isError: true;
|
|
477
502
|
isPending: false;
|
|
@@ -493,12 +518,12 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
493
518
|
isPlaceholderData: boolean;
|
|
494
519
|
isRefetching: boolean;
|
|
495
520
|
isStale: boolean;
|
|
496
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
521
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
497
522
|
fetchStatus: FetchStatus;
|
|
498
|
-
promise: Promise<
|
|
523
|
+
promise: Promise<Account[]>;
|
|
499
524
|
} | {
|
|
500
|
-
accounts:
|
|
501
|
-
data:
|
|
525
|
+
accounts: Account[];
|
|
526
|
+
data: Account[];
|
|
502
527
|
error: null;
|
|
503
528
|
isError: false;
|
|
504
529
|
isPending: false;
|
|
@@ -520,11 +545,11 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
520
545
|
isPlaceholderData: boolean;
|
|
521
546
|
isRefetching: boolean;
|
|
522
547
|
isStale: boolean;
|
|
523
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
548
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
524
549
|
fetchStatus: FetchStatus;
|
|
525
|
-
promise: Promise<
|
|
550
|
+
promise: Promise<Account[]>;
|
|
526
551
|
} | {
|
|
527
|
-
accounts:
|
|
552
|
+
accounts: Account[];
|
|
528
553
|
data: undefined;
|
|
529
554
|
error: Error;
|
|
530
555
|
isError: true;
|
|
@@ -547,11 +572,11 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
547
572
|
isPlaceholderData: boolean;
|
|
548
573
|
isRefetching: boolean;
|
|
549
574
|
isStale: boolean;
|
|
550
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
575
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
551
576
|
fetchStatus: FetchStatus;
|
|
552
|
-
promise: Promise<
|
|
577
|
+
promise: Promise<Account[]>;
|
|
553
578
|
} | {
|
|
554
|
-
accounts:
|
|
579
|
+
accounts: Account[];
|
|
555
580
|
data: undefined;
|
|
556
581
|
error: null;
|
|
557
582
|
isError: false;
|
|
@@ -574,11 +599,11 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
574
599
|
isPlaceholderData: boolean;
|
|
575
600
|
isRefetching: boolean;
|
|
576
601
|
isStale: boolean;
|
|
577
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
602
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
578
603
|
fetchStatus: FetchStatus;
|
|
579
|
-
promise: Promise<
|
|
604
|
+
promise: Promise<Account[]>;
|
|
580
605
|
} | {
|
|
581
|
-
accounts:
|
|
606
|
+
accounts: Account[];
|
|
582
607
|
data: undefined;
|
|
583
608
|
error: null;
|
|
584
609
|
isError: false;
|
|
@@ -601,18 +626,20 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
|
|
|
601
626
|
isPlaceholderData: boolean;
|
|
602
627
|
isRefetching: boolean;
|
|
603
628
|
isStale: boolean;
|
|
604
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
629
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<Account[], Error>>;
|
|
605
630
|
fetchStatus: FetchStatus;
|
|
606
|
-
promise: Promise<
|
|
631
|
+
promise: Promise<Account[]>;
|
|
607
632
|
};
|
|
608
633
|
|
|
609
634
|
/**
|
|
610
635
|
* Get details about an app
|
|
611
636
|
*/
|
|
612
637
|
export declare const useApp: (slug: string, opts?: {
|
|
613
|
-
useQueryOpts?: Omit<UseQueryOptions<GetAppResponse>, "queryKey" | "queryFn"
|
|
638
|
+
useQueryOpts?: (Omit<UseQueryOptions<GetAppResponse>, "queryKey" | "queryFn"> & {
|
|
639
|
+
suspense?: boolean;
|
|
640
|
+
});
|
|
614
641
|
}) => {
|
|
615
|
-
app:
|
|
642
|
+
app: App | undefined;
|
|
616
643
|
data: GetAppResponse;
|
|
617
644
|
error: Error;
|
|
618
645
|
isError: true;
|
|
@@ -639,7 +666,7 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
639
666
|
fetchStatus: FetchStatus;
|
|
640
667
|
promise: Promise<GetAppResponse>;
|
|
641
668
|
} | {
|
|
642
|
-
app:
|
|
669
|
+
app: App | undefined;
|
|
643
670
|
data: GetAppResponse;
|
|
644
671
|
error: null;
|
|
645
672
|
isError: false;
|
|
@@ -666,7 +693,7 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
666
693
|
fetchStatus: FetchStatus;
|
|
667
694
|
promise: Promise<GetAppResponse>;
|
|
668
695
|
} | {
|
|
669
|
-
app:
|
|
696
|
+
app: App | undefined;
|
|
670
697
|
data: undefined;
|
|
671
698
|
error: Error;
|
|
672
699
|
isError: true;
|
|
@@ -693,7 +720,7 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
693
720
|
fetchStatus: FetchStatus;
|
|
694
721
|
promise: Promise<GetAppResponse>;
|
|
695
722
|
} | {
|
|
696
|
-
app:
|
|
723
|
+
app: App | undefined;
|
|
697
724
|
data: undefined;
|
|
698
725
|
error: null;
|
|
699
726
|
isError: false;
|
|
@@ -720,7 +747,7 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
720
747
|
fetchStatus: FetchStatus;
|
|
721
748
|
promise: Promise<GetAppResponse>;
|
|
722
749
|
} | {
|
|
723
|
-
app:
|
|
750
|
+
app: App | undefined;
|
|
724
751
|
data: undefined;
|
|
725
752
|
error: null;
|
|
726
753
|
isError: false;
|
|
@@ -751,141 +778,10 @@ export declare const useApp: (slug: string, opts?: {
|
|
|
751
778
|
/**
|
|
752
779
|
* Get list of apps that can be authenticated
|
|
753
780
|
*/
|
|
754
|
-
export declare const useApps: (input?:
|
|
755
|
-
apps:
|
|
756
|
-
data: any;
|
|
757
|
-
error: Error;
|
|
758
|
-
isError: true;
|
|
759
|
-
isPending: false;
|
|
760
|
-
isLoading: false;
|
|
761
|
-
isLoadingError: false;
|
|
762
|
-
isRefetchError: true;
|
|
763
|
-
isSuccess: false;
|
|
764
|
-
status: "error";
|
|
765
|
-
dataUpdatedAt: number;
|
|
766
|
-
errorUpdatedAt: number;
|
|
767
|
-
failureCount: number;
|
|
768
|
-
failureReason: Error | null;
|
|
769
|
-
errorUpdateCount: number;
|
|
770
|
-
isFetched: boolean;
|
|
771
|
-
isFetchedAfterMount: boolean;
|
|
772
|
-
isFetching: boolean;
|
|
773
|
-
isInitialLoading: boolean;
|
|
774
|
-
isPaused: boolean;
|
|
775
|
-
isPlaceholderData: boolean;
|
|
776
|
-
isRefetching: boolean;
|
|
777
|
-
isStale: boolean;
|
|
778
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
779
|
-
fetchStatus: FetchStatus;
|
|
780
|
-
promise: Promise<any>;
|
|
781
|
-
} | {
|
|
782
|
-
apps: any;
|
|
783
|
-
data: any;
|
|
784
|
-
error: null;
|
|
785
|
-
isError: false;
|
|
786
|
-
isPending: false;
|
|
787
|
-
isLoading: false;
|
|
788
|
-
isLoadingError: false;
|
|
789
|
-
isRefetchError: false;
|
|
790
|
-
isSuccess: true;
|
|
791
|
-
status: "success";
|
|
792
|
-
dataUpdatedAt: number;
|
|
793
|
-
errorUpdatedAt: number;
|
|
794
|
-
failureCount: number;
|
|
795
|
-
failureReason: Error | null;
|
|
796
|
-
errorUpdateCount: number;
|
|
797
|
-
isFetched: boolean;
|
|
798
|
-
isFetchedAfterMount: boolean;
|
|
799
|
-
isFetching: boolean;
|
|
800
|
-
isInitialLoading: boolean;
|
|
801
|
-
isPaused: boolean;
|
|
802
|
-
isPlaceholderData: boolean;
|
|
803
|
-
isRefetching: boolean;
|
|
804
|
-
isStale: boolean;
|
|
805
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
806
|
-
fetchStatus: FetchStatus;
|
|
807
|
-
promise: Promise<any>;
|
|
808
|
-
} | {
|
|
809
|
-
apps: any;
|
|
810
|
-
data: undefined;
|
|
811
|
-
error: Error;
|
|
812
|
-
isError: true;
|
|
813
|
-
isPending: false;
|
|
814
|
-
isLoading: false;
|
|
815
|
-
isLoadingError: true;
|
|
816
|
-
isRefetchError: false;
|
|
817
|
-
isSuccess: false;
|
|
818
|
-
status: "error";
|
|
819
|
-
dataUpdatedAt: number;
|
|
820
|
-
errorUpdatedAt: number;
|
|
821
|
-
failureCount: number;
|
|
822
|
-
failureReason: Error | null;
|
|
823
|
-
errorUpdateCount: number;
|
|
824
|
-
isFetched: boolean;
|
|
825
|
-
isFetchedAfterMount: boolean;
|
|
826
|
-
isFetching: boolean;
|
|
827
|
-
isInitialLoading: boolean;
|
|
828
|
-
isPaused: boolean;
|
|
829
|
-
isPlaceholderData: boolean;
|
|
830
|
-
isRefetching: boolean;
|
|
831
|
-
isStale: boolean;
|
|
832
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
833
|
-
fetchStatus: FetchStatus;
|
|
834
|
-
promise: Promise<any>;
|
|
835
|
-
} | {
|
|
836
|
-
apps: any;
|
|
837
|
-
data: undefined;
|
|
838
|
-
error: null;
|
|
839
|
-
isError: false;
|
|
840
|
-
isPending: true;
|
|
841
|
-
isLoading: true;
|
|
842
|
-
isLoadingError: false;
|
|
843
|
-
isRefetchError: false;
|
|
844
|
-
isSuccess: false;
|
|
845
|
-
status: "pending";
|
|
846
|
-
dataUpdatedAt: number;
|
|
847
|
-
errorUpdatedAt: number;
|
|
848
|
-
failureCount: number;
|
|
849
|
-
failureReason: Error | null;
|
|
850
|
-
errorUpdateCount: number;
|
|
851
|
-
isFetched: boolean;
|
|
852
|
-
isFetchedAfterMount: boolean;
|
|
853
|
-
isFetching: boolean;
|
|
854
|
-
isInitialLoading: boolean;
|
|
855
|
-
isPaused: boolean;
|
|
856
|
-
isPlaceholderData: boolean;
|
|
857
|
-
isRefetching: boolean;
|
|
858
|
-
isStale: boolean;
|
|
859
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
860
|
-
fetchStatus: FetchStatus;
|
|
861
|
-
promise: Promise<any>;
|
|
862
|
-
} | {
|
|
863
|
-
apps: any;
|
|
864
|
-
data: undefined;
|
|
865
|
-
error: null;
|
|
866
|
-
isError: false;
|
|
867
|
-
isPending: true;
|
|
868
|
-
isLoadingError: false;
|
|
869
|
-
isRefetchError: false;
|
|
870
|
-
isSuccess: false;
|
|
871
|
-
status: "pending";
|
|
872
|
-
dataUpdatedAt: number;
|
|
873
|
-
errorUpdatedAt: number;
|
|
874
|
-
failureCount: number;
|
|
875
|
-
failureReason: Error | null;
|
|
876
|
-
errorUpdateCount: number;
|
|
877
|
-
isFetched: boolean;
|
|
878
|
-
isFetchedAfterMount: boolean;
|
|
879
|
-
isFetching: boolean;
|
|
781
|
+
export declare const useApps: (input?: AppsListRequest) => {
|
|
782
|
+
apps: App[];
|
|
880
783
|
isLoading: boolean;
|
|
881
|
-
|
|
882
|
-
isPaused: boolean;
|
|
883
|
-
isPlaceholderData: boolean;
|
|
884
|
-
isRefetching: boolean;
|
|
885
|
-
isStale: boolean;
|
|
886
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
887
|
-
fetchStatus: FetchStatus;
|
|
888
|
-
promise: Promise<any>;
|
|
784
|
+
error: Error | null;
|
|
889
785
|
};
|
|
890
786
|
|
|
891
787
|
/**
|
|
@@ -894,10 +790,10 @@ export declare const useApps: (input?: GetAppsOpts) => {
|
|
|
894
790
|
export declare const useComponent: ({ key }: {
|
|
895
791
|
key?: string;
|
|
896
792
|
}, opts?: {
|
|
897
|
-
useQueryOpts?: Omit<UseQueryOptions<
|
|
793
|
+
useQueryOpts?: Omit<UseQueryOptions<GetComponentResponse>, "queryKey" | "queryFn">;
|
|
898
794
|
}) => {
|
|
899
|
-
component:
|
|
900
|
-
data:
|
|
795
|
+
component: Component | undefined;
|
|
796
|
+
data: GetComponentResponse;
|
|
901
797
|
error: Error;
|
|
902
798
|
isError: true;
|
|
903
799
|
isPending: false;
|
|
@@ -919,12 +815,12 @@ export declare const useComponent: ({ key }: {
|
|
|
919
815
|
isPlaceholderData: boolean;
|
|
920
816
|
isRefetching: boolean;
|
|
921
817
|
isStale: boolean;
|
|
922
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
818
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentResponse, Error>>;
|
|
923
819
|
fetchStatus: FetchStatus;
|
|
924
|
-
promise: Promise<
|
|
820
|
+
promise: Promise<GetComponentResponse>;
|
|
925
821
|
} | {
|
|
926
|
-
component:
|
|
927
|
-
data:
|
|
822
|
+
component: Component | undefined;
|
|
823
|
+
data: GetComponentResponse;
|
|
928
824
|
error: null;
|
|
929
825
|
isError: false;
|
|
930
826
|
isPending: false;
|
|
@@ -946,11 +842,11 @@ export declare const useComponent: ({ key }: {
|
|
|
946
842
|
isPlaceholderData: boolean;
|
|
947
843
|
isRefetching: boolean;
|
|
948
844
|
isStale: boolean;
|
|
949
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
845
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentResponse, Error>>;
|
|
950
846
|
fetchStatus: FetchStatus;
|
|
951
|
-
promise: Promise<
|
|
847
|
+
promise: Promise<GetComponentResponse>;
|
|
952
848
|
} | {
|
|
953
|
-
component:
|
|
849
|
+
component: Component | undefined;
|
|
954
850
|
data: undefined;
|
|
955
851
|
error: Error;
|
|
956
852
|
isError: true;
|
|
@@ -973,11 +869,11 @@ export declare const useComponent: ({ key }: {
|
|
|
973
869
|
isPlaceholderData: boolean;
|
|
974
870
|
isRefetching: boolean;
|
|
975
871
|
isStale: boolean;
|
|
976
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
872
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentResponse, Error>>;
|
|
977
873
|
fetchStatus: FetchStatus;
|
|
978
|
-
promise: Promise<
|
|
874
|
+
promise: Promise<GetComponentResponse>;
|
|
979
875
|
} | {
|
|
980
|
-
component:
|
|
876
|
+
component: Component | undefined;
|
|
981
877
|
data: undefined;
|
|
982
878
|
error: null;
|
|
983
879
|
isError: false;
|
|
@@ -1000,11 +896,11 @@ export declare const useComponent: ({ key }: {
|
|
|
1000
896
|
isPlaceholderData: boolean;
|
|
1001
897
|
isRefetching: boolean;
|
|
1002
898
|
isStale: boolean;
|
|
1003
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
899
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentResponse, Error>>;
|
|
1004
900
|
fetchStatus: FetchStatus;
|
|
1005
|
-
promise: Promise<
|
|
901
|
+
promise: Promise<GetComponentResponse>;
|
|
1006
902
|
} | {
|
|
1007
|
-
component:
|
|
903
|
+
component: Component | undefined;
|
|
1008
904
|
data: undefined;
|
|
1009
905
|
error: null;
|
|
1010
906
|
isError: false;
|
|
@@ -1027,149 +923,18 @@ export declare const useComponent: ({ key }: {
|
|
|
1027
923
|
isPlaceholderData: boolean;
|
|
1028
924
|
isRefetching: boolean;
|
|
1029
925
|
isStale: boolean;
|
|
1030
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<
|
|
926
|
+
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<GetComponentResponse, Error>>;
|
|
1031
927
|
fetchStatus: FetchStatus;
|
|
1032
|
-
promise: Promise<
|
|
928
|
+
promise: Promise<GetComponentResponse>;
|
|
1033
929
|
};
|
|
1034
930
|
|
|
1035
931
|
/**
|
|
1036
932
|
* Get list of components
|
|
1037
933
|
*/
|
|
1038
|
-
export declare const useComponents: (input?:
|
|
1039
|
-
components:
|
|
1040
|
-
data: any;
|
|
1041
|
-
error: Error;
|
|
1042
|
-
isError: true;
|
|
1043
|
-
isPending: false;
|
|
1044
|
-
isLoading: false;
|
|
1045
|
-
isLoadingError: false;
|
|
1046
|
-
isRefetchError: true;
|
|
1047
|
-
isSuccess: false;
|
|
1048
|
-
status: "error";
|
|
1049
|
-
dataUpdatedAt: number;
|
|
1050
|
-
errorUpdatedAt: number;
|
|
1051
|
-
failureCount: number;
|
|
1052
|
-
failureReason: Error | null;
|
|
1053
|
-
errorUpdateCount: number;
|
|
1054
|
-
isFetched: boolean;
|
|
1055
|
-
isFetchedAfterMount: boolean;
|
|
1056
|
-
isFetching: boolean;
|
|
1057
|
-
isInitialLoading: boolean;
|
|
1058
|
-
isPaused: boolean;
|
|
1059
|
-
isPlaceholderData: boolean;
|
|
1060
|
-
isRefetching: boolean;
|
|
1061
|
-
isStale: boolean;
|
|
1062
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
1063
|
-
fetchStatus: FetchStatus;
|
|
1064
|
-
promise: Promise<any>;
|
|
1065
|
-
} | {
|
|
1066
|
-
components: any;
|
|
1067
|
-
data: any;
|
|
1068
|
-
error: null;
|
|
1069
|
-
isError: false;
|
|
1070
|
-
isPending: false;
|
|
1071
|
-
isLoading: false;
|
|
1072
|
-
isLoadingError: false;
|
|
1073
|
-
isRefetchError: false;
|
|
1074
|
-
isSuccess: true;
|
|
1075
|
-
status: "success";
|
|
1076
|
-
dataUpdatedAt: number;
|
|
1077
|
-
errorUpdatedAt: number;
|
|
1078
|
-
failureCount: number;
|
|
1079
|
-
failureReason: Error | null;
|
|
1080
|
-
errorUpdateCount: number;
|
|
1081
|
-
isFetched: boolean;
|
|
1082
|
-
isFetchedAfterMount: boolean;
|
|
1083
|
-
isFetching: boolean;
|
|
1084
|
-
isInitialLoading: boolean;
|
|
1085
|
-
isPaused: boolean;
|
|
1086
|
-
isPlaceholderData: boolean;
|
|
1087
|
-
isRefetching: boolean;
|
|
1088
|
-
isStale: boolean;
|
|
1089
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
1090
|
-
fetchStatus: FetchStatus;
|
|
1091
|
-
promise: Promise<any>;
|
|
1092
|
-
} | {
|
|
1093
|
-
components: any;
|
|
1094
|
-
data: undefined;
|
|
1095
|
-
error: Error;
|
|
1096
|
-
isError: true;
|
|
1097
|
-
isPending: false;
|
|
1098
|
-
isLoading: false;
|
|
1099
|
-
isLoadingError: true;
|
|
1100
|
-
isRefetchError: false;
|
|
1101
|
-
isSuccess: false;
|
|
1102
|
-
status: "error";
|
|
1103
|
-
dataUpdatedAt: number;
|
|
1104
|
-
errorUpdatedAt: number;
|
|
1105
|
-
failureCount: number;
|
|
1106
|
-
failureReason: Error | null;
|
|
1107
|
-
errorUpdateCount: number;
|
|
1108
|
-
isFetched: boolean;
|
|
1109
|
-
isFetchedAfterMount: boolean;
|
|
1110
|
-
isFetching: boolean;
|
|
1111
|
-
isInitialLoading: boolean;
|
|
1112
|
-
isPaused: boolean;
|
|
1113
|
-
isPlaceholderData: boolean;
|
|
1114
|
-
isRefetching: boolean;
|
|
1115
|
-
isStale: boolean;
|
|
1116
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
1117
|
-
fetchStatus: FetchStatus;
|
|
1118
|
-
promise: Promise<any>;
|
|
1119
|
-
} | {
|
|
1120
|
-
components: any;
|
|
1121
|
-
data: undefined;
|
|
1122
|
-
error: null;
|
|
1123
|
-
isError: false;
|
|
1124
|
-
isPending: true;
|
|
1125
|
-
isLoading: true;
|
|
1126
|
-
isLoadingError: false;
|
|
1127
|
-
isRefetchError: false;
|
|
1128
|
-
isSuccess: false;
|
|
1129
|
-
status: "pending";
|
|
1130
|
-
dataUpdatedAt: number;
|
|
1131
|
-
errorUpdatedAt: number;
|
|
1132
|
-
failureCount: number;
|
|
1133
|
-
failureReason: Error | null;
|
|
1134
|
-
errorUpdateCount: number;
|
|
1135
|
-
isFetched: boolean;
|
|
1136
|
-
isFetchedAfterMount: boolean;
|
|
1137
|
-
isFetching: boolean;
|
|
1138
|
-
isInitialLoading: boolean;
|
|
1139
|
-
isPaused: boolean;
|
|
1140
|
-
isPlaceholderData: boolean;
|
|
1141
|
-
isRefetching: boolean;
|
|
1142
|
-
isStale: boolean;
|
|
1143
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
1144
|
-
fetchStatus: FetchStatus;
|
|
1145
|
-
promise: Promise<any>;
|
|
1146
|
-
} | {
|
|
1147
|
-
components: any;
|
|
1148
|
-
data: undefined;
|
|
1149
|
-
error: null;
|
|
1150
|
-
isError: false;
|
|
1151
|
-
isPending: true;
|
|
1152
|
-
isLoadingError: false;
|
|
1153
|
-
isRefetchError: false;
|
|
1154
|
-
isSuccess: false;
|
|
1155
|
-
status: "pending";
|
|
1156
|
-
dataUpdatedAt: number;
|
|
1157
|
-
errorUpdatedAt: number;
|
|
1158
|
-
failureCount: number;
|
|
1159
|
-
failureReason: Error | null;
|
|
1160
|
-
errorUpdateCount: number;
|
|
1161
|
-
isFetched: boolean;
|
|
1162
|
-
isFetchedAfterMount: boolean;
|
|
1163
|
-
isFetching: boolean;
|
|
934
|
+
export declare const useComponents: (input?: ComponentsListRequest) => {
|
|
935
|
+
components: Component[];
|
|
1164
936
|
isLoading: boolean;
|
|
1165
|
-
|
|
1166
|
-
isPaused: boolean;
|
|
1167
|
-
isPlaceholderData: boolean;
|
|
1168
|
-
isRefetching: boolean;
|
|
1169
|
-
isStale: boolean;
|
|
1170
|
-
refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
1171
|
-
fetchStatus: FetchStatus;
|
|
1172
|
-
promise: Promise<any>;
|
|
937
|
+
error: Error | null;
|
|
1173
938
|
};
|
|
1174
939
|
|
|
1175
940
|
export declare function useCustomize(): Customization;
|
|
@@ -1178,6 +943,6 @@ export declare const useFormContext: () => FormContext<any>;
|
|
|
1178
943
|
|
|
1179
944
|
export declare const useFormFieldContext: <T extends ConfigurableProp>() => FormFieldContext<T>;
|
|
1180
945
|
|
|
1181
|
-
export declare const useFrontendClient: () =>
|
|
946
|
+
export declare const useFrontendClient: () => PipedreamClient;
|
|
1182
947
|
|
|
1183
948
|
export { }
|