@nangohq/types 0.42.1 → 0.42.3
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/account/api.d.ts +27 -0
- package/dist/api.endpoints.d.ts +3 -2
- package/dist/auth/api.d.ts +10 -3
- package/dist/auth/http.api.d.ts +21 -0
- package/dist/index.d.ts +3 -0
- package/dist/integration/api.d.ts +11 -0
- package/dist/integration/template.d.ts +1 -0
- package/dist/logs/api.d.ts +21 -0
- package/dist/meta/api.d.ts +19 -0
- package/dist/scripts/syncs/api.d.ts +1 -1
- package/dist/team/api.d.ts +1 -1
- package/dist/web/env.d.ts +15 -0
- package/dist/webhooks/api.d.ts +2 -2
- package/package.json +1 -1
package/dist/account/api.d.ts
CHANGED
|
@@ -110,3 +110,30 @@ export type PutResetPassword = Endpoint<{
|
|
|
110
110
|
success: true;
|
|
111
111
|
};
|
|
112
112
|
}>;
|
|
113
|
+
export type PostManagedSignup = Endpoint<{
|
|
114
|
+
Method: 'POST';
|
|
115
|
+
Path: '/api/v1/account/managed/signup';
|
|
116
|
+
Body: {
|
|
117
|
+
provider: 'GoogleOAuth';
|
|
118
|
+
token?: string | undefined;
|
|
119
|
+
};
|
|
120
|
+
Success: {
|
|
121
|
+
data: {
|
|
122
|
+
url: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
}>;
|
|
126
|
+
export type GetManagedCallback = Endpoint<{
|
|
127
|
+
Method: 'GET';
|
|
128
|
+
Path: '/api/v1/login/callback';
|
|
129
|
+
Querystring: {
|
|
130
|
+
code: string;
|
|
131
|
+
state?: string | undefined;
|
|
132
|
+
};
|
|
133
|
+
Error: ApiError<'error_creating_user'> | ApiError<'user_already_exists'> | ApiError<'error_creating_account'>;
|
|
134
|
+
Success: {
|
|
135
|
+
data: {
|
|
136
|
+
url: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}>;
|
package/dist/api.endpoints.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EndpointMethod } from './api';
|
|
2
|
-
import type { GetOperation, SearchFilters, SearchMessages, SearchOperations } from './logs/api';
|
|
2
|
+
import type { GetOperation, PostInsights, SearchFilters, SearchMessages, SearchOperations } from './logs/api';
|
|
3
3
|
import type { GetOnboardingStatus } from './onboarding/api';
|
|
4
4
|
import type { SetMetadata, UpdateMetadata } from './connection/api/metadata';
|
|
5
5
|
import type { PostDeploy, PostDeployConfirmation } from './deploy/api';
|
|
@@ -7,7 +7,8 @@ import type { DeleteTeamUser, GetTeam, PutTeam } from './team/api';
|
|
|
7
7
|
import type { PostForgotPassword, PutResetPassword, PostSignin, PostSignup } from './account/api';
|
|
8
8
|
import type { DeleteInvite, PostInvite } from './invitations/api';
|
|
9
9
|
import type { GetUser, PatchUser } from './user/api';
|
|
10
|
-
|
|
10
|
+
import type { GetListIntegrations } from './integration/api';
|
|
11
|
+
export type APIEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | GetOnboardingStatus | SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | GetListIntegrations;
|
|
11
12
|
/**
|
|
12
13
|
* Automatically narrow endpoints type with Method + Path
|
|
13
14
|
*/
|
package/dist/auth/api.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { BaseConnection } from '../connection/db.js';
|
|
2
1
|
export interface AuthModes {
|
|
3
2
|
OAuth1: 'OAUTH1';
|
|
4
3
|
OAuth2: 'OAUTH2';
|
|
@@ -10,6 +9,7 @@ export interface AuthModes {
|
|
|
10
9
|
App: 'APP';
|
|
11
10
|
None: 'NONE';
|
|
12
11
|
TBA: 'TBA';
|
|
12
|
+
Tableau: 'TABLEAU';
|
|
13
13
|
}
|
|
14
14
|
export type AuthModeType = AuthModes[keyof AuthModes];
|
|
15
15
|
export interface AuthOperation {
|
|
@@ -104,10 +104,17 @@ export interface TbaCredentials {
|
|
|
104
104
|
client_secret?: string;
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
+
export interface TableauCredentials extends CredentialsCommon {
|
|
108
|
+
type: AuthModes['Tableau'];
|
|
109
|
+
pat_name: string;
|
|
110
|
+
pat_secret: string;
|
|
111
|
+
content_url?: string;
|
|
112
|
+
token?: string;
|
|
113
|
+
expires_at?: Date | undefined;
|
|
114
|
+
}
|
|
107
115
|
export type UnauthCredentials = Record<string, never>;
|
|
108
116
|
export type RefreshTokenResponse = AuthorizationTokenResponse;
|
|
109
117
|
export interface AuthorizationTokenResponse extends Omit<OAuth2Credentials, 'type' | 'raw'> {
|
|
110
118
|
expires_in?: number;
|
|
111
119
|
}
|
|
112
|
-
export type
|
|
113
|
-
export type AllAuthCredentials = OAuth1Credentials | OAuth2Credentials | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials;
|
|
120
|
+
export type AllAuthCredentials = OAuth1Credentials | OAuth2Credentials | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials | TableauCredentials;
|
package/dist/auth/http.api.d.ts
CHANGED
|
@@ -22,3 +22,24 @@ export type TbaAuthorization = Endpoint<{
|
|
|
22
22
|
connectionId: string;
|
|
23
23
|
};
|
|
24
24
|
}>;
|
|
25
|
+
export type TableauAuthorization = Endpoint<{
|
|
26
|
+
Method: 'POST';
|
|
27
|
+
Body: {
|
|
28
|
+
pat_name: string;
|
|
29
|
+
pat_secret: string;
|
|
30
|
+
content_url?: string;
|
|
31
|
+
};
|
|
32
|
+
QueryParams: {
|
|
33
|
+
connectionId: string;
|
|
34
|
+
connectionConfig: ConnectionConfig;
|
|
35
|
+
};
|
|
36
|
+
Params: {
|
|
37
|
+
providerConfigKey: string;
|
|
38
|
+
};
|
|
39
|
+
Path: '/auth/tableau';
|
|
40
|
+
Error: ApiError<'invalid_body'> | ApiError<'invalid_query_params'> | ApiError<'unknown_provider_config'> | ApiError<'invalid_auth_mode'> | ApiError<'invalid_credentials'>;
|
|
41
|
+
Success: {
|
|
42
|
+
providerConfigKey: string;
|
|
43
|
+
connectionId: string;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type * from './user/api.js';
|
|
|
11
11
|
export type * from './user/db.js';
|
|
12
12
|
export type * from './connection/api/metadata.js';
|
|
13
13
|
export type * from './connection/db.js';
|
|
14
|
+
export type * from './meta/api.js';
|
|
14
15
|
export type * from './invitations/api.js';
|
|
15
16
|
export type * from './invitations/db.js';
|
|
16
17
|
export type * from './team/api.js';
|
|
@@ -21,6 +22,7 @@ export type * from './scripts/post-connection/db.js';
|
|
|
21
22
|
export type * from './scripts/syncs/api.js';
|
|
22
23
|
export type * from './notification/active-logs/db.js';
|
|
23
24
|
export type * from './connection/api/get.js';
|
|
25
|
+
export type * from './integration/api.js';
|
|
24
26
|
export type * from './integration/db.js';
|
|
25
27
|
export type * from './integration/template.js';
|
|
26
28
|
export type * from './auth/api.js';
|
|
@@ -34,3 +36,4 @@ export type * from './environment/api/webhook.js';
|
|
|
34
36
|
export type * from './webhooks/api.js';
|
|
35
37
|
export type * from './flow/http.api.js';
|
|
36
38
|
export type * from './utils.js';
|
|
39
|
+
export type * from './web/env.js';
|
|
@@ -60,6 +60,7 @@ export interface TemplateOAuth2 extends Template {
|
|
|
60
60
|
authorization_method?: OAuthAuthorizationMethodType;
|
|
61
61
|
body_format?: OAuthBodyFormatType;
|
|
62
62
|
refresh_url?: string;
|
|
63
|
+
expires_in_unit?: 'milliseconds';
|
|
63
64
|
token_request_auth_method?: 'basic' | 'custom';
|
|
64
65
|
}
|
|
65
66
|
export interface TemplateOAuth1 extends Template {
|
package/dist/logs/api.d.ts
CHANGED
|
@@ -92,4 +92,25 @@ export type SearchFilters = Endpoint<{
|
|
|
92
92
|
};
|
|
93
93
|
}>;
|
|
94
94
|
export type SearchFiltersData = SearchMessages['Success']['data'][0];
|
|
95
|
+
export type PostInsights = Endpoint<{
|
|
96
|
+
Method: 'POST';
|
|
97
|
+
Path: '/api/v1/logs/insights';
|
|
98
|
+
Querystring: {
|
|
99
|
+
env: string;
|
|
100
|
+
};
|
|
101
|
+
Body: {
|
|
102
|
+
type: 'action' | 'sync' | 'proxy' | 'webhook_external';
|
|
103
|
+
};
|
|
104
|
+
Success: {
|
|
105
|
+
data: {
|
|
106
|
+
histogram: InsightsHistogramEntry[];
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
}>;
|
|
110
|
+
export interface InsightsHistogramEntry {
|
|
111
|
+
key: string;
|
|
112
|
+
total: number;
|
|
113
|
+
success: number;
|
|
114
|
+
failure: number;
|
|
115
|
+
}
|
|
95
116
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api';
|
|
2
|
+
import type { DBEnvironment } from '../environment/db';
|
|
3
|
+
export type GetMeta = Endpoint<{
|
|
4
|
+
Method: 'GET';
|
|
5
|
+
Path: '/api/v1/meta';
|
|
6
|
+
Querystring: {
|
|
7
|
+
env: string;
|
|
8
|
+
};
|
|
9
|
+
Error: ApiError<'user_not_found'>;
|
|
10
|
+
Success: {
|
|
11
|
+
data: {
|
|
12
|
+
environments: Pick<DBEnvironment, 'name'>[];
|
|
13
|
+
version: string;
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
debugMode: boolean;
|
|
16
|
+
onboardingComplete: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}>;
|
package/dist/team/api.d.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface WindowEnv {
|
|
2
|
+
apiUrl: string;
|
|
3
|
+
publicUrl: string;
|
|
4
|
+
publicSentryKey: string;
|
|
5
|
+
publicPosthogKey: string;
|
|
6
|
+
publicPosthogPost: string;
|
|
7
|
+
isCloud: boolean;
|
|
8
|
+
features: {
|
|
9
|
+
logs: boolean;
|
|
10
|
+
scripts: boolean;
|
|
11
|
+
auth: boolean;
|
|
12
|
+
managedAuth: boolean;
|
|
13
|
+
interactiveDemo: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
package/dist/webhooks/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthOperationType, AuthModeType } from '../auth/api.js';
|
|
2
|
-
import type { SyncResult
|
|
2
|
+
import type { SyncResult } from '../scripts/syncs/api.js';
|
|
3
3
|
import type { ErrorPayload } from '../api.js';
|
|
4
4
|
export type WebhookTypes = 'sync' | 'auth' | 'forward';
|
|
5
5
|
export interface NangoWebhookBase {
|
|
@@ -13,7 +13,7 @@ export interface NangoSyncWebhookBodyBase extends NangoWebhookBase {
|
|
|
13
13
|
providerConfigKey: string;
|
|
14
14
|
syncName: string;
|
|
15
15
|
model: string;
|
|
16
|
-
syncType:
|
|
16
|
+
syncType: 'INCREMENTAL' | 'INITIAL';
|
|
17
17
|
}
|
|
18
18
|
export interface NangoSyncWebhookBodySuccess extends NangoSyncWebhookBodyBase {
|
|
19
19
|
success: true;
|