nango 0.23.4 → 0.23.6

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.
@@ -46,21 +46,39 @@ interface ProxyConfiguration {
46
46
  retries?: number;
47
47
  baseUrlOverride?: string;
48
48
  }
49
+ declare enum AuthModes {
50
+ OAuth1 = "OAUTH1",
51
+ OAuth2 = "OAUTH2"
52
+ }
53
+ interface CredentialsCommon {
54
+ type: AuthModes;
55
+ raw: Record<string, string>;
56
+ }
57
+ interface OAuth2Credentials extends CredentialsCommon {
58
+ type: AuthModes.OAuth2;
59
+ access_token: string;
60
+ refresh_token?: string;
61
+ expires_at?: Date | undefined;
62
+ }
63
+ interface OAuth1Credentials extends CredentialsCommon {
64
+ type: AuthModes.OAuth1;
65
+ oauth_token: string;
66
+ oauth_token_secret: string;
67
+ }
68
+ type AuthCredentials = OAuth2Credentials | OAuth1Credentials;
49
69
  interface Connection {
50
- id: number;
51
- connectionId: string;
52
- provider: string;
53
- providerConfigKey: number;
54
- creationDate: string;
55
- oauthType: string;
56
- connectionConfig: Record<string, string>;
57
- connectionMetadata: Record<string, string>;
58
- accessToken: string | null;
59
- refreshToken: string | null;
60
- expiresAt: string | null;
61
- oauthToken: string | null;
62
- oauthTokenSecret: string | null;
63
- rawCredentials: object;
70
+ id?: number;
71
+ created_at?: Date;
72
+ updated_at?: Date;
73
+ provider_config_key: string;
74
+ connection_id: string;
75
+ connection_config: Record<string, string>;
76
+ account_id: number;
77
+ metadata: Record<string, string>;
78
+ credentials_iv?: string | null;
79
+ credentials_tag?: string | null;
80
+ field_mappings?: Record<string, string>;
81
+ credentials: AuthCredentials;
64
82
  }
65
83
  interface NangoProps {
66
84
  host?: string;
@@ -15,7 +15,7 @@ services:
15
15
  - nango
16
16
 
17
17
  nango-server:
18
- image: nangohq/nango-server:0.23.4
18
+ image: nangohq/nango-server:0.23.6
19
19
  container_name: nango-server
20
20
  environment:
21
21
  - TEMPORAL_ADDRESS=temporal:7233
@@ -51,7 +51,7 @@ services:
51
51
  - nango
52
52
 
53
53
  nango-worker:
54
- image: nangohq/nango-worker:0.23.4
54
+ image: nangohq/nango-worker:0.23.6
55
55
  container_name: nango-worker
56
56
  restart: always
57
57
  ports:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nango",
3
- "version": "0.23.4",
3
+ "version": "0.23.6",
4
4
  "description": "Nango's CLI tool.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@babel/traverse": "^7.22.5",
25
- "@nangohq/shared": "0.23.4",
25
+ "@nangohq/shared": "0.23.6",
26
26
  "@vercel/ncc": "^0.36.1",
27
27
  "axios": "^1.2.0",
28
28
  "byots": "^5.0.0-dev.20221103.1.34",