@nangohq/types 0.47.0 → 0.48.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/api.endpoints.d.ts
CHANGED
|
@@ -11,10 +11,11 @@ import type { DeleteIntegration, DeletePublicIntegration, GetIntegration, GetInt
|
|
|
11
11
|
import type { PostPublicTableauAuthorization, PostPublicTbaAuthorization, PostPublicUnauthenticatedAuthorization, PostPublicJwtAuthorization, PostPublicBillAuthorization, PostPublicSignatureAuthorization, PostPublicTwoStepAuthorization, PostPublicApiKeyAuthorization, PostPublicBasicAuthorization, PostPublicAppStoreAuthorization } from './auth/http.api';
|
|
12
12
|
import type { GetPublicProvider, GetPublicProviders } from './providers/api';
|
|
13
13
|
import type { DeleteConnectSession, GetConnectSession, PostConnectSessions, PostInternalConnectSessions, PostPublicConnectSessionsReconnect } from './connect/api';
|
|
14
|
-
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnections, PostConnectionRefresh } from './connection/api/get';
|
|
14
|
+
import type { DeletePublicConnection, GetConnection, GetConnections, GetConnectionsCount, GetPublicConnection, GetPublicConnections, PostConnectionRefresh } from './connection/api/get';
|
|
15
15
|
import type { GetMeta } from './meta/api';
|
|
16
16
|
import type { PatchFlowDisable, PatchFlowEnable, PatchFlowFrequency, PostPreBuiltDeploy, PutUpgradePreBuiltFlow } from './flow/http.api';
|
|
17
|
-
|
|
17
|
+
import type { PostPublicWebhook } from './webhooks/http.api';
|
|
18
|
+
export type PublicApiEndpoints = SetMetadata | UpdateMetadata | PostDeploy | PostDeployConfirmation | PostPublicTbaAuthorization | PostPublicTableauAuthorization | PostPublicJwtAuthorization | PostPublicUnauthenticatedAuthorization | PostPublicApiKeyAuthorization | PostPublicBasicAuthorization | PostPublicAppStoreAuthorization | GetPublicProviders | GetPublicProvider | GetPublicListIntegrationsLegacy | GetPublicListIntegrations | GetPublicIntegration | DeletePublicIntegration | PostConnectSessions | PostPublicConnectSessionsReconnect | GetPublicConnections | GetPublicConnection | GetConnectSession | DeleteConnectSession | PostDeployInternal | PostPublicBillAuthorization | DeletePublicConnection | PostPublicSignatureAuthorization | PostPublicTwoStepAuthorization | PostPublicWebhook;
|
|
18
19
|
export type PrivateApiEndpoints = PostSignup | PostSignin | GetTeam | PutTeam | GetUser | PatchUser | PostInvite | DeleteInvite | DeleteTeamUser | PostInsights | PostForgotPassword | PutResetPassword | SearchOperations | GetOperation | SearchMessages | SearchFilters | PatchOnboarding | PostInternalConnectSessions | GetIntegrationFlows | DeleteIntegration | PatchIntegration | GetIntegration | PostIntegration | GetConnections | GetConnectionsCount | GetConnection | GetInvite | GetMeta | GetEmailByExpiredToken | GetEmailByUuid | GetManagedCallback | PatchFlowDisable | PatchFlowEnable | PatchFlowFrequency | PutUpgradePreBuiltFlow | PostConnectionRefresh | PostManagedSignup | PostPreBuiltDeploy;
|
|
19
20
|
export type APIEndpoints = PrivateApiEndpoints | PublicApiEndpoints;
|
|
20
21
|
/**
|
package/dist/connect/api.d.ts
CHANGED
|
@@ -3,12 +3,13 @@ import type { DBConnection } from '../db.js';
|
|
|
3
3
|
import type { ActiveLog } from '../../notification/active-logs/db.js';
|
|
4
4
|
import type { Merge } from 'type-fest';
|
|
5
5
|
import type { ApiEndUser } from '../../endUser/index.js';
|
|
6
|
+
import type { AllAuthCredentials } from '../../auth/api.js';
|
|
6
7
|
export type ApiConnectionSimple = Pick<Merge<DBConnection, ApiTimestamps>, 'id' | 'connection_id' | 'provider_config_key' | 'created_at' | 'updated_at'> & {
|
|
7
8
|
provider: string;
|
|
8
|
-
errors:
|
|
9
|
+
errors: {
|
|
9
10
|
type: string;
|
|
10
11
|
log_id: string;
|
|
11
|
-
}];
|
|
12
|
+
}[];
|
|
12
13
|
endUser: ApiEndUser | null;
|
|
13
14
|
};
|
|
14
15
|
export type GetConnections = Endpoint<{
|
|
@@ -44,16 +45,19 @@ export type ApiPublicConnection = Pick<DBConnection, 'id' | 'connection_id' | 'p
|
|
|
44
45
|
created: string;
|
|
45
46
|
metadata: Record<string, unknown> | null;
|
|
46
47
|
provider: string;
|
|
47
|
-
errors:
|
|
48
|
+
errors: {
|
|
48
49
|
type: string;
|
|
49
50
|
log_id: string;
|
|
50
|
-
}];
|
|
51
|
+
}[];
|
|
52
|
+
end_user: ApiEndUser | null;
|
|
51
53
|
};
|
|
52
54
|
export type GetPublicConnections = Endpoint<{
|
|
53
55
|
Method: 'GET';
|
|
54
56
|
Querystring: {
|
|
55
57
|
connectionId?: string | undefined;
|
|
56
58
|
search?: string | undefined;
|
|
59
|
+
endUserId?: string | undefined;
|
|
60
|
+
endUserOrganizationId?: string | undefined;
|
|
57
61
|
};
|
|
58
62
|
Path: '/connection';
|
|
59
63
|
Success: {
|
|
@@ -74,13 +78,40 @@ export type GetConnection = Endpoint<{
|
|
|
74
78
|
Error: ApiError<'unknown_provider_config'>;
|
|
75
79
|
Success: {
|
|
76
80
|
data: {
|
|
77
|
-
provider: string
|
|
81
|
+
provider: string;
|
|
78
82
|
connection: ApiConnectionFull;
|
|
79
83
|
endUser: ApiEndUser | null;
|
|
80
84
|
errorLog: ActiveLog | null;
|
|
81
85
|
};
|
|
82
86
|
};
|
|
83
87
|
}>;
|
|
88
|
+
export type ApiPublicConnectionFull = Pick<DBConnection, 'id' | 'connection_id' | 'provider_config_key' | 'connection_config'> & {
|
|
89
|
+
created_at: string;
|
|
90
|
+
updated_at: string;
|
|
91
|
+
last_fetched_at: string;
|
|
92
|
+
metadata: Record<string, unknown> | null;
|
|
93
|
+
provider: string;
|
|
94
|
+
errors: {
|
|
95
|
+
type: string;
|
|
96
|
+
log_id: string;
|
|
97
|
+
}[];
|
|
98
|
+
end_user: ApiEndUser | null;
|
|
99
|
+
credentials: AllAuthCredentials;
|
|
100
|
+
};
|
|
101
|
+
export type GetPublicConnection = Endpoint<{
|
|
102
|
+
Method: 'GET';
|
|
103
|
+
Params: {
|
|
104
|
+
connectionId: string;
|
|
105
|
+
};
|
|
106
|
+
Querystring: {
|
|
107
|
+
provider_config_key: string;
|
|
108
|
+
refresh_token?: boolean | undefined;
|
|
109
|
+
force_refresh?: boolean | undefined;
|
|
110
|
+
};
|
|
111
|
+
Path: '/connection/:connectionId';
|
|
112
|
+
Error: ApiError<'unknown_provider_config'>;
|
|
113
|
+
Success: ApiPublicConnectionFull;
|
|
114
|
+
}>;
|
|
84
115
|
export type PostConnectionRefresh = Endpoint<{
|
|
85
116
|
Method: 'POST';
|
|
86
117
|
Params: {
|
package/dist/endUser/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface EndUser {
|
|
|
3
3
|
readonly endUserId: string;
|
|
4
4
|
readonly accountId: number;
|
|
5
5
|
readonly environmentId: number;
|
|
6
|
-
readonly email: string;
|
|
6
|
+
readonly email: string | null;
|
|
7
7
|
readonly displayName?: string | null;
|
|
8
8
|
readonly organization?: {
|
|
9
9
|
readonly organizationId: string;
|
|
@@ -17,7 +17,7 @@ export interface DBEndUser {
|
|
|
17
17
|
readonly end_user_id: string;
|
|
18
18
|
readonly account_id: number;
|
|
19
19
|
readonly environment_id: number;
|
|
20
|
-
readonly email: string;
|
|
20
|
+
readonly email: string | null;
|
|
21
21
|
readonly display_name: string | null;
|
|
22
22
|
readonly organization_id: string | null;
|
|
23
23
|
readonly organization_display_name: string | null;
|
|
@@ -28,7 +28,7 @@ export type DBInsertEndUser = Omit<DBEndUser, 'id' | 'created_at' | 'updated_at'
|
|
|
28
28
|
export interface ApiEndUser {
|
|
29
29
|
id: string;
|
|
30
30
|
displayName: string | null;
|
|
31
|
-
email: string;
|
|
31
|
+
email: string | null;
|
|
32
32
|
organization: {
|
|
33
33
|
id: string;
|
|
34
34
|
displayName: string | null;
|
package/dist/fleet/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export type * from './environment/db.js';
|
|
|
47
47
|
export type * from './environment/api/webhook.js';
|
|
48
48
|
export type * from './environment/api/otlp.js';
|
|
49
49
|
export type * from './webhooks/api.js';
|
|
50
|
+
export type * from './webhooks/http.api.js';
|
|
50
51
|
export type * from './flow/http.api.js';
|
|
51
52
|
export type * from './utils.js';
|
|
52
53
|
export type * from './web/env.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ApiError, Endpoint } from '../api';
|
|
2
|
+
export type PostPublicWebhook = Endpoint<{
|
|
3
|
+
Method: 'POST';
|
|
4
|
+
Path: '/webhook/:environmentUuid/:providerConfigKey';
|
|
5
|
+
Params: {
|
|
6
|
+
environmentUuid: string;
|
|
7
|
+
providerConfigKey: string;
|
|
8
|
+
};
|
|
9
|
+
Error: ApiError<'unknown_environment'> | ApiError<'unknown_provider_config'>;
|
|
10
|
+
Success: any;
|
|
11
|
+
}>;
|