nango 0.22.38-beta → 0.22.39-beta

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,5 +1,31 @@
1
- import type { ParamsSerializerOptions } from 'axios';
2
1
  type LogLevel = 'info' | 'debug' | 'error' | 'warn' | 'http' | 'verbose' | 'silly';
2
+ interface ParamEncoder {
3
+ (value: any, defaultEncoder: (value: any) => any): any;
4
+ }
5
+ interface GenericFormData {
6
+ append(name: string, value: any, options?: any): any;
7
+ }
8
+ interface SerializerVisitor {
9
+ (this: GenericFormData, value: any, key: string | number, path: null | Array<string | number>, helpers: FormDataVisitorHelpers): boolean;
10
+ }
11
+ interface CustomParamsSerializer {
12
+ (params: Record<string, any>, options?: ParamsSerializerOptions): string;
13
+ }
14
+ interface FormDataVisitorHelpers {
15
+ defaultVisitor: SerializerVisitor;
16
+ convertValue: (value: any) => any;
17
+ isVisitable: (value: any) => boolean;
18
+ }
19
+ interface SerializerOptions {
20
+ visitor?: SerializerVisitor;
21
+ dots?: boolean;
22
+ metaTokens?: boolean;
23
+ indexes?: boolean | null;
24
+ }
25
+ interface ParamsSerializerOptions extends SerializerOptions {
26
+ encode?: ParamEncoder;
27
+ serialize?: CustomParamsSerializer;
28
+ }
3
29
  interface ProxyConfiguration {
4
30
  endpoint: string;
5
31
  providerConfigKey?: string;
@@ -12,6 +38,22 @@ interface ProxyConfiguration {
12
38
  retries?: number;
13
39
  baseUrlOverride?: string;
14
40
  }
41
+ interface Connection {
42
+ id: number;
43
+ connectionId: string;
44
+ provider: string;
45
+ providerConfigKey: number;
46
+ creationDate: string;
47
+ oauthType: string;
48
+ connectionConfig: Record<string, string>;
49
+ connectionMetadata: Record<string, string>;
50
+ accessToken: string | null;
51
+ refreshToken: string | null;
52
+ expiresAt: string | null;
53
+ oauthToken: string | null;
54
+ oauthTokenSecret: string | null;
55
+ rawCredentials: object;
56
+ }
15
57
  interface NangoProps {
16
58
  host?: string;
17
59
  secretKey?: string;
@@ -25,7 +67,6 @@ interface NangoProps {
25
67
  dryRun?: boolean;
26
68
  }
27
69
  interface UserLogParameters {
28
- success?: boolean;
29
70
  level?: LogLevel;
30
71
  }
31
72
  export declare class NangoSync {
@@ -41,6 +82,7 @@ export declare class NangoSync {
41
82
  constructor(config?: NangoProps);
42
83
  setLastSyncDate(date: Date): void;
43
84
  proxy(config: ProxyConfiguration): Promise<import("axios").AxiosResponse<any, any>>;
85
+ getConnection(): Promise<Connection>;
44
86
  setFieldMapping(fieldMapping: Record<string, string>, optionalProviderConfigKey?: string, optionalConnectionId?: string): Promise<import("axios").AxiosResponse<any, any>>;
45
87
  getFieldMapping(optionalProviderConfigKey?: string, optionalConnectionId?: string): Promise<any>;
46
88
  get(config: ProxyConfiguration): Promise<import("axios").AxiosResponse<any, any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nango",
3
- "version": "0.22.38-beta",
3
+ "version": "0.22.39-beta",
4
4
  "description": "Nango's CLI tool.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",