@nangohq/types 0.62.0 → 0.62.1
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/auth/http.api.d.ts +31 -11
- package/dist/flow/http.api.d.ts +16 -1
- package/dist/flow/index.d.ts +2 -0
- package/dist/nangoYaml/index.d.ts +7 -1
- package/dist/user/api.d.ts +11 -0
- package/package.json +1 -1
package/dist/auth/http.api.d.ts
CHANGED
|
@@ -9,9 +9,29 @@ export type ConnectionQueryString = {
|
|
|
9
9
|
} | {
|
|
10
10
|
connect_session_token: string;
|
|
11
11
|
});
|
|
12
|
-
export interface
|
|
12
|
+
export interface ConnectionResponseSuccess {
|
|
13
13
|
providerConfigKey: string;
|
|
14
14
|
connectionId: string;
|
|
15
|
+
isPending?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type WebSocketConnectionMessage = WebSocketConnectionAck | WebSocketConnectionError | WebSocketConnectionResponseSuccess;
|
|
18
|
+
export interface WebSocketConnectionAck {
|
|
19
|
+
message_type: 'connection_ack';
|
|
20
|
+
ws_client_id: string;
|
|
21
|
+
}
|
|
22
|
+
export interface WebSocketConnectionError {
|
|
23
|
+
message_type: 'error';
|
|
24
|
+
provider_config_key?: string | undefined;
|
|
25
|
+
connection_id?: string | undefined;
|
|
26
|
+
error_type: string;
|
|
27
|
+
error_desc: string;
|
|
28
|
+
}
|
|
29
|
+
export interface WebSocketConnectionResponseSuccess {
|
|
30
|
+
message_type: 'success';
|
|
31
|
+
provider_config_key: string;
|
|
32
|
+
connection_id: string;
|
|
33
|
+
is_pending: boolean;
|
|
34
|
+
private_key?: string | undefined;
|
|
15
35
|
}
|
|
16
36
|
type AuthErrors = ApiError<'invalid_body'> | ApiError<'invalid_query_params'> | ApiError<'unknown_provider_config'> | ApiError<'unknown_provider_template'> | ApiError<'invalid_auth_mode'> | ApiError<'invalid_credentials'> | ApiError<'integration_not_allowed'> | ApiError<'invalid_connection'> | ApiError<'connection_test_failed'>;
|
|
17
37
|
export type PostPublicApiKeyAuthorization = Endpoint<{
|
|
@@ -25,7 +45,7 @@ export type PostPublicApiKeyAuthorization = Endpoint<{
|
|
|
25
45
|
};
|
|
26
46
|
Path: '/api-auth/api-key/:providerConfigKey';
|
|
27
47
|
Error: AuthErrors;
|
|
28
|
-
Success:
|
|
48
|
+
Success: ConnectionResponseSuccess;
|
|
29
49
|
}>;
|
|
30
50
|
export type PostPublicAppStoreAuthorization = Endpoint<{
|
|
31
51
|
Method: 'POST';
|
|
@@ -41,7 +61,7 @@ export type PostPublicAppStoreAuthorization = Endpoint<{
|
|
|
41
61
|
};
|
|
42
62
|
Path: '/app-store-auth/:providerConfigKey';
|
|
43
63
|
Error: AuthErrors;
|
|
44
|
-
Success:
|
|
64
|
+
Success: ConnectionResponseSuccess;
|
|
45
65
|
}>;
|
|
46
66
|
export type PostPublicBasicAuthorization = Endpoint<{
|
|
47
67
|
Method: 'POST';
|
|
@@ -55,7 +75,7 @@ export type PostPublicBasicAuthorization = Endpoint<{
|
|
|
55
75
|
};
|
|
56
76
|
Path: '/api-auth/basic/:providerConfigKey';
|
|
57
77
|
Error: AuthErrors;
|
|
58
|
-
Success:
|
|
78
|
+
Success: ConnectionResponseSuccess;
|
|
59
79
|
}>;
|
|
60
80
|
export type PostPublicTbaAuthorization = Endpoint<{
|
|
61
81
|
Method: 'POST';
|
|
@@ -71,7 +91,7 @@ export type PostPublicTbaAuthorization = Endpoint<{
|
|
|
71
91
|
};
|
|
72
92
|
Path: '/auth/tba/:providerConfigKey';
|
|
73
93
|
Error: AuthErrors;
|
|
74
|
-
Success:
|
|
94
|
+
Success: ConnectionResponseSuccess;
|
|
75
95
|
}>;
|
|
76
96
|
export type PostPublicJwtAuthorization = Endpoint<{
|
|
77
97
|
Method: 'POST';
|
|
@@ -82,7 +102,7 @@ export type PostPublicJwtAuthorization = Endpoint<{
|
|
|
82
102
|
};
|
|
83
103
|
Path: '/auth/jwt/:providerConfigKey';
|
|
84
104
|
Error: AuthErrors;
|
|
85
|
-
Success:
|
|
105
|
+
Success: ConnectionResponseSuccess;
|
|
86
106
|
}>;
|
|
87
107
|
export type PostPublicUnauthenticatedAuthorization = Endpoint<{
|
|
88
108
|
Method: 'POST';
|
|
@@ -92,7 +112,7 @@ export type PostPublicUnauthenticatedAuthorization = Endpoint<{
|
|
|
92
112
|
};
|
|
93
113
|
Path: '/auth/unauthenticated/:providerConfigKey';
|
|
94
114
|
Error: AuthErrors;
|
|
95
|
-
Success:
|
|
115
|
+
Success: ConnectionResponseSuccess;
|
|
96
116
|
}>;
|
|
97
117
|
export type PostPublicBillAuthorization = Endpoint<{
|
|
98
118
|
Method: 'POST';
|
|
@@ -108,7 +128,7 @@ export type PostPublicBillAuthorization = Endpoint<{
|
|
|
108
128
|
};
|
|
109
129
|
Path: '/auth/bill/:providerConfigKey';
|
|
110
130
|
Error: AuthErrors;
|
|
111
|
-
Success:
|
|
131
|
+
Success: ConnectionResponseSuccess;
|
|
112
132
|
}>;
|
|
113
133
|
export type PostPublicTwoStepAuthorization = Endpoint<{
|
|
114
134
|
Method: 'POST';
|
|
@@ -119,7 +139,7 @@ export type PostPublicTwoStepAuthorization = Endpoint<{
|
|
|
119
139
|
};
|
|
120
140
|
Path: '/auth/two-step/:providerConfigKey';
|
|
121
141
|
Error: AuthErrors;
|
|
122
|
-
Success:
|
|
142
|
+
Success: ConnectionResponseSuccess;
|
|
123
143
|
}>;
|
|
124
144
|
export type PostPublicSignatureAuthorization = Endpoint<{
|
|
125
145
|
Method: 'POST';
|
|
@@ -133,7 +153,7 @@ export type PostPublicSignatureAuthorization = Endpoint<{
|
|
|
133
153
|
};
|
|
134
154
|
Path: '/auth/signature-based/:providerConfigKey';
|
|
135
155
|
Error: AuthErrors;
|
|
136
|
-
Success:
|
|
156
|
+
Success: ConnectionResponseSuccess;
|
|
137
157
|
}>;
|
|
138
158
|
export type PostPublicOauthOutboundAuthorization = Endpoint<{
|
|
139
159
|
Method: 'POST';
|
|
@@ -147,6 +167,6 @@ export type PostPublicOauthOutboundAuthorization = Endpoint<{
|
|
|
147
167
|
};
|
|
148
168
|
Path: '/auth/oauth-outbound/:providerConfigKey';
|
|
149
169
|
Error: AuthErrors;
|
|
150
|
-
Success:
|
|
170
|
+
Success: ConnectionResponseSuccess;
|
|
151
171
|
}>;
|
|
152
172
|
export {};
|
package/dist/flow/http.api.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import type { ScriptTypeLiteral } from '../nangoYaml/index.js';
|
|
|
3
3
|
export type PutUpgradePreBuiltFlow = Endpoint<{
|
|
4
4
|
Method: 'PUT';
|
|
5
5
|
Path: '/api/v1/flows/pre-built/upgrade';
|
|
6
|
+
Querystring: {
|
|
7
|
+
env: string;
|
|
8
|
+
};
|
|
6
9
|
Body: {
|
|
7
10
|
id: number;
|
|
8
11
|
provider: string;
|
|
@@ -20,13 +23,16 @@ export type PutUpgradePreBuiltFlow = Endpoint<{
|
|
|
20
23
|
export type PostPreBuiltDeploy = Endpoint<{
|
|
21
24
|
Method: 'POST';
|
|
22
25
|
Path: '/api/v1/flows/pre-built/deploy';
|
|
26
|
+
Querystring: {
|
|
27
|
+
env: string;
|
|
28
|
+
};
|
|
23
29
|
Body: {
|
|
24
30
|
provider: string;
|
|
25
31
|
providerConfigKey: string;
|
|
26
32
|
scriptName: string;
|
|
27
33
|
type: ScriptTypeLiteral;
|
|
28
34
|
};
|
|
29
|
-
Error: ApiError<'unknown_provider'> | ApiError<'failed_to_deploy', Error[]
|
|
35
|
+
Error: ApiError<'unknown_provider'> | ApiError<'failed_to_deploy', Error[]>;
|
|
30
36
|
Success: {
|
|
31
37
|
data: {
|
|
32
38
|
id: number;
|
|
@@ -36,6 +42,9 @@ export type PostPreBuiltDeploy = Endpoint<{
|
|
|
36
42
|
export type PatchFlowEnable = Endpoint<{
|
|
37
43
|
Method: 'PATCH';
|
|
38
44
|
Path: '/api/v1/flows/:id/enable';
|
|
45
|
+
Querystring: {
|
|
46
|
+
env: string;
|
|
47
|
+
};
|
|
39
48
|
Params: {
|
|
40
49
|
id: number;
|
|
41
50
|
};
|
|
@@ -55,6 +64,9 @@ export type PatchFlowEnable = Endpoint<{
|
|
|
55
64
|
export type PatchFlowDisable = Endpoint<{
|
|
56
65
|
Method: 'PATCH';
|
|
57
66
|
Path: '/api/v1/flows/:id/disable';
|
|
67
|
+
Querystring: {
|
|
68
|
+
env: string;
|
|
69
|
+
};
|
|
58
70
|
Params: {
|
|
59
71
|
id: number;
|
|
60
72
|
};
|
|
@@ -74,6 +86,9 @@ export type PatchFlowDisable = Endpoint<{
|
|
|
74
86
|
export type PatchFlowFrequency = Endpoint<{
|
|
75
87
|
Method: 'PATCH';
|
|
76
88
|
Path: '/api/v1/flows/:id/frequency';
|
|
89
|
+
Querystring: {
|
|
90
|
+
env: string;
|
|
91
|
+
};
|
|
77
92
|
Params: {
|
|
78
93
|
id: number;
|
|
79
94
|
};
|
package/dist/flow/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OnEventType } from '../scripts/on-events/api.js';
|
|
2
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
2
3
|
export type HTTP_METHOD = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
3
4
|
export type SyncTypeLiteral = 'incremental' | 'full';
|
|
4
5
|
export type ScriptFileType = 'actions' | 'syncs' | 'on-events' | 'post-connection-scripts';
|
|
@@ -126,10 +127,15 @@ export type NangoSyncEndpointOld = Partial<Record<HTTP_METHOD, string | undefine
|
|
|
126
127
|
export interface NangoSyncEndpointV2 {
|
|
127
128
|
method: HTTP_METHOD;
|
|
128
129
|
path: string;
|
|
129
|
-
group?: string | undefined;
|
|
130
|
+
group?: string | null | undefined;
|
|
130
131
|
}
|
|
131
132
|
export interface FlowsYaml {
|
|
132
133
|
integrations: Record<string, NangoYamlV2Integration & {
|
|
133
134
|
models: NangoYamlModel;
|
|
134
135
|
}>;
|
|
135
136
|
}
|
|
137
|
+
export type FlowZeroJson = NangoYamlParsedIntegration & {
|
|
138
|
+
jsonSchema: JSONSchema7;
|
|
139
|
+
sdkVersion: string;
|
|
140
|
+
};
|
|
141
|
+
export type FlowsZeroJson = FlowZeroJson[];
|
package/dist/user/api.d.ts
CHANGED
|
@@ -23,3 +23,14 @@ export interface ApiUser {
|
|
|
23
23
|
name: string;
|
|
24
24
|
uuid: string;
|
|
25
25
|
}
|
|
26
|
+
export type PutUserPassword = Endpoint<{
|
|
27
|
+
Method: 'PUT';
|
|
28
|
+
Path: `/api/v1/user/password`;
|
|
29
|
+
Body: {
|
|
30
|
+
oldPassword: string;
|
|
31
|
+
newPassword: string;
|
|
32
|
+
};
|
|
33
|
+
Success: {
|
|
34
|
+
success: true;
|
|
35
|
+
};
|
|
36
|
+
}>;
|