@pipedream/connect-react 1.0.0-preview.7 → 1.0.0-preview.9

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.
@@ -1,15 +1,11 @@
1
- import { Account } from '@pipedream/sdk';
2
1
  import { AccountsRequestResponse } from '@pipedream/sdk';
3
2
  import { AppRequestResponse } from '@pipedream/sdk';
4
3
  import { AppResponse } from '@pipedream/sdk';
5
- import { AppResponse as AppResponse_2 } from '@pipedream/sdk/browser';
6
- import { AppsRequestResponse } from '@pipedream/sdk/browser';
7
4
  import { BrowserClient } from '@pipedream/sdk/browser';
8
5
  import { ClassNamesConfig } from 'react-select';
9
6
  import { Component } from 'react';
10
7
  import { ComponentProps } from 'react';
11
8
  import { ComponentRequestResponse } from '@pipedream/sdk';
12
- import { ComponentsRequestResponse } from '@pipedream/sdk/browser';
13
9
  import { ConfigurableProp } from '@pipedream/sdk';
14
10
  import { ConfigurablePropAlert } from '@pipedream/sdk';
15
11
  import { ConfigurablePropApp } from '@pipedream/sdk';
@@ -18,7 +14,7 @@ import { ConfiguredProps } from '@pipedream/sdk';
18
14
  import { Context } from 'react';
19
15
  import { CSSProperties } from 'react';
20
16
  import { FC } from 'react';
21
- import { FetchStatus } from '@tanstack/react-query';
17
+ import { FetchStatus } from '@tanstack/query-core';
22
18
  import { GetAccountOpts } from '@pipedream/sdk';
23
19
  import { GetAppsOpts } from '@pipedream/sdk';
24
20
  import { GetComponentOpts } from '@pipedream/sdk';
@@ -27,15 +23,14 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
27
23
  import { JSXElementConstructor } from 'react';
28
24
  import { Props } from 'react-select';
29
25
  import { PropValue } from '@pipedream/sdk';
30
- import { QueryObserverResult } from '@tanstack/react-query';
26
+ import { QueryObserverResult } from '@tanstack/query-core';
31
27
  import { ReactNode } from 'react';
32
- import { RefetchOptions } from '@tanstack/react-query';
28
+ import { RefetchOptions } from '@tanstack/query-core';
33
29
  import { SelectComponentsConfig } from 'react-select';
34
30
  import { StylesConfig } from 'react-select';
35
31
  import { Theme as Theme_2 } from 'react-select';
36
32
  import { UseQueryOptions } from '@tanstack/react-query';
37
33
  import { V1Component } from '@pipedream/sdk';
38
- import { V1Component as V1Component_2 } from '@pipedream/sdk/browser';
39
34
 
40
35
  export declare function Alert({ prop }: AlertProps): JSX_2.Element;
41
36
 
@@ -43,6 +38,11 @@ declare type AlertProps = {
43
38
  prop: ConfigurablePropAlert;
44
39
  };
45
40
 
41
+ export declare function appPropError(opts: {
42
+ value: any;
43
+ app: AppResponse | undefined;
44
+ }): string | undefined;
45
+
46
46
  export declare type BaseReactSelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = {
47
47
  components?: SelectComponentsConfig<Option, IsMulti, Group>;
48
48
  styles?: StylesConfig;
@@ -228,7 +228,7 @@ declare type DescriptionProps<T extends ConfigurableProps, U extends Configurabl
228
228
 
229
229
  export declare type DynamicProps<T extends ConfigurableProps> = {
230
230
  id: string;
231
- configurable_props: T;
231
+ configurableProps: T;
232
232
  };
233
233
 
234
234
  export declare class ErrorBoundary extends Component<Props_2> {
@@ -267,12 +267,15 @@ export declare type FormContext<T extends ConfigurableProps> = {
267
267
  configuredProps: ConfiguredProps<T>;
268
268
  dynamicProps?: DynamicProps<T>;
269
269
  dynamicPropsQueryIsFetching?: boolean;
270
+ fields: Record<string, FormFieldContext<ConfigurableProp>>;
270
271
  id: string;
271
272
  isValid: boolean;
272
273
  optionalPropIsEnabled: (prop: ConfigurableProp) => boolean;
273
274
  optionalPropSetEnabled: (prop: ConfigurableProp, enabled: boolean) => void;
274
275
  props: ComponentFormProps<T>;
276
+ propsNeedConfiguring: string[];
275
277
  queryDisabledIdx?: number;
278
+ registerField: <T extends ConfigurableProp>(field: FormFieldContext<T>) => void;
276
279
  setConfiguredProp: (idx: number, value: unknown) => void;
277
280
  setSubmitting: (submitting: boolean) => void;
278
281
  submitting: boolean;
@@ -408,7 +411,7 @@ export declare const unstyledTheme: Theme;
408
411
  export declare const useAccounts: (input: GetAccountOpts, opts?: {
409
412
  useQueryOpts?: Omit<UseQueryOptions<AccountsRequestResponse>, "queryKey" | "queryFn">;
410
413
  }) => {
411
- accounts: Account[];
414
+ accounts: any;
412
415
  data: AccountsRequestResponse;
413
416
  error: Error;
414
417
  isError: true;
@@ -435,7 +438,7 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
435
438
  fetchStatus: FetchStatus;
436
439
  promise: Promise<AccountsRequestResponse>;
437
440
  } | {
438
- accounts: Account[];
441
+ accounts: any;
439
442
  data: AccountsRequestResponse;
440
443
  error: null;
441
444
  isError: false;
@@ -462,7 +465,7 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
462
465
  fetchStatus: FetchStatus;
463
466
  promise: Promise<AccountsRequestResponse>;
464
467
  } | {
465
- accounts: Account[];
468
+ accounts: any;
466
469
  data: undefined;
467
470
  error: Error;
468
471
  isError: true;
@@ -489,7 +492,7 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
489
492
  fetchStatus: FetchStatus;
490
493
  promise: Promise<AccountsRequestResponse>;
491
494
  } | {
492
- accounts: Account[];
495
+ accounts: any;
493
496
  data: undefined;
494
497
  error: null;
495
498
  isError: false;
@@ -516,7 +519,7 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
516
519
  fetchStatus: FetchStatus;
517
520
  promise: Promise<AccountsRequestResponse>;
518
521
  } | {
519
- accounts: Account[];
522
+ accounts: any;
520
523
  data: undefined;
521
524
  error: null;
522
525
  isError: false;
@@ -550,7 +553,7 @@ export declare const useAccounts: (input: GetAccountOpts, opts?: {
550
553
  export declare const useApp: (slug: string, opts?: {
551
554
  useQueryOpts?: Omit<UseQueryOptions<AppRequestResponse>, "queryKey" | "queryFn">;
552
555
  }) => {
553
- app: AppResponse | undefined;
556
+ app: any;
554
557
  data: AppRequestResponse;
555
558
  error: Error;
556
559
  isError: true;
@@ -577,7 +580,7 @@ export declare const useApp: (slug: string, opts?: {
577
580
  fetchStatus: FetchStatus;
578
581
  promise: Promise<AppRequestResponse>;
579
582
  } | {
580
- app: AppResponse | undefined;
583
+ app: any;
581
584
  data: AppRequestResponse;
582
585
  error: null;
583
586
  isError: false;
@@ -604,7 +607,7 @@ export declare const useApp: (slug: string, opts?: {
604
607
  fetchStatus: FetchStatus;
605
608
  promise: Promise<AppRequestResponse>;
606
609
  } | {
607
- app: AppResponse | undefined;
610
+ app: any;
608
611
  data: undefined;
609
612
  error: Error;
610
613
  isError: true;
@@ -631,7 +634,7 @@ export declare const useApp: (slug: string, opts?: {
631
634
  fetchStatus: FetchStatus;
632
635
  promise: Promise<AppRequestResponse>;
633
636
  } | {
634
- app: AppResponse | undefined;
637
+ app: any;
635
638
  data: undefined;
636
639
  error: null;
637
640
  isError: false;
@@ -658,7 +661,7 @@ export declare const useApp: (slug: string, opts?: {
658
661
  fetchStatus: FetchStatus;
659
662
  promise: Promise<AppRequestResponse>;
660
663
  } | {
661
- app: AppResponse | undefined;
664
+ app: any;
662
665
  data: undefined;
663
666
  error: null;
664
667
  isError: false;
@@ -690,8 +693,8 @@ export declare const useApp: (slug: string, opts?: {
690
693
  * Get list of apps that can be authenticated
691
694
  */
692
695
  export declare const useApps: (input?: GetAppsOpts) => {
693
- apps: AppResponse_2[] | undefined;
694
- data: AppsRequestResponse;
696
+ apps: any;
697
+ data: any;
695
698
  error: Error;
696
699
  isError: true;
697
700
  isPending: false;
@@ -713,12 +716,12 @@ export declare const useApps: (input?: GetAppsOpts) => {
713
716
  isPlaceholderData: boolean;
714
717
  isRefetching: boolean;
715
718
  isStale: boolean;
716
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppsRequestResponse, Error>>;
719
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
717
720
  fetchStatus: FetchStatus;
718
- promise: Promise<AppsRequestResponse>;
721
+ promise: Promise<any>;
719
722
  } | {
720
- apps: AppResponse_2[] | undefined;
721
- data: AppsRequestResponse;
723
+ apps: any;
724
+ data: any;
722
725
  error: null;
723
726
  isError: false;
724
727
  isPending: false;
@@ -740,11 +743,11 @@ export declare const useApps: (input?: GetAppsOpts) => {
740
743
  isPlaceholderData: boolean;
741
744
  isRefetching: boolean;
742
745
  isStale: boolean;
743
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppsRequestResponse, Error>>;
746
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
744
747
  fetchStatus: FetchStatus;
745
- promise: Promise<AppsRequestResponse>;
748
+ promise: Promise<any>;
746
749
  } | {
747
- apps: AppResponse_2[] | undefined;
750
+ apps: any;
748
751
  data: undefined;
749
752
  error: Error;
750
753
  isError: true;
@@ -767,11 +770,11 @@ export declare const useApps: (input?: GetAppsOpts) => {
767
770
  isPlaceholderData: boolean;
768
771
  isRefetching: boolean;
769
772
  isStale: boolean;
770
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppsRequestResponse, Error>>;
773
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
771
774
  fetchStatus: FetchStatus;
772
- promise: Promise<AppsRequestResponse>;
775
+ promise: Promise<any>;
773
776
  } | {
774
- apps: AppResponse_2[] | undefined;
777
+ apps: any;
775
778
  data: undefined;
776
779
  error: null;
777
780
  isError: false;
@@ -794,11 +797,11 @@ export declare const useApps: (input?: GetAppsOpts) => {
794
797
  isPlaceholderData: boolean;
795
798
  isRefetching: boolean;
796
799
  isStale: boolean;
797
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppsRequestResponse, Error>>;
800
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
798
801
  fetchStatus: FetchStatus;
799
- promise: Promise<AppsRequestResponse>;
802
+ promise: Promise<any>;
800
803
  } | {
801
- apps: AppResponse_2[] | undefined;
804
+ apps: any;
802
805
  data: undefined;
803
806
  error: null;
804
807
  isError: false;
@@ -821,9 +824,9 @@ export declare const useApps: (input?: GetAppsOpts) => {
821
824
  isPlaceholderData: boolean;
822
825
  isRefetching: boolean;
823
826
  isStale: boolean;
824
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<AppsRequestResponse, Error>>;
827
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
825
828
  fetchStatus: FetchStatus;
826
- promise: Promise<AppsRequestResponse>;
829
+ promise: Promise<any>;
827
830
  };
828
831
 
829
832
  /**
@@ -834,7 +837,7 @@ export declare const useComponent: ({ key }: {
834
837
  }, opts?: {
835
838
  useQueryOpts?: Omit<UseQueryOptions<ComponentRequestResponse>, "queryKey" | "queryFn">;
836
839
  }) => {
837
- component: V1Component | undefined;
840
+ component: any;
838
841
  data: ComponentRequestResponse;
839
842
  error: Error;
840
843
  isError: true;
@@ -861,7 +864,7 @@ export declare const useComponent: ({ key }: {
861
864
  fetchStatus: FetchStatus;
862
865
  promise: Promise<ComponentRequestResponse>;
863
866
  } | {
864
- component: V1Component | undefined;
867
+ component: any;
865
868
  data: ComponentRequestResponse;
866
869
  error: null;
867
870
  isError: false;
@@ -888,7 +891,7 @@ export declare const useComponent: ({ key }: {
888
891
  fetchStatus: FetchStatus;
889
892
  promise: Promise<ComponentRequestResponse>;
890
893
  } | {
891
- component: V1Component | undefined;
894
+ component: any;
892
895
  data: undefined;
893
896
  error: Error;
894
897
  isError: true;
@@ -915,7 +918,7 @@ export declare const useComponent: ({ key }: {
915
918
  fetchStatus: FetchStatus;
916
919
  promise: Promise<ComponentRequestResponse>;
917
920
  } | {
918
- component: V1Component | undefined;
921
+ component: any;
919
922
  data: undefined;
920
923
  error: null;
921
924
  isError: false;
@@ -942,7 +945,7 @@ export declare const useComponent: ({ key }: {
942
945
  fetchStatus: FetchStatus;
943
946
  promise: Promise<ComponentRequestResponse>;
944
947
  } | {
945
- component: V1Component | undefined;
948
+ component: any;
946
949
  data: undefined;
947
950
  error: null;
948
951
  isError: false;
@@ -974,8 +977,8 @@ export declare const useComponent: ({ key }: {
974
977
  * Get list of components
975
978
  */
976
979
  export declare const useComponents: (input?: GetComponentOpts) => {
977
- components: Omit<V1Component_2, "configurable_props">[];
978
- data: ComponentsRequestResponse;
980
+ components: any;
981
+ data: any;
979
982
  error: Error;
980
983
  isError: true;
981
984
  isPending: false;
@@ -997,12 +1000,12 @@ export declare const useComponents: (input?: GetComponentOpts) => {
997
1000
  isPlaceholderData: boolean;
998
1001
  isRefetching: boolean;
999
1002
  isStale: boolean;
1000
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<ComponentsRequestResponse, Error>>;
1003
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
1001
1004
  fetchStatus: FetchStatus;
1002
- promise: Promise<ComponentsRequestResponse>;
1005
+ promise: Promise<any>;
1003
1006
  } | {
1004
- components: Omit<V1Component_2, "configurable_props">[];
1005
- data: ComponentsRequestResponse;
1007
+ components: any;
1008
+ data: any;
1006
1009
  error: null;
1007
1010
  isError: false;
1008
1011
  isPending: false;
@@ -1024,11 +1027,11 @@ export declare const useComponents: (input?: GetComponentOpts) => {
1024
1027
  isPlaceholderData: boolean;
1025
1028
  isRefetching: boolean;
1026
1029
  isStale: boolean;
1027
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<ComponentsRequestResponse, Error>>;
1030
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
1028
1031
  fetchStatus: FetchStatus;
1029
- promise: Promise<ComponentsRequestResponse>;
1032
+ promise: Promise<any>;
1030
1033
  } | {
1031
- components: Omit<V1Component_2, "configurable_props">[];
1034
+ components: any;
1032
1035
  data: undefined;
1033
1036
  error: Error;
1034
1037
  isError: true;
@@ -1051,11 +1054,11 @@ export declare const useComponents: (input?: GetComponentOpts) => {
1051
1054
  isPlaceholderData: boolean;
1052
1055
  isRefetching: boolean;
1053
1056
  isStale: boolean;
1054
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<ComponentsRequestResponse, Error>>;
1057
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
1055
1058
  fetchStatus: FetchStatus;
1056
- promise: Promise<ComponentsRequestResponse>;
1059
+ promise: Promise<any>;
1057
1060
  } | {
1058
- components: Omit<V1Component_2, "configurable_props">[];
1061
+ components: any;
1059
1062
  data: undefined;
1060
1063
  error: null;
1061
1064
  isError: false;
@@ -1078,11 +1081,11 @@ export declare const useComponents: (input?: GetComponentOpts) => {
1078
1081
  isPlaceholderData: boolean;
1079
1082
  isRefetching: boolean;
1080
1083
  isStale: boolean;
1081
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<ComponentsRequestResponse, Error>>;
1084
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
1082
1085
  fetchStatus: FetchStatus;
1083
- promise: Promise<ComponentsRequestResponse>;
1086
+ promise: Promise<any>;
1084
1087
  } | {
1085
- components: Omit<V1Component_2, "configurable_props">[];
1088
+ components: any;
1086
1089
  data: undefined;
1087
1090
  error: null;
1088
1091
  isError: false;
@@ -1105,9 +1108,9 @@ export declare const useComponents: (input?: GetComponentOpts) => {
1105
1108
  isPlaceholderData: boolean;
1106
1109
  isRefetching: boolean;
1107
1110
  isStale: boolean;
1108
- refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<ComponentsRequestResponse, Error>>;
1111
+ refetch: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
1109
1112
  fetchStatus: FetchStatus;
1110
- promise: Promise<ComponentsRequestResponse>;
1113
+ promise: Promise<any>;
1111
1114
  };
1112
1115
 
1113
1116
  export declare function useCustomize(): Customization;
@@ -1116,6 +1119,6 @@ export declare const useFormContext: () => FormContext<any>;
1116
1119
 
1117
1120
  export declare const useFormFieldContext: <T extends ConfigurableProp>() => FormFieldContext<T>;
1118
1121
 
1119
- export declare const useFrontendClient: () => BrowserClient;
1122
+ export declare const useFrontendClient: () => any;
1120
1123
 
1121
1124
  export { }