nango 0.24.14 → 0.25.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/index.js CHANGED
File without changes
@@ -48,11 +48,22 @@ interface ProxyConfiguration {
48
48
  }
49
49
  declare enum AuthModes {
50
50
  OAuth1 = "OAUTH1",
51
- OAuth2 = "OAUTH2"
51
+ OAuth2 = "OAUTH2",
52
+ Basic = "BASIC",
53
+ ApiKey = "API_KEY"
52
54
  }
53
- interface CredentialsCommon {
55
+ interface BasicApiCredentials {
56
+ type?: AuthModes.Basic;
57
+ username: string;
58
+ password: string;
59
+ }
60
+ interface ApiKeyCredentials {
61
+ type?: AuthModes.ApiKey;
62
+ apiKey: string;
63
+ }
64
+ interface CredentialsCommon<T = Record<string, any>> {
54
65
  type: AuthModes;
55
- raw: Record<string, string>;
66
+ raw: T;
56
67
  }
57
68
  interface OAuth2Credentials extends CredentialsCommon {
58
69
  type: AuthModes.OAuth2;
@@ -65,16 +76,16 @@ interface OAuth1Credentials extends CredentialsCommon {
65
76
  oauth_token: string;
66
77
  oauth_token_secret: string;
67
78
  }
68
- type AuthCredentials = OAuth2Credentials | OAuth1Credentials;
79
+ type AuthCredentials = OAuth2Credentials | OAuth1Credentials | BasicApiCredentials | ApiKeyCredentials;
69
80
  interface Connection {
70
81
  id?: number;
71
- created_at?: Date;
72
- updated_at?: Date;
82
+ created_at?: string;
83
+ updated_at?: string;
73
84
  provider_config_key: string;
74
85
  connection_id: string;
75
86
  connection_config: Record<string, string>;
76
- account_id: number;
77
- metadata: Record<string, string>;
87
+ environment_id: number;
88
+ metadata: Record<string, string> | null;
78
89
  credentials_iv?: string | null;
79
90
  credentials_tag?: string | null;
80
91
  field_mappings?: Record<string, string>;
@@ -82,7 +93,7 @@ interface Connection {
82
93
  }
83
94
  interface NangoProps {
84
95
  host?: string;
85
- secretKey?: string;
96
+ secretKey: string;
86
97
  connectionId?: string;
87
98
  activityLogId?: number;
88
99
  providerConfigKey?: string;
@@ -105,7 +116,7 @@ export declare class NangoSync {
105
116
  dryRun?: boolean;
106
117
  connectionId?: string;
107
118
  providerConfigKey?: string;
108
- constructor(config?: NangoProps);
119
+ constructor(config: NangoProps);
109
120
  setLastSyncDate(date: Date): void;
110
121
  proxy(config: ProxyConfiguration): Promise<AxiosResponse<any, any>>;
111
122
  getConnection(): Promise<Connection>;
@@ -15,7 +15,7 @@ services:
15
15
  - nango
16
16
 
17
17
  nango-server:
18
- image: nangohq/nango-server:0.24.12
18
+ image: nangohq/nango-server:0.25.0
19
19
  container_name: nango-server
20
20
  environment:
21
21
  - TEMPORAL_ADDRESS=temporal:7233
@@ -47,7 +47,7 @@ services:
47
47
  - nango
48
48
 
49
49
  nango-worker:
50
- image: nangohq/nango-worker:0.24.12
50
+ image: nangohq/nango-worker:0.25.0
51
51
  container_name: nango-worker
52
52
  restart: always
53
53
  ports:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nango",
3
- "version": "0.24.14",
3
+ "version": "0.25.0",
4
4
  "description": "Nango's CLI tool.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@babel/traverse": "^7.22.5",
25
25
  "@inquirer/prompts": "^2.3.0",
26
- "@nangohq/shared": "0.24.12",
26
+ "@nangohq/shared": "0.25.0",
27
27
  "@vercel/ncc": "^0.36.1",
28
28
  "axios": "^1.2.0",
29
29
  "byots": "^5.0.0-dev.20221103.1.34",